自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

郭不耐 {大数据 @ 可视化}

{d3.js} {Python} {Ubuntu}

  • 博客(17)
  • 资源 (2)
  • 收藏
  • 关注

原创 d3导出svg图片

svg必需放在一个div容器里var svgHeadInfo = '\n'; var svg = $('#vizContainer').find('svg')[0]; svg.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"); var svgS

2016-11-09 22:32:01 5794 1

原创 three.js环境下的一种飞线动画实现方法

var aCurve = createFlyLine(startPoint, endPoint, heightLimit, flyTime, lineStyle) scene.add(aCurve) function createFlyLine(startPoint, endPoint, heightLimit, flyTime, lineStyle) { var

2016-11-01 00:15:57 11830 5

原创 用THREE.Shape画二维圆角矩形

function roundedRect( shape, x, y, width, height, radius ) { shape.moveTo( x, y + radius ); shape.lineTo( x, y + height - radius ); shape.quadraticCurveTo( x, y + height, x + radius, y + heig

2016-10-23 22:34:51 5450

原创 计算THREE.Shape()生成的形状的uv,用shader material贴图

THREE.Shape()生成的形状会打破默认uv计算方式,需要重新计算才能正确应用shader的渐变色。

2016-10-23 22:10:49 2667

原创 《大数据可视化实战:d3.js深度应用》-02 开发环境配置

一、操作系统的偏好选择二、代码编辑器sublime text三、安装live-server

2015-10-11 21:33:45 4075 1

原创 selenium抓取元素排除某个特定的class标签

排除某个因素,第一优选想到正则表达式,无奈折腾半天没有成功,感觉是对元素的attrs按search在操作,$对字符串末尾检测都没什么用。语法如下:text_match((By.XPATH, "//tr[5]/td[11]/div"), r"[0,1]{1}.[0-9]{6}")BeautifulSoup可以用element[‘class’]输出元素的class进行检测,但是se

2015-08-13 13:41:27 9214

原创 百度地图API开发:大量坐标点进行分组聚合

leaflet具有markersCluster(标点聚合)的插件非常好用,偶然看到百度地图也有标点聚合开源库,尝试一下,先上效果图:交互版链接:http://guoweish.github.io/raw-map-baidu.html总结:1、优点:百度地图原生的火星坐标系和国内经过偏移的经纬度能完美歪在一起;网络访问速度比open street map快

2015-08-11 13:41:05 16574 2

原创 python网络爬虫抓取ajax动态网页数据:以抓取KFC门店地址为例

一,尝试用BeautifulSoup抓取先打开KFC网站门店列表页面:http://www.kfc.com.cn/kfccda/storelist/index.aspx可以看到门店列表如下图:打开Chrome Developer Tools观察页面结构,找到标签如下:发现要的数据位于id='listhtml'的表里,门店地址数据位于第二个tr开始的行里,尝试

2015-08-07 15:14:34 12851 4

原创 webdriver查找元素的几种方法

#通过id方式定位webdriver.find_element_by_id("kw")#通过name方式定位webdriver.find_element_by_name("wd")#通过tag name方式定位webdriver.find_element_by_tag_name("input")#通过class name 方式定位webdriver.find_element_by_clas

2015-08-04 16:10:41 1008

原创 大数据可视化系列一:可视化工具选择

在这个全民创业的火热年代,枯燥乏味的数据统计居然也靠“大数据”概念咸鱼翻身,突然变得炙手可热起来。既然大数据这么洋气,当然要好好钻研。梦想还是要有的,万一靠这发财了呢!一,数据可视化的魔力  大数据里面,我觉得最洋气的领域就是数据可视化了(其实是其它的不会...),俗话说的好,可视化就是大数据产业“长征的最后一公里”,是面向用户的最终数据体现形式,男人(用户)的唯一标准就是脸(图)好不好看

2015-08-04 12:11:36 4234 1

原创 在python中判断字符串是str还是unicode

if isinstance(iniStr , unicode ): print "unicode"elif isinstance(iniStr, str): print "str"else: print "no idea"

2015-08-03 12:22:02 12172 4

原创 gb2312网页转码输出utf-8格式文本

环境:python 2.7坑:urlopen链接读取后就要转,不能用bs解析后再转:url = "http://kfc.xixik.com/shop/shanghai/kfc"html = urllib.urlopen(url).read().decode('gbk')bsObj = BeautifulSoup(html, "html.parser")address = bsObj.

2015-07-31 21:50:29 925

原创 Atom编辑器在Ubuntu下安装(32位推荐,64位有官方deb包)

sudo add-apt-repository ppa:webupd8team/atom  sudo apt-get update  sudo apt-get install atom

2015-07-29 16:09:04 6749

原创 PYTHON将list或/dict对象写入txt/json文件

不能直接将list或dict对象进行写入,会出现typeError。一、写list到txt文件:ipTable = ['158.59.194.213', '18.9.14.13', '58.59.14.21']fileObject = open('sampleList.txt', 'w')for ip in ipTable: fileObject.write(ip) fileObj

2015-07-28 15:41:53 124537

原创 ubuntu下为python安装BeautifulSoup

在ubuntu上python2与3共存,为了支持2和3的开发环境,要分别安装bs。python2版本安装:sudo apt-get install python-bs4python3版本安装:sudo apt-get install python3-bs4测试:python(3)>from bs4 import beautifulSoup

2015-07-23 09:40:18 2271

原创 搭建scrapy抓取javascript动态数据的爬虫

由于简单的scrapy设置无法抓取如京东产品价格信息等javascript动态输出的数据,需要采用selenium、PhantomJS等工具辅助。运用这些工具的原理其实就是类似用浏览器打开需要爬取的网页,运行javascript产生目标数据后用scrapy进行采集。当前平台:ubuntu14.04, Python 2.7安装软件版本:selenium 2.46.1, 安装过

2015-07-22 10:52:25 4266

原创 在SVG中旋转图形,需要设置各个图形的旋转中心点

在SVG中旋转图形,需要设置各个图形的旋转中心点;基本语法源自CSS,如:div{transform:rotate(7deg);-ms-transform:rotate(7deg); /* IE 9 */-moz-transform:rotate(7deg); /* Firefox */-webkit-transform:rotate(7deg); /* Safari 和

2015-03-28 12:50:49 8696

Web Animation Using JavaScript - js网页动画-英文原版

js网页动画-英文原版 This book provides you with a technical foundation to implement animation in a way that’s both visually stunning and programmatically maintainable. Throughout, we consider the balance between enriching a page with motion design while avoiding unnecessary flourishes. Readers will learn how to design loading sequences that ensure users stay fully engaged instead of tuning out, how to leverage simple physics principles to make apps respond naturally to users’ input (just like motion behaves in the real world), how to exploit CSS transforms to create rich depth in animations, and how to fully leverage JavaScript animation libraries like Velocity.js to streamline animation programming. From animation performance to theory, we cover everything needed to become a professional web animator. Whether you’re a novice or professional web developer, this book is for everyone.

2018-05-27

d3.js API开发接口参考

d3.js API,开发之前熟悉很有必要

2015-03-31

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除