You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/covid_hosp.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,14 @@ parent: Epidata API (Other Diseases)
6
6
# COVID-19 Hospitalization by State
7
7
8
8
This data source is a mirror of the "COVID-19 Reported Patient Impact and
9
-
Hospital Capacity by State Timeseries" and "COVID-19 Reported Patient Impact and
9
+
Hospital Capacity by State Timeseries" and "COVID-19 Reported Patient Impact and
10
10
Hospital Capacity by State" datasets provided by the US Department of
11
11
Health & Human Services via healthdata.gov. The latter provides more frequent updates,
12
12
so it is combined with the former to create a single dataset which is as recent as possible.
13
13
14
14
For more information, see the
15
15
[official description and data dictionary at healthdata.gov](https://healthdata.gov/Hospital/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/g62h-syeh)
16
-
for "COVID-19 Reported Patient Impact and Hospital Capacity by State Timeseries,"
16
+
for "COVID-19 Reported Patient Impact and Hospital Capacity by State Timeseries,"
17
17
as well as the [official description](https://healthdata.gov/dataset/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/6xf2-c3ie)
18
18
for "COVID-19 Reported Patient Impact and Hospital Capacity by State."
19
19
@@ -72,7 +72,7 @@ If `issues` is not specified, then the most recent issue is used by default.
Libraries are available for [CoffeeScript](../../src/client/delphi_epidata.coffee), [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
146
+
Libraries are available for [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
147
147
The following sample shows how to import the library and fetch MA on 2020-05-10
Libraries are available for [CoffeeScript](../../src/client/delphi_epidata.coffee), [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
193
+
Libraries are available for [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
194
194
The following sample shows how to import the library and fetch Moses Taylor
195
195
Hospital (Scranton, PA) on the first collection week of December 2020 (per most
Libraries are available for [CoffeeScript](../../src/client/delphi_epidata.coffee), [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
102
+
Libraries are available for [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
103
103
The following sample shows how to import the library and fetch facilities in
Copy file name to clipboardExpand all lines: docs/api/covidcast.md
+33-9Lines changed: 33 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ nav_order: 1
9
9
This is the documentation for accessing Delphi's COVID-19 indicators via the `covidcast` endpoint of [Delphi](https://delphi.cmu.edu/)'s
10
10
epidemiological data API. This API provides data on the spread and impact of the COVID-19 pandemic across the United States, most of which is available at the
11
11
county level and updated daily. This data powers our public [COVIDcast
12
-
map](https://covidcast.cmu.edu/) which includes testing, cases, and death data,
12
+
map](https://delphi.cmu.edu/covidcast/) which includes testing, cases, and death data,
13
13
as well as unique healthcare and survey data Delphi acquires through its
14
14
partners. The API allows users to select specific signals and download data for
|`epidata[].time_value`| time unit (e.g. date) over which underlying events happened (see [date coding details](covidcast_times.md)) | integer |
165
-
|`epidata[].direction`| trend classifier (+1 -> increasing, 0 -> steady or not determined, -1 -> decreasing) | integer |
166
168
|`epidata[].value`| value (statistic) derived from the underlying data source | float |
167
169
|`epidata[].stderr`| approximate standard error of the statistic with respect to its sampling distribution, `null` when not applicable | float |
170
+
|`epidata[].direction`| trend classifier (+1 -> increasing, 0 -> steady or not determined, -1 -> decreasing) | integer |
168
171
|`epidata[].sample_size`| number of "data points" used in computing the statistic, `null` when not applicable | float |
169
172
|`epidata[].issue`| time unit (e.g. date) when this statistic was published | integer |
170
173
|`epidata[].lag`| time delta (e.g. days) between when the underlying events happened and when this statistic was published | integer |
@@ -179,11 +182,32 @@ returned, but not all of the results you requested. API clients should check the
179
182
results code and consider breaking up requests for e.g. large time intervals into multiple
180
183
API calls.
181
184
185
+
### Alternative Response Formats
186
+
187
+
In addition to the default EpiData Response format, users can customize the response format using the `format=` parameter.
188
+
189
+
#### JSON List Response
190
+
191
+
When setting the format parameter to `format=json`, it will return a plain list of the `epidata` response objects without the `result` and `message` wrapper. The status of the query is returned via HTTP status codes. For example, a status code of 200 means the query succeeded, while 400 indicates that the query has a missing, misspelled, or otherwise invalid parameter. For all status codes != 200, the returned JSON includes details about what part of the query couldn't be interpreted.
192
+
193
+
#### CSV File Response
194
+
195
+
When setting the format parameter to `format=csv`, it will return a CSV file with same columns as the response objects. HTTP status codes are used to communicate success/failure, similar to `format=json`.
196
+
197
+
#### JSON New Lines Response
198
+
199
+
When setting the format parameter to `format=jsonl`, it will return each row as an JSON file separated by a single new line character `\n`. This format is useful for incremental streaming of the results. Similar to the JSON list response status codes are used.
200
+
201
+
### Limit Returned Fields
202
+
203
+
The `fields` parameter can be used to limit which fields are included in each returned row. This is useful in web applications to reduce the amount of data transmitted. The `fields` parameter supports two syntaxes: allow and deny. Using allowlist syntax, only the listed fields will be returned. For example, `fields=geo_value,value` will drop all fields from the returned data except for `geo_value` and `value`. To use denylist syntax instead, prefix each field name with a dash (-) to exclude it from the results. For example, `fields=-direction` will include all fields in the returned data except for the `direction` field.
204
+
205
+
182
206
## Example URLs
183
207
184
208
### Facebook Survey CLI on 2020-04-06 to 2010-04-10 (county 06001)
Libraries are available for [CoffeeScript](../../src/client/delphi_epidata.coffee), [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
76
+
Libraries are available for [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
77
77
The following samples show how to import the library and fetch Delphi's COVID-19 Surveillance Streams metadata.
0 commit comments