Skip to content

Commit

Permalink
updates examples
Browse files Browse the repository at this point in the history
  • Loading branch information
xenatisch committed Apr 22, 2021
1 parent 1cd98ed commit 2f52669
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
16 changes: 8 additions & 8 deletions docs/source/pages/examples/general_use.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ In the case of this example, the metrics are as follows:

- ``newCasesByPublishDate``: New cases (by publish date)
- ``cumCasesByPublishDate``: Cumulative cases (by publish date)
- ``newDeathsByDeathDate``: New deaths (by death date)
- ``cumDeathsByDeathDate``: Cumulative deaths (by death date)
- ``newDeaths28DaysByDeathDate``: New deaths (by death date)
- ``cumDeaths28DaysByDeathDate``: Cumulative deaths (by death date)

In its simplest form, we construct the structure as follows:

Expand All @@ -53,8 +53,8 @@ In its simplest form, we construct the structure as follows:
"areaCode": "areaCode",
"newCasesByPublishDate": "newCasesByPublishDate",
"cumCasesByPublishDate": "cumCasesByPublishDate",
"newDeathsByDeathDate": "newDeathsByDeathDate",
"cumDeathsByDeathDate": "cumDeathsByDeathDate"
"newDeaths28DaysByDeathDate": "newDeaths28DaysByDeathDate",
"cumDeaths28DaysByDeathDate": "cumDeaths28DaysByDeathDate"
}
Expand Down Expand Up @@ -92,17 +92,17 @@ or ``.get_dataframe()`` methods:
'areaCode': 'E92000001',
'newCasesByPublishDate': 547,
'cumCasesByPublishDate': 259022,
'newDeathsByDeathDate': None,
'cumDeathsByDeathDate': None
'newDeaths28DaysByDeathDate': None,
'cumDeaths28DaysByDeathDate': None
},
{
'date': '2020-07-27',
'areaName': 'England',
'areaCode': 'E92000001',
'newCasesByPublishDate': 616,
'cumCasesByPublishDate': 258475,
'newDeathsByDeathDate': 20,
'cumDeathsByDeathDate': 41282
'newDeaths28DaysByDeathDate': 20,
'cumDeaths28DaysByDeathDate': 41282
},
...
],
Expand Down
20 changes: 10 additions & 10 deletions docs/source/pages/examples/latest_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ the ``structure``. A list of metrics is available on the `Developers Guide`_ web
"areaCode": "areaCode",
"newCasesByPublishDate": "newCasesByPublishDate",
"cumCasesByPublishDate": "cumCasesByPublishDate",
"newDeathsByDeathDate": "newDeathsByDeathDate",
"cumDeathsByDeathDate": "cumDeathsByDeathDate"
"newDeaths28DaysByDeathDate": "newDeaths28DaysByDeathDate",
"cumDeaths28DaysByDeathDate": "cumDeaths28DaysByDeathDate"
}
api = Cov19API(
Expand All @@ -61,35 +61,35 @@ the ``structure``. A list of metrics is available on the `Developers Guide`_ web
"areaCode": "E92000001",
"newCasesByPublishDate": 547,
"cumCasesByPublishDate": 259022,
"newDeathsByDeathDate": None,
"cumDeathsByDeathDate": None
"newDeaths28DaysByDeathDate": None,
"cumDeaths28DaysByDeathDate": None
},
{
"date": "2020-07-28",
"areaName": "Northern Ireland",
"areaCode": "N92000002",
"newCasesByPublishDate": 9,
"cumCasesByPublishDate": 5921,
"newDeathsByDeathDate": None,
"cumDeathsByDeathDate": None
"newDeaths28DaysByDeathDate": None,
"cumDeaths28DaysByDeathDate": None
},
{
"date": "2020-07-28",
"areaName": "Scotland",
"areaCode": "S92000003",
"newCasesByPublishDate": 4,
"cumCasesByPublishDate": 18558,
"newDeathsByDeathDate": None,
"cumDeathsByDeathDate": None
"newDeaths28DaysByDeathDate": None,
"cumDeaths28DaysByDeathDate": None
},
{
"date": "2020-07-28",
"areaName": "Wales",
"areaCode": "W92000004",
"newCasesByPublishDate": 21,
"cumCasesByPublishDate": 17191,
"newDeathsByDeathDate": None,
"cumDeathsByDeathDate": None
"newDeaths28DaysByDeathDate": None,
"cumDeaths28DaysByDeathDate": None
}
],
"lastUpdate": "2020-07-28T15:34:31.000000Z",
Expand Down
6 changes: 3 additions & 3 deletions docs/source/pages/examples/pandas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Pandas ``DataFrame`` object.
"areaCode": "areaCode",
"newCasesByPublishDate": "newCasesByPublishDate",
"cumCasesByPublishDate": "cumCasesByPublishDate",
"newDeathsByDeathDate": "newDeathsByDeathDate",
"cumDeathsByDeathDate": "cumDeathsByDeathDate"
"newDeaths28DaysByDeathDate": "newDeaths28DaysByDeathDate",
"cumDeaths28DaysByDeathDate": "cumDeaths28DaysByDeathDate"
}
api = Cov19API(
Expand All @@ -38,7 +38,7 @@ Pandas ``DataFrame`` object.
::

date areaName areaCode newCasesByPublishDate cumCasesByPublishDate newDeathsByDeathDate cumDeathsByDeathDate
date areaName areaCode newCasesByPublishDate cumCasesByPublishDate newDeaths28DaysByDeathDate cumDeaths28DaysByDeathDate
0 2020-08-08 England E92000001 679 267324.0 None None
1 2020-08-08 Northern Ireland N92000002 0 NaN None None
2 2020-08-08 Scotland S92000003 60 18950.0 None None
Expand Down
6 changes: 3 additions & 3 deletions docs/source/pages/examples/saving.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ methods.
"areaCode": "areaCode",
"newCasesByPublishDate": "newCasesByPublishDate",
"cumCasesByPublishDate": "cumCasesByPublishDate",
"newDeathsByDeathDate": "newDeathsByDeathDate",
"cumDeathsByDeathDate": "cumDeathsByDeathDate"
"newDeaths28DaysByDeathDate": "newDeaths28DaysByDeathDate",
"cumDeaths28DaysByDeathDate": "cumDeaths28DaysByDeathDate"
}
api = Cov19API(
Expand All @@ -47,7 +47,7 @@ contents of the file would be as follows:

::

date,areaName,areaCode,newCasesByPublishDate,cumCasesByPublishDate,newDeathsByDeathDate,cumDeathsByDeathDate
date,areaName,areaCode,newCasesByPublishDate,cumCasesByPublishDate,newDeaths28DaysByDeathDate,cumDeaths28DaysByDeathDate
2020-07-28,England,E92000001,547,259022,,
2020-07-28,Northern Ireland,N92000002,9,5921,,
2020-07-28,Scotland,S92000003,4,18558,,
Expand Down
4 changes: 2 additions & 2 deletions docs/source/pages/examples/timestamps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Latest API timestamp
"areaCode": "areaCode",
"newCasesByPublishDate": "newCasesByPublishDate",
"cumCasesByPublishDate": "cumCasesByPublishDate",
"newDeathsByDeathDate": "newDeathsByDeathDate",
"cumDeathsByDeathDate": "cumDeathsByDeathDate"
"newDeaths28DaysByDeathDate": "newDeaths28DaysByDeathDate",
"cumDeaths28DaysByDeathDate": "cumDeaths28DaysByDeathDate"
}
england_only = [
Expand Down

0 comments on commit 2f52669

Please sign in to comment.