Skip to content

Commit

Permalink
Update forecast visualization data workflow (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidari authored Dec 19, 2024
1 parent c75e490 commit b35fa1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 57 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/generate-forecast-visualization-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: '00 16 * * 4'

jobs:
update-viz-data:
update-visualization-data:
if: ${{ github.repository_owner == 'CDCgov' }}
runs-on: ubuntu-22.04
env:
Expand Down Expand Up @@ -38,8 +38,7 @@ jobs:
- name: generate data files
run: |
TODAY=$(date +'%Y-%m-%d')
#REF_DATE=$(date -d "$TODAY + 2 days" +'%Y-%m-%d') #uncomment after generating the files in CI for the week
REF_DATE="2024-12-14"
REF_DATE=$(Rscript -e "cat(strftime(lubridate::ceiling_date(lubridate::today(), 'week', week_start = 6, change_on_boundary = FALSE)))")
Rscript src/get_covid_hosp_data.R --reference_date "$REF_DATE" --base_hub_path "." --target_data FALSE
Rscript src/get_forecast_data.R --reference_date "$REF_DATE" --base_hub_path "." --horizons_to_include 0 1 2
Rscript src/get_map_data.R --reference_date "$REF_DATE" --base_hub_path "." --horizons_to_include 0 1 2
Expand All @@ -57,6 +56,6 @@ jobs:

- name: Create pull request
run: |
gh pr create --base main --head add-viz-data --title "Weekly foecast visualization data" --body "This PR adds weekly visualization data files to the repo."
gh pr create --base main --head add-viz-data --title "Weekly forecast visualization data" --body "This PR adds weekly visualization data files to the repo."
env:
GH_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
Loading

0 comments on commit b35fa1b

Please sign in to comment.