/census-geo-centroids

CSV files with the lat/long of the centroids for various US Census geographies

Primary LanguagePython

Census Centroids

A collection of CSV files with the latitude/longitude for the centroid of each census shape. These are useful for making dot maps, or other maps where you might need to plot a single discrete location for a given shape.

Available files include:

It doesn't include census blocks by default, since it would create a prohibitively large file. It should theoretically work using make blocks.csv, so feel free to give it a try if you've got the hardware and internet connection to spare. (It might take a few hours.)

All the shapefiles come from the Census Bureau's TIGER database, using @datadesk's census-map-downloader tool.

Installation

If you want to generate files yourself, you'll first need to install pipenv. If you're on a mac, that's as easy as:

$ brew install pipenv

Then, you need to install the python dependencies:

$ pipenv install

Usage

To generate files, just use the makefile commands:

$ make [format].csv

Where format is one of counties, places, tracts, zctas, or blocks. Or, you can run

$ make all

to generate every format (except for blocks, which is disabled by default).