Skip to main content

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.

--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


Download files

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

Source Distribution

get_pop-1.94.7.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

get_pop-1.94.7-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file get_pop-1.94.7.tar.gz.

File metadata

  • Download URL: get_pop-1.94.7.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

Hashes for get_pop-1.94.7.tar.gz
Algorithm Hash digest
SHA256 311b02a8b5347ff6272caa0120d05d2f469fed0cdb26982a2cbe325fbf9c85fc
MD5 84e4e8da2a20fe5e678110c29b982f92
BLAKE2b-256 49efef7790350139cd580b6a66dab02d454402ac3daa476f4d056ca6f986829b

See more details on using hashes here.

File details

Details for the file get_pop-1.94.7-py3-none-any.whl.

File metadata

  • Download URL: get_pop-1.94.7-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

Hashes for get_pop-1.94.7-py3-none-any.whl
Algorithm Hash digest
SHA256 519b7f1902cd82a23b306010ee541b60a045347760b4375b8dd162d960c20a8d
MD5 d1e9ebb65db31d53ca488eb59ccdb476
BLAKE2b-256 60c00817fc01d987213e81c14c26d0ed85a30f2ba68161eee98e784a31d5cb66

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