Skip to content

Commit 27e5b93

Browse files
authored
Merge pull request #2 from cmu-delphi/main
sync
2 parents 2834e3a + 64f96f8 commit 27e5b93

33 files changed

+959
-54
lines changed

docs/api/covidcast-signals/_source-template.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ grand_parent: COVIDcast Epidata API
1212
* **Number of data revisions since 19 May 2020:** 0
1313
* **Date of last change:** Never
1414
* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
15+
* **Time type:** day (see [date format docs](../covidcast_times.md))
1516
* **License:** [LICENSE NAME](../covidcast_licensing.md#APPLICABLE-SECTION)
1617

1718
A brief description of what this source measures.

docs/api/covidcast-signals/chng.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ grand_parent: COVIDcast Epidata API
1212
* **Number of data revisions since 19 May 2020:** 0
1313
* **Date of last change:** Never
1414
* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
15+
* **Time type:** day (see [date format docs](../covidcast_times.md))
1516
* **License:** [CC BY-NC](../covidcast_licensing.md#creative-commons-attribution-noncommercial)
1617

1718
This data source is based on Change Healthcare claims data that has been

docs/api/covidcast-signals/doctor-visits.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ grand_parent: COVIDcast Epidata API
1111
* **Number of data revisions since 19 May 2020:** 1
1212
* **Date of last change:** 9 November 2020
1313
* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
14+
* **Time type:** day (see [date format docs](../covidcast_times.md))
1415
* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
1516

1617
This data source is based on information about outpatient visits, provided to us

docs/api/covidcast-signals/fb-survey.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ grand_parent: COVIDcast Epidata API
1111
* **Number of data revisions since 19 May 2020:** 1
1212
* **Date of last change:** [3 June 2020](../covidcast_changelog.md#fb-survey)
1313
* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
14+
* **Time type:** day (see [date format docs](../covidcast_times.md))
1415
* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
1516

1617
This data source is based on symptom surveys run by the Delphi group at Carnegie

docs/api/covidcast-signals/ght.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ grand_parent: COVIDcast Epidata API
1111
* **Number of data revisions since 19 May 2020:** 0
1212
* **Date of last change:** Never
1313
* **Available for:** dma, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
14+
* **Time type:** day (see [date format docs](../covidcast_times.md))
1415

1516
This data source (`ght`) is based on Google searches, provided to us by Google
1617
Health Trends. Using this search data, we estimate the volume of COVID-related

docs/api/covidcast-signals/google-survey.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ grand_parent: COVIDcast Epidata API
1111
* **Number of data revisions since 19 May 2020:** 0
1212
* **Date of last change:** Never
1313
* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
14+
* **Time type:** day (see [date format docs](../covidcast_times.md))
1415
* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
1516

1617
Data source based on Google-run symptom surveys, through publisher websites,

docs/api/covidcast-signals/google-symptoms.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ grand_parent: COVIDcast Epidata API
1212
* **Number of data revisions since 19 May 2020:** 0
1313
* **Date of last change:** Never
1414
* **Available for:** county, MSA, HRR, state (see [geography coding docs](../covidcast_geography.md))
15+
* **Time type:** day (see [date format docs](../covidcast_times.md))
1516
* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
1617

1718
This data source is based on the [COVID-19 Search Trends symptoms

docs/api/covidcast-signals/hospital-admissions.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ grand_parent: COVIDcast Epidata API
1212
* **Number of data revisions since 19 May 2020:** 1
1313
* **Date of last change:** 20 October 2020
1414
* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
15+
* **Time type:** day (see [date format docs](../covidcast_times.md))
1516
* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
1617

1718
This data source is based on electronic medical records and claims data about

docs/api/covidcast-signals/indicator-combination.md

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ calculated or composed by Delphi. It is not a primary data source.
2424
* **Number of data revisions since 19 May 2020:** 1
2525
* **Date of last change:** [3 June 2020](../covidcast_changelog.md#indicator-combination)
2626
* **Available for:** county, msa, state (see [geography coding docs](../covidcast_geography.md))
27+
* **Time type:** day (see [date format docs](../covidcast_times.md))
2728
* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
2829

2930
These signals combine Delphi's indicators---*not* including cases and deaths,
@@ -204,6 +205,7 @@ The resampling method for each input source is as follows:
204205
* **Number of data revisions since 19 May 2020:** 1
205206
* **Date of last change:** [12 October 2020](../covidcast_changelog.md#indicator-combination)
206207
* **Available for:** county, msa, hrr, state (see [geography coding docs](../covidcast_geography.md))
208+
* **Time type:** day (see [date format docs](../covidcast_times.md))
207209

208210
These signals combine the cases and deaths data from JHU and USA Facts. This is
209211
a straight composition: the signals below use the [JHU signal data](jhu-csse.md)

docs/api/covidcast-signals/jhu-csse.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ grand_parent: COVIDcast Epidata API
1111
* **Number of data revisions since 19 May 2020:** 1
1212
* **Date of last change:** [7 October 2020](../covidcast_changelog.md#jhu-csse)
1313
* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
14+
* **Time type:** day (see [date format docs](../covidcast_times.md))
1415
* **License:** [CC BY](#source-and-licensing)
1516

1617
This data source of confirmed COVID-19 cases and deaths is based on reports made

docs/api/covidcast-signals/nchs-mortality.md

+18-11
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ grand_parent: COVIDcast Epidata API
1212
* **Number of data revisions since 19 May 2020:** 0
1313
* **Date of last change:** Never
1414
* **Available for:** state (see [geography coding docs](../covidcast_geography.md))
15+
* **Time type:** week (see [date format docs](../covidcast_times.md))
1516
* **License:** [NCHS Data Use Agreement](https://www.cdc.gov/nchs/data_access/restrictions.htm)
1617

1718
This data source of national provisional death counts is based on death
1819
certificate data received and coded by the National Center for Health Statistics
19-
[(NCHS)](https://www.cdc.gov/nchs/nvss/vsrr/COVID19/index.htm).
20+
[(NCHS)](https://www.cdc.gov/nchs/nvss/vsrr/COVID19/index.htm). This data is
21+
different from the death data available from [USAFacts](usa-facts.md) and [JHU
22+
CSSE](jhu-csse.md): deaths are reported by the date they occur, not the date
23+
they are reported by local health departments, and data is frequently reissued
24+
as additional death certificates from recent weeks are received and tabulated.
2025

2126
| Signal | Description |
2227
| --- | --- |
@@ -34,6 +39,14 @@ certificate data received and coded by the National Center for Health Statistics
3439
|`deaths_pneumonia_or_flu_or_covid_incidence_prop`| Number of weekly new deaths involving Pneumonia, Influenza, or COVID-19, per 100,000 population|
3540
|`deaths_percent_of_expected`| Number of weekly new deaths for all causes in 2020 compared to the average number across the same week in 2017–2019|
3641

42+
## Table of contents
43+
{: .no_toc .text-delta}
44+
45+
1. TOC
46+
{:toc}
47+
48+
## Calculation
49+
3750
These signals are taken directly from [Table
3851
1](https://www.cdc.gov/nchs/nvss/vsrr/COVID19/index.htm) without
3952
changes. National provisional death counts include deaths occurring within the
@@ -45,12 +58,6 @@ considered for each signals are described in detail
4558
[here](https://github.com/cmu-delphi/covidcast-indicators/blob/main/nchs_mortality/DETAILS.md#metrics-level-1-m1). We
4659
export the state-level data as-is in a weekly format.
4760

48-
## Table of contents
49-
{: .no_toc .text-delta}
50-
51-
1. TOC
52-
{:toc}
53-
5461
## Geographical Exceptions
5562

5663
New York City is listed as its own region in the NCHS Mortality data, but
@@ -59,8 +66,8 @@ York State in our reports.
5966

6067
## Report Using Epiweeks
6168

62-
We report the NCHS Mortality data in a weekly format (`time_type=week` \&
63-
`time_value=\{YYYYWW\}`, where `YYYYWW` refers to an epiweek). The CDC defines
69+
We report the NCHS Mortality data in a weekly format (`time_type=week` &
70+
`time_value={YYYYWW}`, where `YYYYWW` refers to an epiweek). The CDC defines
6471
the [epiweek](https://wwwn.cdc.gov/nndss/document/MMWR_Week_overview.pdf) as
6572
seven days, from Sunday to Saturday. We check the week-ending dates provided in
6673
the NCHS morality data and use Python package
@@ -79,7 +86,7 @@ potentially misleading.
7986

8087
There is a lag in time between when the death occurred and when the death
8188
certificate is completed, submitted to NCHS, and processed for reporting
82-
purposes. The death counts for earlier weeks are continually revised and may
89+
purposes. The death counts for recent weeks are continually revised and may
8390
increase or decrease as new and updated death certificate data are received from
8491
the states by NCHS. This delay can range from 1 to 8 weeks or even more.
8592
Some states report deaths on a daily basis, while other states report deaths weekly
@@ -95,7 +102,7 @@ and is made available here as a convenience to the forecasting community under
95102
the terms of the original license. The NCHS places restrictions on how this
96103
dataset may be used: you may not attempt to identify any individual included in
97104
the data, whether by itself or through linking to other
98-
individually=identifiable data; you may only use the dataset for statistical
105+
individually identifiable data; you may only use the dataset for statistical
99106
reporting and analysis. The full text of the [NCHS Data Use
100107
Agreement](https://www.cdc.gov/nchs/data_access/restrictions.htm) is available
101108
from their website.

docs/api/covidcast-signals/quidel.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ grand_parent: COVIDcast Epidata API
2121
* **Number of data revisions since 19 May 2020:** 1
2222
* **Date of last change:** 22 October 2020
2323
* **Available for:** hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
24+
* **Time type:** day (see [date format docs](../covidcast_times.md))
2425
* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
2526

2627
Data source based on COVID-19 Antigen tests, provided to us by Quidel, Inc. When
@@ -140,6 +141,7 @@ June 14th and subsequently revised on June 16th.
140141
* **Number of data revisions since 19 May 2020:** 0
141142
* **Date of last change:** Never
142143
* **Available for:** msa, state (see [geography coding docs](../covidcast_geography.md))
144+
* **Time type:** day (see [date format docs](../covidcast_times.md))
143145

144146
Data source based on flu lab tests, provided to us by Quidel, Inc. When a
145147
patient (whether at a doctor’s office, clinic, or hospital) has COVID-like

docs/api/covidcast-signals/safegraph.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ grand_parent: COVIDcast Epidata API
88
{: .no_toc}
99
* **Source name:** `safegraph`
1010
* **Available for:** county, MSA, HRR, state (see [geography coding docs](../covidcast_geography.md))
11+
* **Time type:** day (see [date format docs](../covidcast_times.md))
1112
* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
1213

1314
This data source uses data reported by [SafeGraph](https://www.safegraph.com/)

docs/api/covidcast-signals/usa-facts.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ grand_parent: COVIDcast Epidata API
1111
* **Number of data revisions since 19 May 2020:** 2
1212
* **Date of last change:** [3 November 2020](../covidcast_changelog.md#usa-facts)
1313
* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
14+
* **Time type:** day (see [date format docs](../covidcast_times.md))
1415
* **License:** [CC BY](#source-and-licensing)
1516

1617
This data source of confirmed COVID-19 cases and deaths is based on reports made

docs/api/covidcast.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ and lists.
108108
| --- | --- | --- |
109109
| `data_source` | name of upstream data source (e.g., `doctor-visits` or `fb-survey`; [see full list](covidcast_signals.md)) | string |
110110
| `signal` | name of signal derived from upstream data (see notes below) | string |
111-
| `time_type` | temporal resolution of the signal (e.g., `day`, `week`) | string |
111+
| `time_type` | temporal resolution of the signal (e.g., `day`, `week`; see [date coding details](covidcast_times.md)) | string |
112112
| `geo_type` | spatial resolution of the signal (e.g., `county`, `hrr`, `msa`, `dma`, `state`) | string |
113113
| `time_values` | time unit (e.g., date) over which underlying events happened | `list` of time values (e.g., 20200401) |
114114
| `geo_value` | unique code for each location, depending on `geo_type` (see [geographic coding details](covidcast_geography.md)), or `*` for all | string |
@@ -164,7 +164,7 @@ require knowing when an unchanged value was last confirmed, please get in touch.
164164
| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
165165
| `epidata` | list of results, 1 per geo/time pair | array of objects |
166166
| `epidata[].geo_value` | location code, depending on `geo_type` | string |
167-
| `epidata[].time_value` | time unit (e.g. date) over which underlying events happened | integer |
167+
| `epidata[].time_value` | time unit (e.g. date) over which underlying events happened (see [date coding details](covidcast_times.md)) | integer |
168168
| `epidata[].direction` | trend classifier (+1 -> increasing, 0 -> steady or not determined, -1 -> decreasing) | integer |
169169
| `epidata[].value` | value (statistic) derived from the underlying data source | float |
170170
| `epidata[].stderr` | approximate standard error of the statistic with respect to its sampling distribution, `null` when not applicable | float |

docs/api/covidcast_geography.md

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ whose estimate is being reported. Estimates are available for several possible
2323
available
2424
[here](https://hub.arcgis.com/datasets/fedmaps::hospital-referral-regions). We
2525
report HRRs by their number (non-consecutive, between 1 and 457).
26+
* `hhs`: values that are accepted are the numbers 1-10, corresponding to the US [Department of Health & Human Services Regional Offices](https://www.hhs.gov/about/agencies/iea/regional-offices/index.html)
2627
* `msa`: Metropolitan Statistical Area, as defined by the Office of Management
2728
and Budget. The Census Bureau provides [detailed definitions of these
2829
regions](https://www.census.gov/programs-surveys/metro-micro/about.html). We
@@ -33,6 +34,7 @@ whose estimate is being reported. Estimates are available for several possible
3334
* `state`: The 50 states, identified by their two-digit postal abbreviation (in
3435
lower case). Estimates for Puerto Rico are available as state `pr`;
3536
Washington, D.C. is available as state `dc`.
37+
* `nation`: accepted values are the ISO 3166-1 alpha-2 [country codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently the only nation we have data on is `us`.
3638

3739
Some signals are not available for all `geo_type`s, since they may be reported
3840
by their original sources with different levels of aggregation.

docs/api/covidcast_inactive_signals.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Inactive Signals
33
parent: COVIDcast Epidata API
44
has_children: true
5-
nav_order: 6
5+
nav_order: 7
66
---
77

88
# COVIDcast Inactive Signals

docs/api/covidcast_meta.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Metadata
33
parent: COVIDcast Epidata API
4-
nav_order: 5
4+
nav_order: 6
55
---
66

77
# COVIDcast Metadata

docs/api/covidcast_times.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Date Coding and Revisions
3+
parent: COVIDcast Epidata API
4+
nav_order: 5
5+
---
6+
7+
# Date Coding and Revisions
8+
9+
Every observation in the COVIDcast Epidata API has two dates attached:
10+
11+
* `time_value`: The time the underlying events happened. For example, when a data
12+
source reports on COVID test results, the time value is the date the
13+
results were recorded by the testing provider.
14+
* `issue`: The date the estimates were *issued*. For example, a COVID test
15+
result might be recorded on October 1st, but it may take several days for
16+
that report to be collected, aggregated, received by Delphi, and added to our
17+
database. The *issue date* is when Delphi makes the data available.
18+
19+
For example, consider using our [doctor visits signal](covidcast-signals/doctor-visits.md),
20+
which estimates the percentage of outpatient doctor visits that are
21+
COVID-related, and consider a result row with `time_value = "2020-05-01"` for
22+
`geo_value = "pa"`. This is an estimate for the percentage in Pennsylvania on
23+
May 1, 2020, which was issued on May 5, 2020. The delay is due to the
24+
aggregation of data by our source and the time taken by the API to ingest the
25+
data provided. Later, the estimate for May 1st could be updated, perhaps because
26+
additional visit data from May 1st arrived at our source and was reported to us.
27+
This constitutes a new issue of the data, and would be reported with a new issue
28+
date.
29+
30+
The format of the `time_value` and `issue` dates depends on the `time_type` API
31+
parameter. Each data source is available for specified time types; check each
32+
source's documentation for details on supported time types.
33+
34+
The available time types include:
35+
36+
* `day`: A daily observation. The `time_value` and `issue` are both reported
37+
with year, month, and day in `YYYYMMDD` format. (The [API clients](covidcast_clients.md)
38+
convert this into convenient date objects.)
39+
* `week`: A weekly observation, recording events over 7 days. The `time_value`
40+
and `issue` are reported with a year and a week number ranging from 1 to 53,
41+
in `YYYYWW` format. These weeks are [MMWR
42+
weeks](https://wwwn.cdc.gov/nndss/document/MMWR_Week_overview.pdf) as defined
43+
by the National Notifiable Diseases Surveillance System, also known as
44+
"epiweeks". (The [API clients](covidcast_clients.md) convert these into date
45+
objects representing the first day of the MMWR week, and for those not using
46+
the clients, packages are available to convert MMWR weeks in many common
47+
programming languages.)

0 commit comments

Comments
 (0)