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.8.tar.gz (4.4 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.8-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: census_backup-0.1.8.tar.gz
  • Upload date:
  • Size: 4.4 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.8.tar.gz
Algorithm Hash digest
SHA256 a6d37970a84a695a3633eb118423eb5e68c4a57dba5fce63abe9d85b7f15b4b8
MD5 e0655fc5ca86f5d51bf6dc2eb68435d9
BLAKE2b-256 450b96d4ab54d9837b3d47efc6bf44ed747bace6e2b0681593a3a6ca34017546

See more details on using hashes here.

File details

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

File metadata

  • Download URL: census_backup-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 5.1 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 7e6b50330180d90ad51f8631e9020b9507ccb5dfd3ab584270886fc5ed3e3285
MD5 5e7888f1332eef5dc157323c61d93c69
BLAKE2b-256 3bce7341eb1c3636e309bf114fb78711b49d7e07d2fea865cade3c25cd41b6d2

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