Skip to content

Commit bd4d722

Browse files
authored
Merge pull request #45 from cmu-delphi/upd-doc
docs: adds parameter descriptions for endpoints and incorporates the latest epidatr docs updates
2 parents c8ae8e8 + e7ed7c2 commit bd4d722

File tree

7 files changed

+1171
-35
lines changed

7 files changed

+1171
-35
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# Add any Sphinx extension module names here, as strings. They can be
3232
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3333
# ones.
34-
extensions = ["sphinx.ext.autodoc", "sphinx_autodoc_typehints", "nbsphinx"]
34+
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx_autodoc_typehints", "nbsphinx"]
3535

3636
# Add any paths that contain templates here, relative to this directory.
3737
templates_path = ["_templates"]

docs/epidatpy.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
epidatpy Reference
2-
================
2+
==================
33

44
.. toctree::
55
:maxdepth: 4
@@ -13,7 +13,7 @@ epidatpy.request module
1313
:show-inheritance:
1414

1515
epidatpy._endpoints module
16-
-----------------------
16+
--------------------------
1717

1818
.. automodule:: epidatpy._endpoints
1919
:members:

docs/getting_started.ipynb

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,65 @@
181181
").df()"
182182
]
183183
},
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+
},
184243
{
185244
"cell_type": "markdown",
186245
"metadata": {},
@@ -234,9 +293,9 @@
234293
"\n",
235294
"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",
236295
"\n",
237-
"For endpoints that report US data, see the\n",
296+
"For the main endpoints that report US data, see the\n",
238297
"[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",
240299
"\n",
241300
"## International data\n",
242301
"\n",

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Note that for the time being, the private endpoints (i.e. those prefixed with
4545
``pvt``) will require additional permissions (contact us for more information).
4646

4747
Documentation Contents
48-
===============
48+
======================
4949

5050
.. toctree::
5151
:maxdepth: 1

0 commit comments

Comments
 (0)