geoid
Classes for working with census geoids
This module provides dynamically generated classes for parsing and creating each of the approximately 85 Census summary levels. It can parse the forms of genoides that appear in the Decenial Census, the ACS, and Tiger files. Additionally, it can read and write a more compact format, civick, that use base62 representation for the numbers.
Use
The geoid module in file geoid/init.py, has a list of the geoid classes that you can instantiate. Or, to print the list:
$ python -c 'import geoid; print geoid.names'
The first dozen are the ones you'll use most frequently:
'us': 10,
'region': 20,
'division': 30,
'state': 40,
'county': 50,
'cosub': 60,
'place': 160,
'ua': 400,
'tract': 140,
'blockgroup': 150,
'block': 101,
'sdelm': 950,
'sdsec': 960,
'sduni': 970,
'zcta': 860
The classes are all dynamically generated, so you won't be able to find a class file.
from geoid import acs
g = acs.Blockgroup(53, 33, 1800, 3)
print g.state, g.county.g.tract.g.blockgroup
gs = str(g)
g = acs.AcsGeoid.parse(gs)
Creating
TBD
Parsing
TBD
Parse Generally, or parse to a specific class.
Access Members
Promotion, Conversion, Summarization, AllVals
Promote: create a higher level geoid from a lower level one Convert: Change the type, for instance from a Census geoid to an ACS geoid Summarize: Create a value to represent a summary level AllVal: Create a value to represent coverage of an entire region
Caveats
The geoids don't preserve the component, so, for instance, '03001US1' will get changed to '03000US1'
Running tests
git clone git@github.com:CivicKnowledge/geoid.git
cd geoid
python setup.py test
Metadata
Release files for geoid 1.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| geoid-1.1.7.tar.gz | 50.6 kB | Without provenance | Details for geoid-1.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| geoid-1.1.7-py3-none-any.whl | Python 3 | none | any | Details for geoid-1.1.7-py3-none-any.whl |
Total release size: 91.0 kB
Release files / geoid-1.1.7.tar.gz
| Download URL | geoid-1.1.7.tar.gz |
|---|---|
| Size | 50.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31f0113c09f57752b40d37d915fe4c109e09b13ed8b99f7c168fdce0ba8217c9
|
|
BLAKE2b-256 checksum How to use checksums |
b16d837bfa603786c7e711a274f7b7bf81de827e626eb96d23fc7c97755c26ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.3
|
Release files / geoid-1.1.7-py3-none-any.whl
| Download URL | geoid-1.1.7-py3-none-any.whl |
|---|---|
| Size | 40.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef085cd5782507fc5ac6fb6c7234175062161248abdce8e35098d78257b068b7
|
|
BLAKE2b-256 checksum How to use checksums |
8969e6fa8ca176b5200dafa7bd119dd87e221eb526c96a08dcd97ab04daabee0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.3
|
Security for geoid 1.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.