basemap.d3
A simple API for generating maps using d3.js.
See examples at etpinard.github.io/basemap.d3/.
Current features
- Basemap of coastlines, land, ocean, countries, USA states, river and lakes
- Scatter points/text and great circle paths in (lon, lat) coordinates on top of a basemap
- Choropleth of countries (with custom boundary lines)
- Scatter points/text by locations (e.g. ISO-3)
- Periodic panning and zoom
- Customizable lon/lat axis ranges, graticule width, color and spacing
- Customizable map frame
- High resolution map scopes of Europe, Asia, Africa, North America, South America and USA
- Integrated with all
d3.geo
projections
TODO list
- Add more subunits and choropleth
locmode
values (but the Natural Earth 110m
set only includes USA states, the 50m include USA states and Canadian
provinces)
- Add zeroline (lon/lat) attributes.
- Add a conic-specific zoom handler
Running it locally
npm install http-server -g
./server up
Add or modify a map scope
This is done by filter and clipping Natural Earth shapefiles and converting them
to topojson:
npm install
make wget
make convert
API
Describe the figure object of the examples in ./examples/