cdcfluview icon indicating copy to clipboard operation
cdcfluview copied to clipboard

Hospital API change

Open IMcGovern-Seqirus opened this issue 3 years ago • 3 comments

The api used to retrieve hospital data in this package is still functional, but doesn't return data past the 2019-2020 season. The hospital data in the website is now being returned from a different request URL (https://gis.cdc.gov/GRASP/Flu3/PostPhase03DataTool). HTTP post request would need to be updated to retrieve current hospital data.

IMcGovern-Seqirus avatar Nov 10 '22 21:11 IMcGovern-Seqirus

Hey! Apologies for the late reply. When you get a sec, can you test the latest from this GitHub main branch? It was a quick hack fix and the data frame returned likely doesn't match the previous return 100%. Just need confirmation it's getting you the data you need. #ty

hrbrmstr avatar Nov 22 '22 17:11 hrbrmstr

After installing from the github repo, I got the error that 'res' was not found, but changing 'res$default_data' in line 47 of the hospital file to 'meta$default_data' resolves the issue and returns the expected data. Appreciate the update/ all the work you have done on this package!

FYI - as an aside this package contributed to this recent editors choice paper in Clinical Infectious Diseases and is cited in the supplement: https://doi.org/10.1093/cid/ciac653

IMcGovern-Seqirus avatar Nov 29 '22 00:11 IMcGovern-Seqirus

First, thanks for all your work on this package. It is essential to a lot of work that I do. It seems as though the CRAN version hospitalization function still doesn't work (and neither does version 1.0.0.9000 on this GitHub), but the modification proposed by @vpnagraj does fix the issue. Any possibility that we can get weekly updated hospitalization numbers as are published on the CDC weekly influenza report? They seem to be publishing to: https://www.cdc.gov/flu/weekly/weeklyarchives2022-2023/data/ProtectData**.csv where ** is the week number of the year.

dwchal avatar Sep 11 '23 16:09 dwchal