A python command line utility that generates CSVs of county-level population data for specified US states.
Project description
get-pop
.. image:: https://badge.fury.io/py/get-pop.svg :target: https://badge.fury.io/py/get-pop
.. image:: https://travis-ci.org/SimmonsRitchie/get-pop.svg?branch=master :target: https://travis-ci.org/SimmonsRitchie/get-pop
.. image:: https://readthedocs.org/projects/get-pop/badge/?version=latest :target: https://get-pop.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status
A command line utility that generates CSVs of county-level population data for specified US states.
Data is based on 2019 U.S. census data.
The full documentation is hosted at Read the Docs <https://get-pop.readthedocs.io/en/latest/index.html>
_
Install
::
pip install get-pop
Basic usage
Command line
In the command line, enter the getpop command followed by the two letter postal code of one or more states.
Eg.:
::
getpop ny
Initializing getpop Selected states: ['ny'] Processing: New York getpop complete
Or:
::
getpop ny nj tx
Initializing getpop Selected states: ['ny', 'nj', 'tx'] Processing: New Jersey Processing: New York Processing: Texas getpop complete
To get CSVs for all states, enter:
::
getpop all
CSVs will be saved in a new directory called 'data' in the current working directory. See 'advanced usage' to override the location where CSVs are saved.
Programmatic
If you prefer, you can also import and call get-pop from within your python app:
::
from get_pop.get_pop import get_pop
states = ["ny","nj","tx","pa"]
get_pop(states)
Advanced usage
Command line
In addition to take state abbreviations as positional arguments, getpop takes a handful of optional arguments:
--save-dir, --dir
TEXT. Absolute path of directory where CSV files will be output. Defaults to saving them in /data in the current
working directory
--clear-dir, --cdir
Deletes all existing files in save_dir path. Defaults to false.
--help
Show this message and exit.
Example:
::
getpop ny ca tx --save-dir ./state_csvs --clear-dir
License
MIT <https://choosealicense.com/licenses/mit/>
_
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file get_pop-1.94.5.tar.gz
.
File metadata
- Download URL: get_pop-1.94.5.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1619ab3c33a9639519df47af03b0070ae62f651c117ca22e3e899ecb0560e292 |
|
MD5 | cc175479a6cd2a4bd82a49d4b7a0fe7b |
|
BLAKE2b-256 | 73f14f87df401a353a5803a5210900aa2b51e721dcb4a44d35facf84fd6e3714 |
File details
Details for the file get_pop-1.94.5-py3-none-any.whl
.
File metadata
- Download URL: get_pop-1.94.5-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d514fdb9e2e6fac23e376df8018b5d83e85aec702dd9dea76d46c4683a24505 |
|
MD5 | bbe4430dda5f4e3d348ec3814bad2a5e |
|
BLAKE2b-256 | 9264aced4770b508f4ac4d8910bc630f82b437a0ef2de7928c5a0cf01b59cbf7 |