Spain Atlas TopoJSON
In a browser (using d3-geo and Canvas):
var fs =d3_composite =d3 =topojson =Canvas =es = ;var canvas = 960 500context = canvasprojection = d3_compositepath = d3;context;;context;canvas;
I highly recommend using Roger Veciana’s d3-composite-projections with these files. Using a
ConicConformalSpain projection will ensure that the Canary Islands are painted closer to the mainland and even add a border to mark the projection zone.
Generating the files
Clone or download the repo, start a terminal and run
npm install in the folder. This command will run the script and move the generated files to the
If you need to make further adjustments (simplification, quantization) you can change the
package.json config and run
npm install again.
You can also run the script with inline arguments:
npm run prepare --es-atlas:simplification=1e3
name property to the generated files with the feature name. Set to
false by default.
Removes points to reduce the file size. Set to
1e-4 by default.
Removes information by reducing the precision of each coordinate. Set to
1e4 by default.
Filters the result by the given autonomous region
id separated by comma.
npm run prepare --es-atlas:autonomous-regions=09,10,14,04
A TopoJSON which contains four objects: municipalities, provinces, autonomous regions and border. Every city, province and region has its corresponding National Statistics Institute identifier, so it's easy to get started.
This file provides provinces and autonomous regions, to keep a smaller footprint on less detailed maps.
This file only provides autonomous regions, to keep a smaller footprint on less detailed maps.