Skip to main content

Backup utilities.

Project description

censusdis/backup

This project is a command-line utility for bulk downloads of U.S. Census data. Documentation and examples are a little sparse, but we wanted to get this out so people who know what data sets and vintages they are interested in can start using it.

Installation

pip install census_backup

Usage Examples

General help and overview

census-backup --help

Download from a group across all available bulk geographies

This is the simplest way to use this tool. It will look for all available geographies for the given dataset and vintage, then download all variables in the specified group for every geography it can.

census-backup -d acs/acs5 -v 2020 -g B02001 -o ~/tmp/backup  --log INFO

The required arguments are:

  • -d: the data set
  • -v: the vintage
  • -g: the variable group

The option arguments are:

  • -o: output directory. The default is the current working directory.
  • --log: logging level. INFO is useful to see what is happening.

Logging will also help you see what geographies the script was not able to download in bulk. The census API syntax does not allow all the bulk downloads one might like to do.

Download geometries that have state as a component

Sometimes we really only care about a specific set of geography levels. This example will download at the [state], [state, county], [state, county, tract] etc... levels.

census-backup -d acs/acs5 -v 2020 -g B02001 -G state -o ~/tmp/backup-states-and-below  --log INFO

Download state aggregated data only

This will not get geographies within the state. It will only get data aggregate at the state level. The + prefix says that state must be the last component of the geography, so it will not match [state, county] like it would without the +.

census-backup -d acs/acs5 -v 2020 -g B02001 -G +state -o ~/tmp/backup-states  --log INFO

Download county aggregated data within states only

This will not get geographies within the state. It will only get data aggregate at the state level.

census-backup -d acs/acs5 -v 2020 -g B02001 -G state +county -o ~/tmp/backup-state-counties --log INFO

More Help

census-backup --help

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_backup-0.1.7.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

census_backup-0.1.7-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file census_backup-0.1.7.tar.gz.

File metadata

  • Download URL: census_backup-0.1.7.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.4 Darwin/21.6.0

File hashes

Hashes for census_backup-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e057df9590afb1e94e87951daf619238256b99fc0eafa88d9334c0bfbf557786
MD5 998d83e782fe005f4cf863aaf9e29f87
BLAKE2b-256 3e933e8e71785f2fe36e3ff78cc6360221e469bee6bf6a1fce136437955a5a54

See more details on using hashes here.

File details

Details for the file census_backup-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: census_backup-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.4 Darwin/21.6.0

File hashes

Hashes for census_backup-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 99441879322029eff3d7a96db8dd9dc286a63dcf775461303cae027325c5a5b1
MD5 7174f5e03def8c33ac3f07dd87ba0c7a
BLAKE2b-256 48fb9c137ae2fc9365c7466889b46f377bb2ab805ab667d0164db46f87b7856c

See more details on using hashes here.

Supported by

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