In data-raw/USASpendingData.R, the date_last_modified variable scrubs a download link from the following site:
See here for the last non-404 crawl for comparison. This URL appears to have moved to:
This new site requires login credentials to view the downloads, rendering this path somewhat moot (i.e., the download file name was used to pull the last modified date).
|
notes <- readLines("https://files.usaspending.gov/database_download") |
It seems that USASpending.gov is moving towards an API (e.g., https://api.usaspending.gov/docs/endpoints). I haven't gone through all the logic to see how challenging it is to reproduce the massive CSV records using their API calls. For now, a quick fix is to skip the last date modified website scrub (e.g., and use data_date), which seems to correspond with the zip file that's downloaded.
In data-raw/USASpendingData.R, the
date_last_modifiedvariable scrubs a download link from the following site:See here for the last non-404 crawl for comparison. This URL appears to have moved to:
This new site requires login credentials to view the downloads, rendering this path somewhat moot (i.e., the download file name was used to pull the last modified date).
stateior/data-raw/USASpendingData.R
Line 29 in fc60e11
It seems that USASpending.gov is moving towards an API (e.g., https://api.usaspending.gov/docs/endpoints). I haven't gone through all the logic to see how challenging it is to reproduce the massive CSV records using their API calls. For now, a quick fix is to skip the last date modified website scrub (e.g., and use
data_date), which seems to correspond with the zip file that's downloaded.