Skip to main content

Combine Census maps into new shapes

Project description

census-map-consolidator

Combine Census blocks into new shapes.

Installation

pipenv install census-map-consolidator

Usage

Create a list of Census block GEOIDs. That can be simple like this:

your_block_list = ["060371976001008", "060371976001009"]

Or read in from a file like this:

with open("test_data/dtla.csv", "r") as f:
    your_block_list = f.read().splitlines()

Import our class.

from census_map_consolidator import BlockConsolidator

Pass in the block list as arguments.

c = BlockConsolidator(*your_block_list)

Consolidate the blocks into a single shape. This can take a minute. Big shapefiles have to be downloaded.

c.consolidate()

Write out the new shape. You can do GeoJSON.

c.write("./your-new-shape.geojson")

Or shapefiles.

c.write("./your-new-shape.shp")

That's it. You can inspect your work however you like. But geojsonio is handy.

geojsonio < your-new-shape.geojson

dtla

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

census-map-consolidator-0.0.6.tar.gz (60.3 MB view details)

Uploaded Source

Built Distribution

census_map_consolidator-0.0.6-py2.py3-none-any.whl (4.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file census-map-consolidator-0.0.6.tar.gz.

File metadata

File hashes

Hashes for census-map-consolidator-0.0.6.tar.gz
Algorithm Hash digest
SHA256 b96e6e4e8b392f863bb1084f9feb376c995de235e27942e5c7dea8c52c5e1350
MD5 d24031b3894833d4aa22f00531a92d9b
BLAKE2b-256 26e02b8d4cce9862ad352c17a91759558b6e19a054553f5bf6aa422ae6090722

See more details on using hashes here.

File details

Details for the file census_map_consolidator-0.0.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for census_map_consolidator-0.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e7d4611da88dd6104059b6f86fcd6ef79797248aa0a109bd7702b185a8548dde
MD5 e7ecf4e4172007b2a89ee05aa13010be
BLAKE2b-256 92572e5ae3dd301d0e1334259b323c312e71788b6a85214112e394efaaa3eecb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page