Skip to content

Commit

Permalink
Update snapshot-nhsn-data.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
elray1 authored Dec 26, 2024
1 parent 373cc23 commit fc10e88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/snapshot-nhsn-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
run: echo "FILE_NAME=nhsn-$(date +'%Y-%m-%d').csv" >> $GITHUB_ENV

- name: Snapshot NHSN data
run: Rscript -e "nhsn_data <- RSocrata::read.socrata('https://data.cdc.gov/resource/mpgq-jmmr.csv'); print(nhsn_data);
nhsn_data <- nhsn_data[c('jurisdiction', 'weekendingdate', 'totalconfflunewadm', 'totalconfc19newadm')]; print(nhsn_data);
nhsn_data$weekendingdate <- substr(nhsn_data$weekendingdate, 1, 10); print(nhsn_data);
colnames(nhsn_data) <- c('Geographic aggregation', 'Week Ending Date', 'Total Influenza Admissions', 'Total COVID-19 Admissions'); print(nhsn_data);
run: Rscript -e "nhsn_data <- RSocrata::read.socrata('https://data.cdc.gov/resource/mpgq-jmmr.csv'); print(head(nhsn_data));
nhsn_data <- nhsn_data[c('jurisdiction', 'weekendingdate', 'totalconfflunewadm', 'totalconfc19newadm')]; print(head(nhsn_data));
nhsn_data$weekendingdate <- substr(nhsn_data$weekendingdate, 1, 10); print(head(nhsn_data));
colnames(nhsn_data) <- c('Geographic aggregation', 'Week Ending Date', 'Total Influenza Admissions', 'Total COVID-19 Admissions'); print(head(nhsn_data));
write.csv(nhsn_data, file = '$FILE_NAME', row.names = FALSE)"
env:
FILE_NAME: ${{ env.FILE_NAME }}
Expand Down

0 comments on commit fc10e88

Please sign in to comment.