Skip to content

Commit d86c143

Browse files
authored
Merge pull request #142 from nextstrain/update-case-counts
ingest/fetch-ncov-global-case-counts: Use new endpoint
2 parents 20cdd1d + 50dfa55 commit d86c143

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/update-ncov-case-counts.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
runtime: docker
4141
run: |
4242
nextstrain build \
43+
--env SLACK_TOKEN \
44+
--env SLACK_CHANNELS \
4345
ingest \
4446
upload_all_case_counts \
4547
--config s3_dst="$S3_DST"

ingest/bin/fetch-ncov-global-case-counts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
set -euo pipefail
33

44
# Fetch CSV from Our World in Data
5-
curl https://covid.ourworldindata.org/data/owid-covid-data.csv \
5+
curl https://catalog.ourworldindata.org/garden/covid/latest/compact/compact.csv \
66
--fail --silent --show-error --location \
77
--header 'User-Agent: https://github.com/nextstrain/counts ([email protected])' |
8-
# Only keep the date, location, and new_cases columns
9-
csvtk cut -f location,date,new_cases |
10-
# Rename new_cases to cases
11-
csvtk rename -f new_cases -n cases |
8+
# Only keep the date, country, and new_cases columns
9+
csvtk cut -f country,date,new_cases |
10+
# Rename new_cases to cases and country to location
11+
csvtk rename -f new_cases,country -n cases,location |
1212
# Only keep rows that have more than 0 cases
1313
csvtk filter -f "cases>0" |
1414
# Remove decimals from case counts

0 commit comments

Comments
 (0)