Using d3.geo.tile to display raster image tiles underneath some TopoJSON vectors, and d3.behavior.zoom for pan & zoom.
First attempt at making a colour-coded graph, with code snippets inspired from the D3 community.
Green => Friend and follower.
Red => Follower
Blue => Friend.
Improvements needed:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <style> | |
| .link { | |
| stroke: #000; | |
| } | |
| .node { | |
| fill: #ccc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ----------------------------------------------------------------- # | |
| REFERENCES | |
| # ----------------------------------------------------------------- # | |
| http://ndpsoftware.com/git-cheatsheet.html | |
| # ----------------------------------------------------------------- # | |
| BASIC | |
| # ----------------------------------------------------------------- # |
Reproducing the UK map and uk.json topojson data by Mike Bostock (http://bost.ocks.org/mike/map/). Currently the uk.json file does not contain place information - there must be something wrong with the way I am producing the uk.json here: https://github.com/samuelleach/uk-atlas
The Natural Earth Gray Earth raster data set, reprojected to the U.S. National Atlas projection (a rotated Lambert azimuthal equal-area projection) via gdalwarp.
gdalwarp \
-r lanczos \
-ts 960 0 \
-t_srs EPSG:2163 \
-te -2100000 -2200000 2600000 750000 \
GRAY_HR_SR_OB_DR.tif \
shaded-relief.tiff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set up new repo on GitHub | |
| curl -u 'samuelleach' https://api.github.com/user/repos -d '{"name":"gitProj"}' | |
| # Clone repo in local directory | |
| git clone https://github.com/samuelleach/gitProj.git | |
| # Add a README.md and .gitignore file in the repo | |
| cd gitProj | |
| touch README.md .gitignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # http://henrik.nyh.se/2008/12/git-dirty-prompt | |
| # http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
| # username@Machine ~/dev/dir[master]$ # clean working directory | |
| # username@Machine ~/dev/dir[master*]$ # dirty working directory | |
| function parse_git_dirty { | |
| [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
| } | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |
NewerOlder