Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Historical Trends Data #82

Open
howardbaik opened this issue Mar 19, 2024 · 1 comment
Open

Historical Trends Data #82

howardbaik opened this issue Mar 19, 2024 · 1 comment

Comments

@howardbaik
Copy link

howardbaik commented Mar 19, 2024

Do we have a function to extract "Historical Trends" data? For ex, https://statecancerprofiles.cancer.gov/historicaltrend/index.php?0&9953&999&7599&001&001&28&0&0&0&1&1&1&1#results

The URL to "Export Data" on the "Historical Trends" page is not pretty, to say the least: https://statecancerprofiles.cancer.gov/historicaltrend/data.php/historicaltrend.csv?0&9953&999&7599&001&001&00&0&0&0&2&0&1&1&6.

If we don't have a function already, I'm not sure how to use httr2 to grab this data. I may have to scrape this data using rvest.

@realbp
Copy link
Contributor

realbp commented Mar 19, 2024

We do not have a function for historical trends, although this is something that Sean and I discussed in the past but have not prioritized yet. I think it is possible to use httr2 to get the data, the numbers in the url are the same numbers in the "handle_X" functions used to code race, sex, FIPS, etc but this has not be fully decoded yet.

@seankross any thoughts on if we should explore this again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants