|
181 | 181 | ").df()" |
182 | 182 | ] |
183 | 183 | }, |
| 184 | + { |
| 185 | + "cell_type": "markdown", |
| 186 | + "metadata": {}, |
| 187 | + "source": [ |
| 188 | + "We can also request all versions of the data issued within a specific time range using the `issues` argument. `issues` can also take a single date.\n" |
| 189 | + ] |
| 190 | + }, |
| 191 | + { |
| 192 | + "cell_type": "code", |
| 193 | + "execution_count": null, |
| 194 | + "metadata": {}, |
| 195 | + "outputs": [], |
| 196 | + "source": [ |
| 197 | + "# See how the estimate for a SINGLE day (March 1, 2021) evolved\n", |
| 198 | + "# by fetching all issues reported between March and April 2021.\n", |
| 199 | + "epidata.pub_covidcast(\n", |
| 200 | + " data_source=\"fb-survey\",\n", |
| 201 | + " signals=\"smoothed_cli\",\n", |
| 202 | + " geo_type=\"state\",\n", |
| 203 | + " time_type=\"day\",\n", |
| 204 | + " geo_values=\"pa\",\n", |
| 205 | + " time_values=\"2021-03-01\",\n", |
| 206 | + " issues=EpiRange(\"2021-03-01\", \"2021-04-30\"),\n", |
| 207 | + ").df()" |
| 208 | + ] |
| 209 | + }, |
| 210 | + { |
| 211 | + "cell_type": "markdown", |
| 212 | + "metadata": {}, |
| 213 | + "source": [ |
| 214 | + "Finally, we can use the `lag` argument to request only data that was reported a certain number of days after the event.\n" |
| 215 | + ] |
| 216 | + }, |
| 217 | + { |
| 218 | + "cell_type": "code", |
| 219 | + "execution_count": null, |
| 220 | + "metadata": {}, |
| 221 | + "outputs": [], |
| 222 | + "source": [ |
| 223 | + "# Fetch survey data for January 2021, but ONLY include data\n", |
| 224 | + "# that was issued exactly 2 days after it was collected.\n", |
| 225 | + "epidata.pub_covidcast(\n", |
| 226 | + " data_source=\"fb-survey\",\n", |
| 227 | + " signals=\"smoothed_cli\",\n", |
| 228 | + " geo_type=\"state\",\n", |
| 229 | + " time_type=\"day\",\n", |
| 230 | + " geo_values=\"pa\",\n", |
| 231 | + " time_values=EpiRange(20210101, 20210131),\n", |
| 232 | + " lag=2,\n", |
| 233 | + ").df()" |
| 234 | + ] |
| 235 | + }, |
| 236 | + { |
| 237 | + "cell_type": "markdown", |
| 238 | + "metadata": {}, |
| 239 | + "source": [ |
| 240 | + "See detail notebook about [versioned data](versioned_data.ipynb) for details and more ways to specify versioned data.\n" |
| 241 | + ] |
| 242 | + }, |
184 | 243 | { |
185 | 244 | "cell_type": "markdown", |
186 | 245 | "metadata": {}, |
|
234 | 293 | "\n", |
235 | 294 | "Most data is only available for the US. Select endpoints report other countries at the national and/or regional levels. Endpoint descriptions explicitly state when they cover non-US locations.\n", |
236 | 295 | "\n", |
237 | | - "For endpoints that report US data, see the\n", |
| 296 | + "For the main endpoints that report US data, see the\n", |
238 | 297 | "[geographic coding documentation](https://cmu-delphi.github.io/delphi-epidata/api/covidcast_geography.html)\n", |
239 | | - "for available geographic levels.\n", |
| 298 | + "for available geographic levels. Documentation for the other endpoints is available [here](https://cmu-delphi.github.io/delphi-epidata/api/geographic_codes.html).\n", |
240 | 299 | "\n", |
241 | 300 | "## International data\n", |
242 | 301 | "\n", |
|
0 commit comments