My first D3 map showing my travel across the US. This visualization was built by modifying choropleth example code by Scott Murray, tooltip example code by Malcolm Maclean, and legend code example by Mike Bostock.
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
def main(): | |
""" Main program """ | |
# Code goes over here. | |
return 0 | |
if __name__ == "__main__": | |
main() |
{ | |
"graph": [], | |
"links": [ | |
{"source": 0, "target": 1}, | |
{"source": 0, "target": 2}, | |
{"source": 0, "target": 3}, | |
{"source": 0, "target": 4}, | |
{"source": 0, "target": 5}, | |
{"source": 0, "target": 6}, | |
{"source": 1, "target": 3}, |
Example of map explained in maptimeLex Introduction to D3.js Web Mapping Through 7 Simple Maps.
Pan and zoom in the map on the left to rotate the globe.
Click and drag the globe to pan on the map.
An example that shows a Chiasm plugin based on Leaflet.js alongside a Chiasm globe plugin based on the D3 example This is a Globe.
The Chiasm plugins demonstrated here are
license: mit | |
height: 650 | |
border: none |
border: none | |
license: mit |
license: mit | |
border: none | |
height: 510 |
Based on this data, contains a Shapefile and two topojson with the US congressional Districts.
The atlas-make project has a better maintained version of this data.
The difference from the data is based on, is that the American Samoa, Guam and Northern Marianas are included from the Natural Earth dataset. The Congress Representative data is included too.
get_areas.py is a script to calculate the area paoperties for the new objects. The name of the Congressional Representatives in the added territories has been taken from the Wikipedia.
The topojson has been calculated using the command: topojson -o us_congressional_district.json cgd114p010g.shp -p