Skip to main content

svi_data

Code to download 5 year American Community Survey Data estimates and create the Social Vulnerability Index (SVI) data from CDC. SVI combines data from several different domains into an overall health index:

This code downloads the data into a pandas dataframe for a given geography (either county, zipcode, or census tract). To install is:

pip install svi-data

Packages that need to be installed for this to work are the pandas and census. Also you will need to sign up for a census API key (it is free), and will need access to the internet.

An example of importing the SVI data for zipcodes:

import svi_data
key = svi_data.get_key('census_api.txt') # read in census api key from text file
svi_zips = svi_data.get_svi(key,'zip')   # download the SVI data for zipcodes in the US

Note this uses the 2018 SVI version data definition, but allows you to download data for other years and apply that 2018 definition. See the Jupyter notebook ExampleAnalysis.ipynb in the root of the github repo illustrating grabbing different variables and different years of data.

Future Development

In the /src/prep_acs.py functions, it has functions to download the ACS data from the FTP site and creates a localized sqllite database with all of the census variables for a given year. Future work will incorporate this as a potential way to grab the data to create the SVI or additional variables from the 5 year ACS (which are available at various geographies).

This work was supported by Gainwell technologies.

Metadata

Release files for svi-data 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for svi-data 0.0.3
File Size Uploaded Provenance Actions
svi_data-0.0.3.tar.gz 12.7 kB Without provenance Details for svi_data-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for svi-data 0.0.3
File Interpreter ABI Platform Actions
svi_data-0.0.3-py3-none-any.whl Python 3 none any Details for svi_data-0.0.3-py3-none-any.whl

Total release size: 25.9 kB

Release files / svi_data-0.0.3.tar.gz

Download URL svi_data-0.0.3.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b5f31e24ee9b39604e2bf2eafb4beb6cdd66261d218dc7fa200c11aa5626eadf
BLAKE2b-256 checksum
How to use checksums
ed0e145b2798d5b685831c860b9b3006df9a7a5d7266ad8af00e00928555569a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.5

Release files / svi_data-0.0.3-py3-none-any.whl

Download URL svi_data-0.0.3-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ffdddf0d598e5837ad983e162e4ed7be26f79e63ad3af5f2674ae838205e15f
BLAKE2b-256 checksum
How to use checksums
e6d6bfb091147bdb848bb9f93e30dddf9f932cb662d6b4942fd1a7bcffccb8ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.5

Security for svi-data 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page