A Python package to automatically fill out the CDC WONDER MCD form
Project description
cdcwonderpy: Use Python3 and Selenium to automatically complete the CDC WONDER Online Form
Disclaimer
This project is a work-in-progress. It works in some cases but may not work in many others (and may not be flexible enough for some users), and some extra code exists for functions that are not yet operational. This program has only been tested in Windows 10.
Description
The CDC's WONDER API does not allow users to collect subnational data -- users have to use the online form. This package automates that form. Note that this is still a work in progress.
This package is intended to be used with the R package "wondeR".
Installation
To use this package, you'll need to have Selenium set up for Chrome. This means you need to have Chrome, Chromedriver, and Selenium.
$ pip install cdcwonderpy
Usage
from cdcwonderpy.pulldata import wonder
wonder(
## wonderpy arguments
RUN_NAME = "opioids", # Name of the run
download_dir = "/path/to/downloads/folder", # Where to download the data
existing_file = False, # True if the data file already exists on your local computer
## You want deaths matching the following ICD Codes
MCD_CAUSE_CODE_1 = ["A10", "A20"], # Deaths that include ANY of these ICD Codes
MCD_CAUSE_CODE_2 = ["A12", "A22"], # ...and ANY of these ICD Codes
## Group the deaths by these variables
by_variables = ["sex", "age"], # Any of the following: "sex", "age", "race", "hispanic", "state", "year", "month"
## Only collect data of the following (None if all)
AGEG = None, # age group
GENDERG = None, # gender
RACEG = None, # race
HISPANICG = None, # hispanic status
## Other
just_go = False # For use with more further and undeveloped cases. Keep as False.
)
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 Distributions
Built Distribution
File details
Details for the file cdcwonderpy-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: cdcwonderpy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef95dc6f014fa355b4b6625df66928efaea14863ea3738f9c7d6f6df656bb5c8 |
|
MD5 | f99a7a319fd04ed636149731f62502e9 |
|
BLAKE2b-256 | 4b5e07b2de385089d6cc63e5b21595ef1e70e0c183c16f91421a1a43fead54c1 |