Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update examples to correct deaths field name #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/source/pages/examples/data_as_string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ methods if you wish to receive stringified JSON or XML entities:
"areaCode": "areaCode",
"newCasesByPublishDate": "newCasesByPublishDate",
"cumCasesByPublishDate": "cumCasesByPublishDate",
"newDeathsByDeathDate": "newDeathsByDeathDate",
"cumDeathsByDeathDate": "cumDeathsByDeathDate"
"newDeaths28DaysByDeathDate": "newDeaths28DaysByDeathDate",
"cumDeaths28DaysByDeathDate": "cumDeaths28DaysByDeathDate"
}

api = Cov19API(
Expand All @@ -37,7 +37,7 @@ methods if you wish to receive stringified JSON or XML entities:

::

JSON: {"data":[{"date":"2020-08-09","areaName":"England","areaCode":"E92000001","newCasesByPublishDate":988,"cumCasesByPublishDate":268312,"newDeathsByDeathDate":null,"cumDeathsByDeathDate":null},{"date":"2020-08-09","areaName":"Northern Ireland","areaCode":"N92000002","newCasesByPublishDate":0,"cumCasesByPublishDate":null,"newDeathsByDeathDate":null,"cumDeathsByDeathDate":null},{"date":"2020-08-09","areaName":"Scotland","areaCode":"S92000003","newCasesByPublishDate":48,"cumCasesByPublishDate":18998,"newDeathsByDeathDate":null,"cumDeathsByDeathDate":null},{"date":"2020-08-09","areaName":"Wales","areaCode":"W92000004","newCasesByPublishDate":26,"cumCasesByPublishDate":17451,"newDeathsByDeathDate":null,"cumDeathsByDeathDate":null}],"lastUpdate":"2020-08-09T17:56:52.000000Z","length":4,"totalPages":1}
XML: <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><data><date>2020-08-09</date><areaName>England</areaName><areaCode>E92000001</areaCode><newCasesByPublishDate>988</newCasesByPublishDate><cumCasesByPublishDate>268312</cumCasesByPublishDate><newDeathsByDeathDate xsi:nil="true" /><cumDeathsByDeathDate xsi:nil="true" /></data><data><date>2020-08-09</date><areaName>Northern Ireland</areaName><areaCode>N92000002</areaCode><newCasesByPublishDate>0</newCasesByPublishDate><cumCasesByPublishDate xsi:nil="true" /><newDeathsByDeathDate xsi:nil="true" /><cumDeathsByDeathDate xsi:nil="true" /></data><data><date>2020-08-09</date><areaName>Scotland</areaName><areaCode>S92000003</areaCode><newCasesByPublishDate>48</newCasesByPublishDate><cumCasesByPublishDate>18998</cumCasesByPublishDate><newDeathsByDeathDate xsi:nil="true" /><cumDeathsByDeathDate xsi:nil="true" /></data><data><date>2020-08-09</date><areaName>Wales</areaName><areaCode>W92000004</areaCode><newCasesByPublishDate>26</newCasesByPublishDate><cumCasesByPublishDate>17451</cumCasesByPublishDate><newDeathsByDeathDate xsi:nil="true" /><cumDeathsByDeathDate xsi:nil="true" /></data><lastUpdate>2020-08-09T17:56:52.000000Z</lastUpdate><length>4</length><totalPages>1</totalPages></document>
JSON: {"data":[{"date":"2020-08-09","areaName":"England","areaCode":"E92000001","newCasesByPublishDate":988,"cumCasesByPublishDate":268312,"newDeaths28DaysByDeathDate":null,"cumDeaths28DaysByDeathDate":null},{"date":"2020-08-09","areaName":"Northern Ireland","areaCode":"N92000002","newCasesByPublishDate":0,"cumCasesByPublishDate":null,"newDeaths28DaysByDeathDate":null,"cumDeaths28DaysByDeathDate":null},{"date":"2020-08-09","areaName":"Scotland","areaCode":"S92000003","newCasesByPublishDate":48,"cumCasesByPublishDate":18998,"newDeaths28DaysByDeathDate":null,"cumDeaths28DaysByDeathDate":null},{"date":"2020-08-09","areaName":"Wales","areaCode":"W92000004","newCasesByPublishDate":26,"cumCasesByPublishDate":17451,"newDeaths28DaysByDeathDate":null,"cumDeaths28DaysByDeathDate":null}],"lastUpdate":"2020-08-09T17:56:52.000000Z","length":4,"totalPages":1}
XML: <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><data><date>2020-08-09</date><areaName>England</areaName><areaCode>E92000001</areaCode><newCasesByPublishDate>988</newCasesByPublishDate><cumCasesByPublishDate>268312</cumCasesByPublishDate><newDeaths28DaysByDeathDate xsi:nil="true" /><cumDeaths28DaysByDeathDate xsi:nil="true" /></data><data><date>2020-08-09</date><areaName>Northern Ireland</areaName><areaCode>N92000002</areaCode><newCasesByPublishDate>0</newCasesByPublishDate><cumCasesByPublishDate xsi:nil="true" /><newDeaths28DaysByDeathDate xsi:nil="true" /><cumDeaths28DaysByDeathDate xsi:nil="true" /></data><data><date>2020-08-09</date><areaName>Scotland</areaName><areaCode>S92000003</areaCode><newCasesByPublishDate>48</newCasesByPublishDate><cumCasesByPublishDate>18998</cumCasesByPublishDate><newDeaths28DaysByDeathDate xsi:nil="true" /><cumDeaths28DaysByDeathDate xsi:nil="true" /></data><data><date>2020-08-09</date><areaName>Wales</areaName><areaCode>W92000004</areaCode><newCasesByPublishDate>26</newCasesByPublishDate><cumCasesByPublishDate>17451</cumCasesByPublishDate><newDeaths28DaysByDeathDate xsi:nil="true" /><cumDeaths28DaysByDeathDate xsi:nil="true" /></data><lastUpdate>2020-08-09T17:56:52.000000Z</lastUpdate><length>4</length><totalPages>1</totalPages></document>


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