Skip to content

Commit c199403

Browse files
authored
add syntax feature documentation (#1256)
1 parent 01365a1 commit c199403

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/api/covidcast.md

+16
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@ and lists.
113113
The current set of signals available for each data source is returned by the
114114
[`covidcast_meta`](covidcast_meta.md) endpoint.
115115

116+
#### Alternate Required Parameters
117+
118+
The following parameters help specify multiple source-signal, timetype-timevalue or geotype-geovalue pairs. Use them instead of the usual required parameters.
119+
120+
| Parameter | Replaces | Format | Description | Example |
121+
| --- | --- | --- | --- | --- |
122+
| `signal` | `data_source`, `signal` | `signal={source}:{signal1},{signal2}` | Specify multiple source-signal pairs, grouped by source | `signal=src1:sig1`, `signal=src1:sig1,sig2`, `signal=src1:*`, `signal=src1:sig1;src2:sig3` |
123+
| `time` | `time_type`, `time_values` | `time={timetype}:{timevalue1},{timevalue2}` | Specify multiple timetype-timevalue pairs, grouped by timetype | `time=day:*`, `time=day:20201201`, `time=day:20201201,20201202`, `time=day:20201201-20201204` |
124+
| `geo` | `geo_type`, `geo_value` | `geo={geotype}:{geovalue1},{geovalue2}` | Specify multiple geotype-geovalue pairs, grouped by geotype | `geo=fips:*`, `geo=fips:04019`, `geo=fips:04019,19143`, `geo=fips:04019;msa:40660`, `geo=fips:*;msa:*` |
125+
116126
#### Optional
117127

118128
Estimates for a specific `time_value` and `geo_value` are sometimes updated
@@ -209,6 +219,12 @@ The `fields` parameter can be used to limit which fields are included in each re
209219

210220
https://api.delphi.cmu.edu/epidata/covidcast/?data_source=fb-survey&signal=smoothed_cli&time_type=day&geo_type=county&time_values=20200406-20200410&geo_value=06001
211221

222+
or
223+
224+
https://api.delphi.cmu.edu/epidata/covidcast/?signal=fb-survey:smoothed_cli&time=day:20200406-20200410&geo=county:06001
225+
226+
Both of these URLs are equivalent and can be used to get the following result:
227+
212228
```json
213229
{
214230
"result": 1,

0 commit comments

Comments
 (0)