Source for SLDL and SLDU map tiles for openstates.org
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
.gitignore
Dockerfile
LICENSE
README.md
get-all-sld-shapefiles.py
join-ocd-division-ids.js
make-tiles.sh
package-lock.json
package.json
requirements.txt

README.md

Open States district maps

Generate and upload map tiles for the state-level legislative district maps on openstates.org.

  • Source: SLDL and SLDU shapefiles from the Census's TIGER/Line database
  • Output: a single nationwide MBTiles vector tile set, uploaded to Mapbox for hosting
    • Intermediate files are also built locally, stored in the data directory for debugging and other uses

Dependencies

  • Python 3
  • Node.js 8
  • GDAL
  • sed
  • awk
  • tippecanoe

To install the Python and Node libraries, run:

pip install -r requirements.txt
npm install

Running

Run ./make-tiles.sh to create the map tiles, and upload them to Mapbox.

The MAPBOX_ACCOUNT name and MAPBOX_ACCESS_TOKEN (with upload privileges) must be set as environment variables. If not, then the upload step will be skipped.