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 the current working directory. See 'advanced usage' to specify a different location to save CSVs.
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
Getpop takes one or more two-letter state abbreviations as positional arguments in order to determine which state CSVs will be generated. Getpop's CLI also takes certain optional arguments that modify its actions.
--save-dir, --dir
TEXT. Path of directory where CSV files will be saved. Defaults to saving them in /data in the current working directory. If the directory you specify doesn't exist, getpop will create it.
-q, --quiet
FLAG. Disables stdout during program run
--help
Returns a list of getpop's CLI options.
Here's an example that stores the CSVs in a directory in your current working directory called 'your_custom_directory' and clears any existing files in it if they exist.
::
getpop ny ca tx --save-dir ./your_custom_directory
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.8.tar.gz
.
File metadata
- Download URL: get_pop-1.94.8.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 | ef21909bf517ac611184d063f04c22dd1bdeef757d534898f170462773ab5c0a |
|
MD5 | 0856077fb82c5ecab8a0eb1c38177f66 |
|
BLAKE2b-256 | 28c663ebeab338fb77d77d3cefaeced91ddfac4d70ffa27ab1daca141a7d4c74 |
File details
Details for the file get_pop-1.94.8-py3-none-any.whl
.
File metadata
- Download URL: get_pop-1.94.8-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 | 9e9712a2e2d710bb7787369bc29141388a1dd7a27490deff69920f7878fe8706 |
|
MD5 | 124be4cf80533583865bf7d80c7e41eb |
|
BLAKE2b-256 | 0084f617e80c398902770584410dc2ad7242ad51d02ed61d43ecd945fae7f131 |