diff --git a/README.md b/README.md index 7703aa2d..5e0a6ed7 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ __Sample response__ "id": 39, "country": "Norway", "country_code": "NO", + "continent_codes_set": {"EUR"}, "country_population": 5009150, "province": "", "county": "", @@ -175,6 +176,7 @@ __Sample response__ "id": 0, "country": "Thailand", "country_code": "TH", + "continent_codes_set": {"ASI"}, "country_population": 67089500, "province": "", "county": "", @@ -192,6 +194,7 @@ __Sample response__ { "id": 39, "country": "Norway", + "continent_codes_set": {"EUR"}, "country_code": "NO", "province": "", "county": "", @@ -224,8 +227,9 @@ __Response definitions__ | {locations}/{location}/{latest}/deaths | The up-to-date number of deaths related to the specific location | Integer | | {locations}/{location}/{latest}/recovered | The up-to-date number of recovered related to the specific location | Integer | | {locations}/{location}/id | The location id. This unique id is assigned to the location by the data-source. | Integer | -| {locations}/{location}/country | The Country name | String | -| {locations}/{location}/country_code | The [ISO alpha-2 country_code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Country code for the location. | String | +| {locations}/{location}/country | The country name | String | +| {locations}/{location}/country_code | The [ISO alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country. | String | +| {locations}/{location}/continent_codes_set | The List, in fact a set of alpha-3 continent codes of the country location. | List | | {locations}/{location}/province | The province where the location belongs to. (Used for US locations coming from __csbs data-source__.
__Empty__ when *jhu data-source* is used | String | | {locations}/{location}/{coordinates}/latitude | The location latitude | Float | | {locations}/{location}/{coordinates}/longitude | The location longitude | Float | @@ -254,6 +258,7 @@ __Sample Response__ "id": 16, "country": "Italy", "country_code": "IT", + "continent_codes_set": {"EUR"}, "country_population": 60340328, "province": "", "county": "", @@ -294,6 +299,7 @@ __Sample Response__ "id": 0, "country": "US", "country_code": "US", + "continent_codes_set": {"NAC"}, "country_population": 310232863, "province": "New York", "state": "New York", @@ -313,6 +319,7 @@ __Sample Response__ "id": 1, "country": "US", "country_code": "US", + "continent_codes_set": {"NAC"}, "country_population": 310232863, "province": "New York", "state": "New York", diff --git a/app/location/__init__.py b/app/location/__init__.py index 4782fddb..b624dfa7 100644 --- a/app/location/__init__.py +++ b/app/location/__init__.py @@ -1,5 +1,5 @@ from ..coordinates import Coordinates -from ..utils import countries +from ..utils import continents, countries from ..utils.populations import country_population @@ -26,12 +26,25 @@ def __init__(self, id, country, province, coordinates, last_updated, confirmed, @property def country_code(self): """ - Gets the alpha-2 code represention of the country. Returns 'XX' if none is found. + Gets the alpha-2 code representation of the country. Returns 'XX' if none is found. :returns: The country code. :rtype: str """ - return (countries.country_code(self.country) or countries.default_country_code).upper() + return countries.country_code(self.country) or countries.default_country_code + + @property + def continent_codes_set(self): + """ + Gets the alpha-3 code representations of the continent codes where the + country represented by the country code is located. Returns 'CCC' if + none is found. + + :returns: The list of continent codes. + :rtype: list + """ + country_code = countries.country_code(self.country) + return continents.continent_codes_set(country_code) or continents.default_continent_codes_set @property def country_population(self): @@ -55,6 +68,7 @@ def serialize(self): "id": self.id, "country": self.country, "country_code": self.country_code, + "continent_codes_set": self.continent_codes_set, "country_population": self.country_population, "province": self.province, # Coordinates. diff --git a/app/models/location.py b/app/models/location.py index 48fa4d74..239ca284 100644 --- a/app/models/location.py +++ b/app/models/location.py @@ -14,6 +14,7 @@ class Location(BaseModel): id: int country: str country_code: str + continent_codes_set: set = {} country_population: int = None province: str = "" county: str = "" diff --git a/app/router/v2/locations.py b/app/router/v2/locations.py index 2fde5c9e..dc8ac965 100644 --- a/app/router/v2/locations.py +++ b/app/router/v2/locations.py @@ -11,6 +11,7 @@ def get_locations( request: Request, source: Sources = "jhu", country_code: str = None, + continent_codes_set: list = {}, province: str = None, county: str = None, timelines: bool = False, diff --git a/app/services/location/jhu.py b/app/services/location/jhu.py index ef99dddc..aa8d5771 100644 --- a/app/services/location/jhu.py +++ b/app/services/location/jhu.py @@ -7,7 +7,7 @@ from ...coordinates import Coordinates from ...location import TimelinedLocation from ...timeline import Timeline -from ...utils import countries +from ...utils import continents, countries from ...utils import date as date_util from . import LocationService @@ -75,12 +75,15 @@ def get_category(category): # Latest data insert value. latest = list(history.values())[-1] + country_code = countries.country_code(country) + # Normalize the item and append to locations. locations.append( { # General info. "country": country, - "country_code": countries.country_code(country), + "country_code": country_code, + "continent_codes_set": list(continents.continent_codes_set(country_code)), "province": item["Province/State"], # Coordinates. "coordinates": {"lat": item["Lat"], "long": item["Long"],}, diff --git a/app/utils/continents.py b/app/utils/continents.py new file mode 100644 index 00000000..423e61d0 --- /dev/null +++ b/app/utils/continents.py @@ -0,0 +1,316 @@ +import logging +from itertools import chain + +from . import countries + +LOGGER = logging.getLogger(__name__) + +default_continent_code = "CCC" +default_continent_codes_set = {default_continent_code} + +# fmt: off +continent_names__continent_codes = { + "Africa" : "AFR", + "North America" : "NAC", # "NAM" clashes with "Namibia" + "Oceania" : "OCE", + "Antarctica" : "ANA", # "ANT" clashes with "Netherlands Antilles" + "Asia" : "ASI", + "Europe" : "EUR", + "South America" : "SAC", + "Others" : default_continent_code, + } + +country_code__continent_codes_set = { + "AF": {"ASI"}, + "XK": {"EUR"}, + "AL": {"EUR"}, + "AQ": {"ANA"}, + "DZ": {"AFR"}, + "AS": {"OCE"}, + "AD": {"EUR"}, + "AO": {"AFR"}, + "AG": {"NAC"}, + "AZ": {"EUR", "ASI"}, + "AR": {"SAC"}, + "AU": {"OCE"}, + "AT": {"EUR"}, + "BS": {"NAC"}, + "BH": {"ASI"}, + "BD": {"ASI"}, + "AM": {"EUR", "ASI"}, + "BB": {"NAC"}, + "BE": {"EUR"}, + "BM": {"NAC"}, + "BT": {"ASI"}, + "BO": {"SAC"}, + "BA": {"EUR"}, + "BW": {"AFR"}, + "BV": {"ANA"}, + "BR": {"SAC"}, + "BZ": {"NAC"}, + "IO": {"ASI"}, + "SB": {"OCE"}, + "VG": {"NAC"}, + "BN": {"ASI"}, + "BG": {"EUR"}, + "MM": {"ASI"}, + "BI": {"AFR"}, + "BY": {"EUR"}, + "KH": {"ASI"}, + "CM": {"AFR"}, + "CA": {"NAC"}, + "CV": {"AFR"}, + "KY": {"NAC"}, + "CF": {"AFR"}, + "LK": {"ASI"}, + "TD": {"AFR"}, + "CL": {"SAC"}, + "CN": {"ASI"}, + "TW": {"ASI"}, + "CX": {"ASI"}, + "CC": {"ASI"}, + "CO": {"SAC"}, + "KM": {"AFR"}, + "YT": {"AFR"}, + "CG": {"AFR"}, + "CD": {"AFR"}, + "CK": {"OCE"}, + "CR": {"NAC"}, + "HR": {"EUR"}, + "CU": {"NAC"}, + "CY": {"EUR", "ASI"}, + "CZ": {"EUR"}, + "BJ": {"AFR"}, + "DK": {"EUR"}, + "DM": {"NAC"}, + "DO": {"NAC"}, + "EC": {"SAC"}, + "SV": {"NAC"}, + "GQ": {"AFR"}, + "ET": {"AFR"}, + "ER": {"AFR"}, + "EE": {"EUR"}, + "FO": {"EUR"}, + "FK": {"SAC"}, + "GS": {"ANA"}, + "FJ": {"OCE"}, + "FI": {"EUR"}, + "AX": {"EUR"}, + "FR": {"EUR"}, + "GF": {"SAC"}, + "PF": {"OCE"}, + "TF": {"ANA"}, + "DJ": {"AFR"}, + "GA": {"AFR"}, + "GE": {"EUR", "ASI"}, + "GM": {"AFR"}, + "DE": {"EUR"}, + "GH": {"AFR"}, + "GI": {"EUR"}, + "KI": {"OCE"}, + "GR": {"EUR"}, + "GL": {"NAC"}, + "GD": {"NAC"}, + "GP": {"NAC"}, + "GU": {"OCE"}, + "GT": {"NAC"}, + "GN": {"AFR"}, + "GY": {"SAC"}, + "HT": {"NAC"}, + "HM": {"ANA"}, + "VA": {"EUR"}, + "HN": {"NAC"}, + "HK": {"ASI"}, + "HU": {"EUR"}, + "IS": {"EUR"}, + "IN": {"ASI"}, + "ID": {"ASI"}, + "IR": {"ASI"}, + "IQ": {"ASI"}, + "IE": {"EUR"}, + "IL": {"ASI"}, + "IT": {"EUR"}, + "CI": {"AFR"}, + "JM": {"NAC"}, + "JP": {"ASI"}, + "KZ": {"EUR", "ASI"}, + "JO": {"ASI"}, + "KE": {"AFR"}, + "KP": {"ASI"}, + "KR": {"ASI"}, + "KW": {"ASI"}, + "KG": {"ASI"}, + "LA": {"ASI"}, + "LB": {"ASI"}, + "LS": {"AFR"}, + "LV": {"EUR"}, + "LR": {"AFR"}, + "LY": {"AFR"}, + "LI": {"EUR"}, + "LT": {"EUR"}, + "LU": {"EUR"}, + "MO": {"ASI"}, + "MG": {"AFR"}, + "MW": {"AFR"}, + "MY": {"ASI"}, + "MV": {"ASI"}, + "ML": {"AFR"}, + "MT": {"EUR"}, + "MQ": {"NAC"}, + "MR": {"AFR"}, + "MU": {"AFR"}, + "MX": {"NAC"}, + "MC": {"EUR"}, + "MN": {"ASI"}, + "MD": {"EUR"}, + "ME": {"EUR"}, + "MS": {"NAC"}, + "MA": {"AFR"}, + "MZ": {"AFR"}, + "OM": {"ASI"}, + "NA": {"AFR"}, + "NR": {"OCE"}, + "NP": {"ASI"}, + "NL": {"EUR"}, + "AN": {"NAC"}, + "CW": {"NAC"}, + "AW": {"NAC"}, + "SX": {"NAC"}, + "BQ": {"NAC"}, + "NC": {"OCE"}, + "VU": {"OCE"}, + "NZ": {"OCE"}, + "NI": {"NAC"}, + "NE": {"AFR"}, + "NG": {"AFR"}, + "NU": {"OCE"}, + "NF": {"OCE"}, + "NO": {"EUR"}, + "MP": {"OCE"}, + "UM": {"OCE", "NAC"}, + "FM": {"OCE"}, + "MH": {"OCE"}, + "PW": {"OCE"}, + "PK": {"ASI"}, + "PS": {"ASI"}, + "PA": {"NAC"}, + "PG": {"OCE"}, + "PY": {"SAC"}, + "PE": {"SAC"}, + "PH": {"ASI"}, + "PN": {"OCE"}, + "PL": {"EUR"}, + "PT": {"EUR"}, + "GW": {"AFR"}, + "TL": {"ASI"}, + "PR": {"NAC"}, + "QA": {"ASI"}, + "RE": {"AFR"}, + "RO": {"EUR"}, + "RU": {"EUR", "ASI"}, + "RW": {"AFR"}, + "BL": {"NAC"}, + "SH": {"AFR"}, + "KN": {"NAC"}, + "AI": {"NAC"}, + "LC": {"NAC"}, + "MF": {"NAC"}, + "PM": {"NAC"}, + "VC": {"NAC"}, + "SM": {"EUR"}, + "ST": {"AFR"}, + "SA": {"ASI"}, + "SN": {"AFR"}, + "RS": {"EUR"}, + "SC": {"AFR"}, + "SL": {"AFR"}, + "SG": {"ASI"}, + "SK": {"EUR"}, + "VN": {"ASI"}, + "SI": {"EUR"}, + "SO": {"AFR"}, + "ZA": {"AFR"}, + "ZW": {"AFR"}, + "ES": {"EUR"}, + "SS": {"AFR"}, + "SD": {"AFR"}, + "EH": {"AFR"}, + "SR": {"SAC"}, + "SJ": {"EUR"}, + "SZ": {"AFR"}, + "SE": {"EUR"}, + "CH": {"EUR"}, + "SY": {"ASI"}, + "TJ": {"ASI"}, + "TH": {"ASI"}, + "TG": {"AFR"}, + "TK": {"OCE"}, + "TO": {"OCE"}, + "TT": {"NAC"}, + "AE": {"ASI"}, + "TN": {"AFR"}, + "TR": {"EUR", "ASI"}, + "TM": {"ASI"}, + "TC": {"NAC"}, + "TV": {"OCE"}, + "UG": {"AFR"}, + "UA": {"EUR"}, + "MK": {"EUR"}, + "EG": {"ASI" "AFR"}, + "GB": {"EUR"}, + "GG": {"EUR"}, + "JE": {"EUR"}, + "IM": {"EUR"}, + "TZ": {"AFR"}, + "US": {"NAC"}, + "VI": {"NAC"}, + "BF": {"AFR"}, + "UY": {"SAC"}, + "UZ": {"ASI"}, + "VE": {"SAC"}, + "WF": {"OCE"}, + "WS": {"OCE"}, + "YE": {"ASI"}, + "ZM": {"AFR"}, + "XD": {"ASI"}, + "XE": {"ASI"}, + "XS": {"ASI"}, + # TODO "XX - Disputed Territory" conflicts with `default_country_code` + # "XX": {"OCE"}, + countries.default_country_code: default_continent_codes_set, +} + +# fmt: on +def continent_codes_set(s): + """ + Return a set(!) of three letter continent codes (Alpha-3) inspired + by https://datahub.io/core/continent-codes#resource-continent-codes. + (We could not find any relevant ISO norm) + Defaults to {"CCC"}. + + As of now (March 2020) following countries are located on more than one + continent: + + OCE - Oceania and NAC - North America: + UM - United States Minor Outlying Islands + + EUR - Europe and ASI - Asia: + RU - Russian Federation + AM - Armenia + GE - Georgia + CY - Cyprus + TR - Turkey + KZ - Kazakhstan + AZ - Azerbaijan + + ASI - Asia and AFR - Africa + EG - Egypt + """ + codes_set = country_code__continent_codes_set.get(s, default_continent_codes_set) + if codes_set == default_continent_codes_set: + # TODO probably would be better to return an empty list or even better + # to create a union type `CountryCode` so that any misspelled country + # code would lead to a type error (thrown early on, so it could be + # dealt with early on too) + LOGGER.warning(f"No list of continent codes found for '{s}'. Using '{codes_set}'!") + return codes_set diff --git a/app/utils/countries.py b/app/utils/countries.py index 6647e679..2fc13b90 100644 --- a/app/utils/countries.py +++ b/app/utils/countries.py @@ -365,11 +365,10 @@ # fmt: on def country_code(s): """ - Return two letter country code (Alpha-2) according to https://en.wikipedia.org/wiki/ISO_3166-1 - Defaults to "XX". + Return two letter country code (Alpha-2) according to + https://en.wikipedia.org/wiki/ISO_3166-1 Defaults to "XX". """ - country_code = country_name__country_code.get(s, default_country_code) - if country_code == default_country_code: - LOGGER.warning(f"No country code found for '{s}'. Using '{country_code}'!") - - return country_code + code = country_name__country_code.get(s, default_country_code) + if code == default_country_code: + LOGGER.warning(f"No country code found for '{s}'. Using '{code}'!") + return code diff --git a/tests/expected_output/v1_all.json b/tests/expected_output/v1_all.json index 5ec413a0..a26f66fa 100644 --- a/tests/expected_output/v1_all.json +++ b/tests/expected_output/v1_all.json @@ -1 +1,2038 @@ -{"confirmed":{"last_updated":"2020-03-17T10:23:22.505550Z","latest":1940,"locations":[{"coordinates":{"lat":"15","long":"101"},"country":"Thailand","country_code":"TH","history":{"1/22/20":2,"1/23/20":3,"1/24/20":5,"1/25/20":7,"1/26/20":8,"1/27/20":8,"1/28/20":14,"1/29/20":14,"1/30/20":14,"1/31/20":19,"2/1/20":19,"2/10/20":32,"2/11/20":33,"2/12/20":33,"2/13/20":33,"2/14/20":33,"2/15/20":33,"2/16/20":34,"2/17/20":35,"2/18/20":35,"2/19/20":35,"2/2/20":19,"2/20/20":35,"2/21/20":35,"2/22/20":35,"2/23/20":35,"2/24/20":35,"2/25/20":37,"2/26/20":40,"2/27/20":40,"2/28/20":41,"2/29/20":42,"2/3/20":19,"2/4/20":25,"2/5/20":25,"2/6/20":25,"2/7/20":25,"2/8/20":32,"2/9/20":32,"3/1/20":42,"3/10/20":53,"3/11/20":59,"3/12/20":70,"3/13/20":75,"3/14/20":82,"3/15/20":114,"3/2/20":43,"3/3/20":43,"3/4/20":43,"3/5/20":47,"3/6/20":48,"3/7/20":50,"3/8/20":50,"3/9/20":50},"latest":114,"province":""},{"coordinates":{"lat":"36","long":"138"},"country":"Japan","country_code":"JP","history":{"1/22/20":2,"1/23/20":1,"1/24/20":2,"1/25/20":2,"1/26/20":4,"1/27/20":4,"1/28/20":7,"1/29/20":7,"1/30/20":11,"1/31/20":15,"2/1/20":20,"2/10/20":26,"2/11/20":26,"2/12/20":28,"2/13/20":28,"2/14/20":29,"2/15/20":43,"2/16/20":59,"2/17/20":66,"2/18/20":74,"2/19/20":84,"2/2/20":20,"2/20/20":94,"2/21/20":105,"2/22/20":122,"2/23/20":147,"2/24/20":159,"2/25/20":170,"2/26/20":189,"2/27/20":214,"2/28/20":228,"2/29/20":241,"2/3/20":20,"2/4/20":22,"2/5/20":22,"2/6/20":45,"2/7/20":25,"2/8/20":25,"2/9/20":26,"3/1/20":256,"3/10/20":581,"3/11/20":639,"3/12/20":639,"3/13/20":701,"3/14/20":773,"3/15/20":839,"3/2/20":274,"3/3/20":293,"3/4/20":331,"3/5/20":360,"3/6/20":420,"3/7/20":461,"3/8/20":502,"3/9/20":511},"latest":839,"province":""},{"coordinates":{"lat":"1.2833","long":"103.8333"},"country":"Singapore","country_code":"SG","history":{"1/22/20":0,"1/23/20":1,"1/24/20":3,"1/25/20":3,"1/26/20":4,"1/27/20":5,"1/28/20":7,"1/29/20":7,"1/30/20":10,"1/31/20":13,"2/1/20":16,"2/10/20":45,"2/11/20":47,"2/12/20":50,"2/13/20":58,"2/14/20":67,"2/15/20":72,"2/16/20":75,"2/17/20":77,"2/18/20":81,"2/19/20":84,"2/2/20":18,"2/20/20":84,"2/21/20":85,"2/22/20":85,"2/23/20":89,"2/24/20":89,"2/25/20":91,"2/26/20":93,"2/27/20":93,"2/28/20":93,"2/29/20":102,"2/3/20":18,"2/4/20":24,"2/5/20":28,"2/6/20":28,"2/7/20":30,"2/8/20":33,"2/9/20":40,"3/1/20":106,"3/10/20":160,"3/11/20":178,"3/12/20":178,"3/13/20":200,"3/14/20":212,"3/15/20":226,"3/2/20":108,"3/3/20":110,"3/4/20":110,"3/5/20":117,"3/6/20":130,"3/7/20":138,"3/8/20":150,"3/9/20":150},"latest":226,"province":""},{"coordinates":{"lat":"28.1667","long":"84.25"},"country":"Nepal","country_code":"NP","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":1,"1/26/20":1,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":1,"2/11/20":1,"2/12/20":1,"2/13/20":1,"2/14/20":1,"2/15/20":1,"2/16/20":1,"2/17/20":1,"2/18/20":1,"2/19/20":1,"2/2/20":1,"2/20/20":1,"2/21/20":1,"2/22/20":1,"2/23/20":1,"2/24/20":1,"2/25/20":1,"2/26/20":1,"2/27/20":1,"2/28/20":1,"2/29/20":1,"2/3/20":1,"2/4/20":1,"2/5/20":1,"2/6/20":1,"2/7/20":1,"2/8/20":1,"2/9/20":1,"3/1/20":1,"3/10/20":1,"3/11/20":1,"3/12/20":1,"3/13/20":1,"3/14/20":1,"3/15/20":1,"3/2/20":1,"3/3/20":1,"3/4/20":1,"3/5/20":1,"3/6/20":1,"3/7/20":1,"3/8/20":1,"3/9/20":1},"latest":1,"province":""},{"coordinates":{"lat":"2.5","long":"112.5"},"country":"Malaysia","country_code":"MY","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":3,"1/26/20":4,"1/27/20":4,"1/28/20":4,"1/29/20":7,"1/30/20":8,"1/31/20":8,"2/1/20":8,"2/10/20":18,"2/11/20":18,"2/12/20":18,"2/13/20":19,"2/14/20":19,"2/15/20":22,"2/16/20":22,"2/17/20":22,"2/18/20":22,"2/19/20":22,"2/2/20":8,"2/20/20":22,"2/21/20":22,"2/22/20":22,"2/23/20":22,"2/24/20":22,"2/25/20":22,"2/26/20":22,"2/27/20":23,"2/28/20":23,"2/29/20":25,"2/3/20":8,"2/4/20":10,"2/5/20":12,"2/6/20":12,"2/7/20":12,"2/8/20":16,"2/9/20":16,"3/1/20":29,"3/10/20":129,"3/11/20":149,"3/12/20":149,"3/13/20":197,"3/14/20":238,"3/15/20":428,"3/2/20":29,"3/3/20":36,"3/4/20":50,"3/5/20":50,"3/6/20":83,"3/7/20":93,"3/8/20":99,"3/9/20":117},"latest":428,"province":""},{"coordinates":{"lat":"49.2827","long":"-123.1207"},"country":"Canada","country_code":"CA","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":0,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":5,"2/18/20":5,"2/19/20":5,"2/2/20":1,"2/20/20":5,"2/21/20":6,"2/22/20":6,"2/23/20":6,"2/24/20":6,"2/25/20":7,"2/26/20":7,"2/27/20":7,"2/28/20":7,"2/29/20":8,"2/3/20":1,"2/4/20":1,"2/5/20":2,"2/6/20":2,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":8,"3/10/20":32,"3/11/20":39,"3/12/20":46,"3/13/20":64,"3/14/20":64,"3/15/20":73,"3/2/20":8,"3/3/20":9,"3/4/20":12,"3/5/20":13,"3/6/20":21,"3/7/20":21,"3/8/20":27,"3/9/20":32},"latest":73,"province":"British Columbia"},{"coordinates":{"lat":"-33.8688","long":"151.2093"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":3,"1/27/20":4,"1/28/20":4,"1/29/20":4,"1/30/20":4,"1/31/20":4,"2/1/20":4,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":4,"2/18/20":4,"2/19/20":4,"2/2/20":4,"2/20/20":4,"2/21/20":4,"2/22/20":4,"2/23/20":4,"2/24/20":4,"2/25/20":4,"2/26/20":4,"2/27/20":4,"2/28/20":4,"2/29/20":4,"2/3/20":4,"2/4/20":4,"2/5/20":4,"2/6/20":4,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":6,"3/10/20":55,"3/11/20":65,"3/12/20":65,"3/13/20":92,"3/14/20":112,"3/15/20":134,"3/2/20":6,"3/3/20":13,"3/4/20":22,"3/5/20":22,"3/6/20":26,"3/7/20":28,"3/8/20":38,"3/9/20":48},"latest":134,"province":"New South Wales"},{"coordinates":{"lat":"-37.8136","long":"144.9631"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":1,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":2,"1/31/20":3,"2/1/20":4,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":4,"2/18/20":4,"2/19/20":4,"2/2/20":4,"2/20/20":4,"2/21/20":4,"2/22/20":4,"2/23/20":4,"2/24/20":4,"2/25/20":4,"2/26/20":4,"2/27/20":4,"2/28/20":4,"2/29/20":7,"2/3/20":4,"2/4/20":4,"2/5/20":4,"2/6/20":4,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":7,"3/10/20":18,"3/11/20":21,"3/12/20":21,"3/13/20":36,"3/14/20":49,"3/15/20":57,"3/2/20":9,"3/3/20":9,"3/4/20":10,"3/5/20":10,"3/6/20":10,"3/7/20":11,"3/8/20":11,"3/9/20":15},"latest":57,"province":"Victoria"},{"coordinates":{"lat":"-28.0167","long":"153.4"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":0,"1/28/20":0,"1/29/20":1,"1/30/20":3,"1/31/20":2,"2/1/20":3,"2/10/20":5,"2/11/20":5,"2/12/20":5,"2/13/20":5,"2/14/20":5,"2/15/20":5,"2/16/20":5,"2/17/20":5,"2/18/20":5,"2/19/20":5,"2/2/20":2,"2/20/20":5,"2/21/20":5,"2/22/20":5,"2/23/20":5,"2/24/20":5,"2/25/20":5,"2/26/20":5,"2/27/20":5,"2/28/20":5,"2/29/20":9,"2/3/20":2,"2/4/20":3,"2/5/20":3,"2/6/20":4,"2/7/20":5,"2/8/20":5,"2/9/20":5,"3/1/20":9,"3/10/20":18,"3/11/20":20,"3/12/20":20,"3/13/20":35,"3/14/20":46,"3/15/20":61,"3/2/20":9,"3/3/20":11,"3/4/20":11,"3/5/20":13,"3/6/20":13,"3/7/20":13,"3/8/20":15,"3/9/20":15},"latest":61,"province":"Queensland"},{"coordinates":{"lat":"11.55","long":"104.9167"},"country":"Cambodia","country_code":"KH","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":1,"2/11/20":1,"2/12/20":1,"2/13/20":1,"2/14/20":1,"2/15/20":1,"2/16/20":1,"2/17/20":1,"2/18/20":1,"2/19/20":1,"2/2/20":1,"2/20/20":1,"2/21/20":1,"2/22/20":1,"2/23/20":1,"2/24/20":1,"2/25/20":1,"2/26/20":1,"2/27/20":1,"2/28/20":1,"2/29/20":1,"2/3/20":1,"2/4/20":1,"2/5/20":1,"2/6/20":1,"2/7/20":1,"2/8/20":1,"2/9/20":1,"3/1/20":1,"3/10/20":2,"3/11/20":3,"3/12/20":3,"3/13/20":5,"3/14/20":7,"3/15/20":7,"3/2/20":1,"3/3/20":1,"3/4/20":1,"3/5/20":1,"3/6/20":1,"3/7/20":1,"3/8/20":2,"3/9/20":2},"latest":7,"province":""}],"source":"https://github.com/ExpDev07/coronavirus-tracker-api"},"deaths":{"last_updated":"2020-03-17T10:23:22.505550Z","latest":1940,"locations":[{"coordinates":{"lat":"15","long":"101"},"country":"Thailand","country_code":"TH","history":{"1/22/20":2,"1/23/20":3,"1/24/20":5,"1/25/20":7,"1/26/20":8,"1/27/20":8,"1/28/20":14,"1/29/20":14,"1/30/20":14,"1/31/20":19,"2/1/20":19,"2/10/20":32,"2/11/20":33,"2/12/20":33,"2/13/20":33,"2/14/20":33,"2/15/20":33,"2/16/20":34,"2/17/20":35,"2/18/20":35,"2/19/20":35,"2/2/20":19,"2/20/20":35,"2/21/20":35,"2/22/20":35,"2/23/20":35,"2/24/20":35,"2/25/20":37,"2/26/20":40,"2/27/20":40,"2/28/20":41,"2/29/20":42,"2/3/20":19,"2/4/20":25,"2/5/20":25,"2/6/20":25,"2/7/20":25,"2/8/20":32,"2/9/20":32,"3/1/20":42,"3/10/20":53,"3/11/20":59,"3/12/20":70,"3/13/20":75,"3/14/20":82,"3/15/20":114,"3/2/20":43,"3/3/20":43,"3/4/20":43,"3/5/20":47,"3/6/20":48,"3/7/20":50,"3/8/20":50,"3/9/20":50},"latest":114,"province":""},{"coordinates":{"lat":"36","long":"138"},"country":"Japan","country_code":"JP","history":{"1/22/20":2,"1/23/20":1,"1/24/20":2,"1/25/20":2,"1/26/20":4,"1/27/20":4,"1/28/20":7,"1/29/20":7,"1/30/20":11,"1/31/20":15,"2/1/20":20,"2/10/20":26,"2/11/20":26,"2/12/20":28,"2/13/20":28,"2/14/20":29,"2/15/20":43,"2/16/20":59,"2/17/20":66,"2/18/20":74,"2/19/20":84,"2/2/20":20,"2/20/20":94,"2/21/20":105,"2/22/20":122,"2/23/20":147,"2/24/20":159,"2/25/20":170,"2/26/20":189,"2/27/20":214,"2/28/20":228,"2/29/20":241,"2/3/20":20,"2/4/20":22,"2/5/20":22,"2/6/20":45,"2/7/20":25,"2/8/20":25,"2/9/20":26,"3/1/20":256,"3/10/20":581,"3/11/20":639,"3/12/20":639,"3/13/20":701,"3/14/20":773,"3/15/20":839,"3/2/20":274,"3/3/20":293,"3/4/20":331,"3/5/20":360,"3/6/20":420,"3/7/20":461,"3/8/20":502,"3/9/20":511},"latest":839,"province":""},{"coordinates":{"lat":"1.2833","long":"103.8333"},"country":"Singapore","country_code":"SG","history":{"1/22/20":0,"1/23/20":1,"1/24/20":3,"1/25/20":3,"1/26/20":4,"1/27/20":5,"1/28/20":7,"1/29/20":7,"1/30/20":10,"1/31/20":13,"2/1/20":16,"2/10/20":45,"2/11/20":47,"2/12/20":50,"2/13/20":58,"2/14/20":67,"2/15/20":72,"2/16/20":75,"2/17/20":77,"2/18/20":81,"2/19/20":84,"2/2/20":18,"2/20/20":84,"2/21/20":85,"2/22/20":85,"2/23/20":89,"2/24/20":89,"2/25/20":91,"2/26/20":93,"2/27/20":93,"2/28/20":93,"2/29/20":102,"2/3/20":18,"2/4/20":24,"2/5/20":28,"2/6/20":28,"2/7/20":30,"2/8/20":33,"2/9/20":40,"3/1/20":106,"3/10/20":160,"3/11/20":178,"3/12/20":178,"3/13/20":200,"3/14/20":212,"3/15/20":226,"3/2/20":108,"3/3/20":110,"3/4/20":110,"3/5/20":117,"3/6/20":130,"3/7/20":138,"3/8/20":150,"3/9/20":150},"latest":226,"province":""},{"coordinates":{"lat":"28.1667","long":"84.25"},"country":"Nepal","country_code":"NP","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":1,"1/26/20":1,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":1,"2/11/20":1,"2/12/20":1,"2/13/20":1,"2/14/20":1,"2/15/20":1,"2/16/20":1,"2/17/20":1,"2/18/20":1,"2/19/20":1,"2/2/20":1,"2/20/20":1,"2/21/20":1,"2/22/20":1,"2/23/20":1,"2/24/20":1,"2/25/20":1,"2/26/20":1,"2/27/20":1,"2/28/20":1,"2/29/20":1,"2/3/20":1,"2/4/20":1,"2/5/20":1,"2/6/20":1,"2/7/20":1,"2/8/20":1,"2/9/20":1,"3/1/20":1,"3/10/20":1,"3/11/20":1,"3/12/20":1,"3/13/20":1,"3/14/20":1,"3/15/20":1,"3/2/20":1,"3/3/20":1,"3/4/20":1,"3/5/20":1,"3/6/20":1,"3/7/20":1,"3/8/20":1,"3/9/20":1},"latest":1,"province":""},{"coordinates":{"lat":"2.5","long":"112.5"},"country":"Malaysia","country_code":"MY","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":3,"1/26/20":4,"1/27/20":4,"1/28/20":4,"1/29/20":7,"1/30/20":8,"1/31/20":8,"2/1/20":8,"2/10/20":18,"2/11/20":18,"2/12/20":18,"2/13/20":19,"2/14/20":19,"2/15/20":22,"2/16/20":22,"2/17/20":22,"2/18/20":22,"2/19/20":22,"2/2/20":8,"2/20/20":22,"2/21/20":22,"2/22/20":22,"2/23/20":22,"2/24/20":22,"2/25/20":22,"2/26/20":22,"2/27/20":23,"2/28/20":23,"2/29/20":25,"2/3/20":8,"2/4/20":10,"2/5/20":12,"2/6/20":12,"2/7/20":12,"2/8/20":16,"2/9/20":16,"3/1/20":29,"3/10/20":129,"3/11/20":149,"3/12/20":149,"3/13/20":197,"3/14/20":238,"3/15/20":428,"3/2/20":29,"3/3/20":36,"3/4/20":50,"3/5/20":50,"3/6/20":83,"3/7/20":93,"3/8/20":99,"3/9/20":117},"latest":428,"province":""},{"coordinates":{"lat":"49.2827","long":"-123.1207"},"country":"Canada","country_code":"CA","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":0,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":5,"2/18/20":5,"2/19/20":5,"2/2/20":1,"2/20/20":5,"2/21/20":6,"2/22/20":6,"2/23/20":6,"2/24/20":6,"2/25/20":7,"2/26/20":7,"2/27/20":7,"2/28/20":7,"2/29/20":8,"2/3/20":1,"2/4/20":1,"2/5/20":2,"2/6/20":2,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":8,"3/10/20":32,"3/11/20":39,"3/12/20":46,"3/13/20":64,"3/14/20":64,"3/15/20":73,"3/2/20":8,"3/3/20":9,"3/4/20":12,"3/5/20":13,"3/6/20":21,"3/7/20":21,"3/8/20":27,"3/9/20":32},"latest":73,"province":"British Columbia"},{"coordinates":{"lat":"-33.8688","long":"151.2093"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":3,"1/27/20":4,"1/28/20":4,"1/29/20":4,"1/30/20":4,"1/31/20":4,"2/1/20":4,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":4,"2/18/20":4,"2/19/20":4,"2/2/20":4,"2/20/20":4,"2/21/20":4,"2/22/20":4,"2/23/20":4,"2/24/20":4,"2/25/20":4,"2/26/20":4,"2/27/20":4,"2/28/20":4,"2/29/20":4,"2/3/20":4,"2/4/20":4,"2/5/20":4,"2/6/20":4,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":6,"3/10/20":55,"3/11/20":65,"3/12/20":65,"3/13/20":92,"3/14/20":112,"3/15/20":134,"3/2/20":6,"3/3/20":13,"3/4/20":22,"3/5/20":22,"3/6/20":26,"3/7/20":28,"3/8/20":38,"3/9/20":48},"latest":134,"province":"New South Wales"},{"coordinates":{"lat":"-37.8136","long":"144.9631"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":1,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":2,"1/31/20":3,"2/1/20":4,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":4,"2/18/20":4,"2/19/20":4,"2/2/20":4,"2/20/20":4,"2/21/20":4,"2/22/20":4,"2/23/20":4,"2/24/20":4,"2/25/20":4,"2/26/20":4,"2/27/20":4,"2/28/20":4,"2/29/20":7,"2/3/20":4,"2/4/20":4,"2/5/20":4,"2/6/20":4,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":7,"3/10/20":18,"3/11/20":21,"3/12/20":21,"3/13/20":36,"3/14/20":49,"3/15/20":57,"3/2/20":9,"3/3/20":9,"3/4/20":10,"3/5/20":10,"3/6/20":10,"3/7/20":11,"3/8/20":11,"3/9/20":15},"latest":57,"province":"Victoria"},{"coordinates":{"lat":"-28.0167","long":"153.4"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":0,"1/28/20":0,"1/29/20":1,"1/30/20":3,"1/31/20":2,"2/1/20":3,"2/10/20":5,"2/11/20":5,"2/12/20":5,"2/13/20":5,"2/14/20":5,"2/15/20":5,"2/16/20":5,"2/17/20":5,"2/18/20":5,"2/19/20":5,"2/2/20":2,"2/20/20":5,"2/21/20":5,"2/22/20":5,"2/23/20":5,"2/24/20":5,"2/25/20":5,"2/26/20":5,"2/27/20":5,"2/28/20":5,"2/29/20":9,"2/3/20":2,"2/4/20":3,"2/5/20":3,"2/6/20":4,"2/7/20":5,"2/8/20":5,"2/9/20":5,"3/1/20":9,"3/10/20":18,"3/11/20":20,"3/12/20":20,"3/13/20":35,"3/14/20":46,"3/15/20":61,"3/2/20":9,"3/3/20":11,"3/4/20":11,"3/5/20":13,"3/6/20":13,"3/7/20":13,"3/8/20":15,"3/9/20":15},"latest":61,"province":"Queensland"},{"coordinates":{"lat":"11.55","long":"104.9167"},"country":"Cambodia","country_code":"KH","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":1,"2/11/20":1,"2/12/20":1,"2/13/20":1,"2/14/20":1,"2/15/20":1,"2/16/20":1,"2/17/20":1,"2/18/20":1,"2/19/20":1,"2/2/20":1,"2/20/20":1,"2/21/20":1,"2/22/20":1,"2/23/20":1,"2/24/20":1,"2/25/20":1,"2/26/20":1,"2/27/20":1,"2/28/20":1,"2/29/20":1,"2/3/20":1,"2/4/20":1,"2/5/20":1,"2/6/20":1,"2/7/20":1,"2/8/20":1,"2/9/20":1,"3/1/20":1,"3/10/20":2,"3/11/20":3,"3/12/20":3,"3/13/20":5,"3/14/20":7,"3/15/20":7,"3/2/20":1,"3/3/20":1,"3/4/20":1,"3/5/20":1,"3/6/20":1,"3/7/20":1,"3/8/20":2,"3/9/20":2},"latest":7,"province":""}],"source":"https://github.com/ExpDev07/coronavirus-tracker-api"},"latest":{"confirmed":1940,"deaths":1940,"recovered":1940},"recovered":{"last_updated":"2020-03-17T10:23:22.505550Z","latest":1940,"locations":[{"coordinates":{"lat":"15","long":"101"},"country":"Thailand","country_code":"TH","history":{"1/22/20":2,"1/23/20":3,"1/24/20":5,"1/25/20":7,"1/26/20":8,"1/27/20":8,"1/28/20":14,"1/29/20":14,"1/30/20":14,"1/31/20":19,"2/1/20":19,"2/10/20":32,"2/11/20":33,"2/12/20":33,"2/13/20":33,"2/14/20":33,"2/15/20":33,"2/16/20":34,"2/17/20":35,"2/18/20":35,"2/19/20":35,"2/2/20":19,"2/20/20":35,"2/21/20":35,"2/22/20":35,"2/23/20":35,"2/24/20":35,"2/25/20":37,"2/26/20":40,"2/27/20":40,"2/28/20":41,"2/29/20":42,"2/3/20":19,"2/4/20":25,"2/5/20":25,"2/6/20":25,"2/7/20":25,"2/8/20":32,"2/9/20":32,"3/1/20":42,"3/10/20":53,"3/11/20":59,"3/12/20":70,"3/13/20":75,"3/14/20":82,"3/15/20":114,"3/2/20":43,"3/3/20":43,"3/4/20":43,"3/5/20":47,"3/6/20":48,"3/7/20":50,"3/8/20":50,"3/9/20":50},"latest":114,"province":""},{"coordinates":{"lat":"36","long":"138"},"country":"Japan","country_code":"JP","history":{"1/22/20":2,"1/23/20":1,"1/24/20":2,"1/25/20":2,"1/26/20":4,"1/27/20":4,"1/28/20":7,"1/29/20":7,"1/30/20":11,"1/31/20":15,"2/1/20":20,"2/10/20":26,"2/11/20":26,"2/12/20":28,"2/13/20":28,"2/14/20":29,"2/15/20":43,"2/16/20":59,"2/17/20":66,"2/18/20":74,"2/19/20":84,"2/2/20":20,"2/20/20":94,"2/21/20":105,"2/22/20":122,"2/23/20":147,"2/24/20":159,"2/25/20":170,"2/26/20":189,"2/27/20":214,"2/28/20":228,"2/29/20":241,"2/3/20":20,"2/4/20":22,"2/5/20":22,"2/6/20":45,"2/7/20":25,"2/8/20":25,"2/9/20":26,"3/1/20":256,"3/10/20":581,"3/11/20":639,"3/12/20":639,"3/13/20":701,"3/14/20":773,"3/15/20":839,"3/2/20":274,"3/3/20":293,"3/4/20":331,"3/5/20":360,"3/6/20":420,"3/7/20":461,"3/8/20":502,"3/9/20":511},"latest":839,"province":""},{"coordinates":{"lat":"1.2833","long":"103.8333"},"country":"Singapore","country_code":"SG","history":{"1/22/20":0,"1/23/20":1,"1/24/20":3,"1/25/20":3,"1/26/20":4,"1/27/20":5,"1/28/20":7,"1/29/20":7,"1/30/20":10,"1/31/20":13,"2/1/20":16,"2/10/20":45,"2/11/20":47,"2/12/20":50,"2/13/20":58,"2/14/20":67,"2/15/20":72,"2/16/20":75,"2/17/20":77,"2/18/20":81,"2/19/20":84,"2/2/20":18,"2/20/20":84,"2/21/20":85,"2/22/20":85,"2/23/20":89,"2/24/20":89,"2/25/20":91,"2/26/20":93,"2/27/20":93,"2/28/20":93,"2/29/20":102,"2/3/20":18,"2/4/20":24,"2/5/20":28,"2/6/20":28,"2/7/20":30,"2/8/20":33,"2/9/20":40,"3/1/20":106,"3/10/20":160,"3/11/20":178,"3/12/20":178,"3/13/20":200,"3/14/20":212,"3/15/20":226,"3/2/20":108,"3/3/20":110,"3/4/20":110,"3/5/20":117,"3/6/20":130,"3/7/20":138,"3/8/20":150,"3/9/20":150},"latest":226,"province":""},{"coordinates":{"lat":"28.1667","long":"84.25"},"country":"Nepal","country_code":"NP","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":1,"1/26/20":1,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":1,"2/11/20":1,"2/12/20":1,"2/13/20":1,"2/14/20":1,"2/15/20":1,"2/16/20":1,"2/17/20":1,"2/18/20":1,"2/19/20":1,"2/2/20":1,"2/20/20":1,"2/21/20":1,"2/22/20":1,"2/23/20":1,"2/24/20":1,"2/25/20":1,"2/26/20":1,"2/27/20":1,"2/28/20":1,"2/29/20":1,"2/3/20":1,"2/4/20":1,"2/5/20":1,"2/6/20":1,"2/7/20":1,"2/8/20":1,"2/9/20":1,"3/1/20":1,"3/10/20":1,"3/11/20":1,"3/12/20":1,"3/13/20":1,"3/14/20":1,"3/15/20":1,"3/2/20":1,"3/3/20":1,"3/4/20":1,"3/5/20":1,"3/6/20":1,"3/7/20":1,"3/8/20":1,"3/9/20":1},"latest":1,"province":""},{"coordinates":{"lat":"2.5","long":"112.5"},"country":"Malaysia","country_code":"MY","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":3,"1/26/20":4,"1/27/20":4,"1/28/20":4,"1/29/20":7,"1/30/20":8,"1/31/20":8,"2/1/20":8,"2/10/20":18,"2/11/20":18,"2/12/20":18,"2/13/20":19,"2/14/20":19,"2/15/20":22,"2/16/20":22,"2/17/20":22,"2/18/20":22,"2/19/20":22,"2/2/20":8,"2/20/20":22,"2/21/20":22,"2/22/20":22,"2/23/20":22,"2/24/20":22,"2/25/20":22,"2/26/20":22,"2/27/20":23,"2/28/20":23,"2/29/20":25,"2/3/20":8,"2/4/20":10,"2/5/20":12,"2/6/20":12,"2/7/20":12,"2/8/20":16,"2/9/20":16,"3/1/20":29,"3/10/20":129,"3/11/20":149,"3/12/20":149,"3/13/20":197,"3/14/20":238,"3/15/20":428,"3/2/20":29,"3/3/20":36,"3/4/20":50,"3/5/20":50,"3/6/20":83,"3/7/20":93,"3/8/20":99,"3/9/20":117},"latest":428,"province":""},{"coordinates":{"lat":"49.2827","long":"-123.1207"},"country":"Canada","country_code":"CA","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":0,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":5,"2/18/20":5,"2/19/20":5,"2/2/20":1,"2/20/20":5,"2/21/20":6,"2/22/20":6,"2/23/20":6,"2/24/20":6,"2/25/20":7,"2/26/20":7,"2/27/20":7,"2/28/20":7,"2/29/20":8,"2/3/20":1,"2/4/20":1,"2/5/20":2,"2/6/20":2,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":8,"3/10/20":32,"3/11/20":39,"3/12/20":46,"3/13/20":64,"3/14/20":64,"3/15/20":73,"3/2/20":8,"3/3/20":9,"3/4/20":12,"3/5/20":13,"3/6/20":21,"3/7/20":21,"3/8/20":27,"3/9/20":32},"latest":73,"province":"British Columbia"},{"coordinates":{"lat":"-33.8688","long":"151.2093"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":3,"1/27/20":4,"1/28/20":4,"1/29/20":4,"1/30/20":4,"1/31/20":4,"2/1/20":4,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":4,"2/18/20":4,"2/19/20":4,"2/2/20":4,"2/20/20":4,"2/21/20":4,"2/22/20":4,"2/23/20":4,"2/24/20":4,"2/25/20":4,"2/26/20":4,"2/27/20":4,"2/28/20":4,"2/29/20":4,"2/3/20":4,"2/4/20":4,"2/5/20":4,"2/6/20":4,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":6,"3/10/20":55,"3/11/20":65,"3/12/20":65,"3/13/20":92,"3/14/20":112,"3/15/20":134,"3/2/20":6,"3/3/20":13,"3/4/20":22,"3/5/20":22,"3/6/20":26,"3/7/20":28,"3/8/20":38,"3/9/20":48},"latest":134,"province":"New South Wales"},{"coordinates":{"lat":"-37.8136","long":"144.9631"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":1,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":2,"1/31/20":3,"2/1/20":4,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":4,"2/18/20":4,"2/19/20":4,"2/2/20":4,"2/20/20":4,"2/21/20":4,"2/22/20":4,"2/23/20":4,"2/24/20":4,"2/25/20":4,"2/26/20":4,"2/27/20":4,"2/28/20":4,"2/29/20":7,"2/3/20":4,"2/4/20":4,"2/5/20":4,"2/6/20":4,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":7,"3/10/20":18,"3/11/20":21,"3/12/20":21,"3/13/20":36,"3/14/20":49,"3/15/20":57,"3/2/20":9,"3/3/20":9,"3/4/20":10,"3/5/20":10,"3/6/20":10,"3/7/20":11,"3/8/20":11,"3/9/20":15},"latest":57,"province":"Victoria"},{"coordinates":{"lat":"-28.0167","long":"153.4"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":0,"1/28/20":0,"1/29/20":1,"1/30/20":3,"1/31/20":2,"2/1/20":3,"2/10/20":5,"2/11/20":5,"2/12/20":5,"2/13/20":5,"2/14/20":5,"2/15/20":5,"2/16/20":5,"2/17/20":5,"2/18/20":5,"2/19/20":5,"2/2/20":2,"2/20/20":5,"2/21/20":5,"2/22/20":5,"2/23/20":5,"2/24/20":5,"2/25/20":5,"2/26/20":5,"2/27/20":5,"2/28/20":5,"2/29/20":9,"2/3/20":2,"2/4/20":3,"2/5/20":3,"2/6/20":4,"2/7/20":5,"2/8/20":5,"2/9/20":5,"3/1/20":9,"3/10/20":18,"3/11/20":20,"3/12/20":20,"3/13/20":35,"3/14/20":46,"3/15/20":61,"3/2/20":9,"3/3/20":11,"3/4/20":11,"3/5/20":13,"3/6/20":13,"3/7/20":13,"3/8/20":15,"3/9/20":15},"latest":61,"province":"Queensland"},{"coordinates":{"lat":"11.55","long":"104.9167"},"country":"Cambodia","country_code":"KH","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":1,"2/11/20":1,"2/12/20":1,"2/13/20":1,"2/14/20":1,"2/15/20":1,"2/16/20":1,"2/17/20":1,"2/18/20":1,"2/19/20":1,"2/2/20":1,"2/20/20":1,"2/21/20":1,"2/22/20":1,"2/23/20":1,"2/24/20":1,"2/25/20":1,"2/26/20":1,"2/27/20":1,"2/28/20":1,"2/29/20":1,"2/3/20":1,"2/4/20":1,"2/5/20":1,"2/6/20":1,"2/7/20":1,"2/8/20":1,"2/9/20":1,"3/1/20":1,"3/10/20":2,"3/11/20":3,"3/12/20":3,"3/13/20":5,"3/14/20":7,"3/15/20":7,"3/2/20":1,"3/3/20":1,"3/4/20":1,"3/5/20":1,"3/6/20":1,"3/7/20":1,"3/8/20":2,"3/9/20":2},"latest":7,"province":""}],"source":"https://github.com/ExpDev07/coronavirus-tracker-api"}} +{ + "confirmed":{ + "last_updated":"2020-03-17T10:23:22.505550Z", + "latest":1940, + "locations":[ + { + "coordinates":{ + "lat":"15", + "long":"101" + }, + "country":"Thailand", + "country_code":"TH", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":2, + "1/23/20":3, + "1/24/20":5, + "1/25/20":7, + "1/26/20":8, + "1/27/20":8, + "1/28/20":14, + "1/29/20":14, + "1/30/20":14, + "1/31/20":19, + "2/1/20":19, + "2/10/20":32, + "2/11/20":33, + "2/12/20":33, + "2/13/20":33, + "2/14/20":33, + "2/15/20":33, + "2/16/20":34, + "2/17/20":35, + "2/18/20":35, + "2/19/20":35, + "2/2/20":19, + "2/20/20":35, + "2/21/20":35, + "2/22/20":35, + "2/23/20":35, + "2/24/20":35, + "2/25/20":37, + "2/26/20":40, + "2/27/20":40, + "2/28/20":41, + "2/29/20":42, + "2/3/20":19, + "2/4/20":25, + "2/5/20":25, + "2/6/20":25, + "2/7/20":25, + "2/8/20":32, + "2/9/20":32, + "3/1/20":42, + "3/10/20":53, + "3/11/20":59, + "3/12/20":70, + "3/13/20":75, + "3/14/20":82, + "3/15/20":114, + "3/2/20":43, + "3/3/20":43, + "3/4/20":43, + "3/5/20":47, + "3/6/20":48, + "3/7/20":50, + "3/8/20":50, + "3/9/20":50 + }, + "latest":114, + "province":"" + }, + { + "coordinates":{ + "lat":"36", + "long":"138" + }, + "country":"Japan", + "country_code":"JP", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":2, + "1/23/20":1, + "1/24/20":2, + "1/25/20":2, + "1/26/20":4, + "1/27/20":4, + "1/28/20":7, + "1/29/20":7, + "1/30/20":11, + "1/31/20":15, + "2/1/20":20, + "2/10/20":26, + "2/11/20":26, + "2/12/20":28, + "2/13/20":28, + "2/14/20":29, + "2/15/20":43, + "2/16/20":59, + "2/17/20":66, + "2/18/20":74, + "2/19/20":84, + "2/2/20":20, + "2/20/20":94, + "2/21/20":105, + "2/22/20":122, + "2/23/20":147, + "2/24/20":159, + "2/25/20":170, + "2/26/20":189, + "2/27/20":214, + "2/28/20":228, + "2/29/20":241, + "2/3/20":20, + "2/4/20":22, + "2/5/20":22, + "2/6/20":45, + "2/7/20":25, + "2/8/20":25, + "2/9/20":26, + "3/1/20":256, + "3/10/20":581, + "3/11/20":639, + "3/12/20":639, + "3/13/20":701, + "3/14/20":773, + "3/15/20":839, + "3/2/20":274, + "3/3/20":293, + "3/4/20":331, + "3/5/20":360, + "3/6/20":420, + "3/7/20":461, + "3/8/20":502, + "3/9/20":511 + }, + "latest":839, + "province":"" + }, + { + "coordinates":{ + "lat":"1.2833", + "long":"103.8333" + }, + "country":"Singapore", + "country_code":"SG", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":1, + "1/24/20":3, + "1/25/20":3, + "1/26/20":4, + "1/27/20":5, + "1/28/20":7, + "1/29/20":7, + "1/30/20":10, + "1/31/20":13, + "2/1/20":16, + "2/10/20":45, + "2/11/20":47, + "2/12/20":50, + "2/13/20":58, + "2/14/20":67, + "2/15/20":72, + "2/16/20":75, + "2/17/20":77, + "2/18/20":81, + "2/19/20":84, + "2/2/20":18, + "2/20/20":84, + "2/21/20":85, + "2/22/20":85, + "2/23/20":89, + "2/24/20":89, + "2/25/20":91, + "2/26/20":93, + "2/27/20":93, + "2/28/20":93, + "2/29/20":102, + "2/3/20":18, + "2/4/20":24, + "2/5/20":28, + "2/6/20":28, + "2/7/20":30, + "2/8/20":33, + "2/9/20":40, + "3/1/20":106, + "3/10/20":160, + "3/11/20":178, + "3/12/20":178, + "3/13/20":200, + "3/14/20":212, + "3/15/20":226, + "3/2/20":108, + "3/3/20":110, + "3/4/20":110, + "3/5/20":117, + "3/6/20":130, + "3/7/20":138, + "3/8/20":150, + "3/9/20":150 + }, + "latest":226, + "province":"" + }, + { + "coordinates":{ + "lat":"28.1667", + "long":"84.25" + }, + "country":"Nepal", + "country_code":"NP", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":1, + "1/26/20":1, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":1, + "2/11/20":1, + "2/12/20":1, + "2/13/20":1, + "2/14/20":1, + "2/15/20":1, + "2/16/20":1, + "2/17/20":1, + "2/18/20":1, + "2/19/20":1, + "2/2/20":1, + "2/20/20":1, + "2/21/20":1, + "2/22/20":1, + "2/23/20":1, + "2/24/20":1, + "2/25/20":1, + "2/26/20":1, + "2/27/20":1, + "2/28/20":1, + "2/29/20":1, + "2/3/20":1, + "2/4/20":1, + "2/5/20":1, + "2/6/20":1, + "2/7/20":1, + "2/8/20":1, + "2/9/20":1, + "3/1/20":1, + "3/10/20":1, + "3/11/20":1, + "3/12/20":1, + "3/13/20":1, + "3/14/20":1, + "3/15/20":1, + "3/2/20":1, + "3/3/20":1, + "3/4/20":1, + "3/5/20":1, + "3/6/20":1, + "3/7/20":1, + "3/8/20":1, + "3/9/20":1 + }, + "latest":1, + "province":"" + }, + { + "coordinates":{ + "lat":"2.5", + "long":"112.5" + }, + "country":"Malaysia", + "country_code":"MY", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":3, + "1/26/20":4, + "1/27/20":4, + "1/28/20":4, + "1/29/20":7, + "1/30/20":8, + "1/31/20":8, + "2/1/20":8, + "2/10/20":18, + "2/11/20":18, + "2/12/20":18, + "2/13/20":19, + "2/14/20":19, + "2/15/20":22, + "2/16/20":22, + "2/17/20":22, + "2/18/20":22, + "2/19/20":22, + "2/2/20":8, + "2/20/20":22, + "2/21/20":22, + "2/22/20":22, + "2/23/20":22, + "2/24/20":22, + "2/25/20":22, + "2/26/20":22, + "2/27/20":23, + "2/28/20":23, + "2/29/20":25, + "2/3/20":8, + "2/4/20":10, + "2/5/20":12, + "2/6/20":12, + "2/7/20":12, + "2/8/20":16, + "2/9/20":16, + "3/1/20":29, + "3/10/20":129, + "3/11/20":149, + "3/12/20":149, + "3/13/20":197, + "3/14/20":238, + "3/15/20":428, + "3/2/20":29, + "3/3/20":36, + "3/4/20":50, + "3/5/20":50, + "3/6/20":83, + "3/7/20":93, + "3/8/20":99, + "3/9/20":117 + }, + "latest":428, + "province":"" + }, + { + "coordinates":{ + "lat":"49.2827", + "long":"-123.1207" + }, + "country":"Canada", + "country_code":"CA", + "continent_codes_set":["NAC"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":0, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":5, + "2/18/20":5, + "2/19/20":5, + "2/2/20":1, + "2/20/20":5, + "2/21/20":6, + "2/22/20":6, + "2/23/20":6, + "2/24/20":6, + "2/25/20":7, + "2/26/20":7, + "2/27/20":7, + "2/28/20":7, + "2/29/20":8, + "2/3/20":1, + "2/4/20":1, + "2/5/20":2, + "2/6/20":2, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":8, + "3/10/20":32, + "3/11/20":39, + "3/12/20":46, + "3/13/20":64, + "3/14/20":64, + "3/15/20":73, + "3/2/20":8, + "3/3/20":9, + "3/4/20":12, + "3/5/20":13, + "3/6/20":21, + "3/7/20":21, + "3/8/20":27, + "3/9/20":32 + }, + "latest":73, + "province":"British Columbia" + }, + { + "coordinates":{ + "lat":"-33.8688", + "long":"151.2093" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":3, + "1/27/20":4, + "1/28/20":4, + "1/29/20":4, + "1/30/20":4, + "1/31/20":4, + "2/1/20":4, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":4, + "2/18/20":4, + "2/19/20":4, + "2/2/20":4, + "2/20/20":4, + "2/21/20":4, + "2/22/20":4, + "2/23/20":4, + "2/24/20":4, + "2/25/20":4, + "2/26/20":4, + "2/27/20":4, + "2/28/20":4, + "2/29/20":4, + "2/3/20":4, + "2/4/20":4, + "2/5/20":4, + "2/6/20":4, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":6, + "3/10/20":55, + "3/11/20":65, + "3/12/20":65, + "3/13/20":92, + "3/14/20":112, + "3/15/20":134, + "3/2/20":6, + "3/3/20":13, + "3/4/20":22, + "3/5/20":22, + "3/6/20":26, + "3/7/20":28, + "3/8/20":38, + "3/9/20":48 + }, + "latest":134, + "province":"New South Wales" + }, + { + "coordinates":{ + "lat":"-37.8136", + "long":"144.9631" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":1, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":2, + "1/31/20":3, + "2/1/20":4, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":4, + "2/18/20":4, + "2/19/20":4, + "2/2/20":4, + "2/20/20":4, + "2/21/20":4, + "2/22/20":4, + "2/23/20":4, + "2/24/20":4, + "2/25/20":4, + "2/26/20":4, + "2/27/20":4, + "2/28/20":4, + "2/29/20":7, + "2/3/20":4, + "2/4/20":4, + "2/5/20":4, + "2/6/20":4, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":7, + "3/10/20":18, + "3/11/20":21, + "3/12/20":21, + "3/13/20":36, + "3/14/20":49, + "3/15/20":57, + "3/2/20":9, + "3/3/20":9, + "3/4/20":10, + "3/5/20":10, + "3/6/20":10, + "3/7/20":11, + "3/8/20":11, + "3/9/20":15 + }, + "latest":57, + "province":"Victoria" + }, + { + "coordinates":{ + "lat":"-28.0167", + "long":"153.4" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":0, + "1/28/20":0, + "1/29/20":1, + "1/30/20":3, + "1/31/20":2, + "2/1/20":3, + "2/10/20":5, + "2/11/20":5, + "2/12/20":5, + "2/13/20":5, + "2/14/20":5, + "2/15/20":5, + "2/16/20":5, + "2/17/20":5, + "2/18/20":5, + "2/19/20":5, + "2/2/20":2, + "2/20/20":5, + "2/21/20":5, + "2/22/20":5, + "2/23/20":5, + "2/24/20":5, + "2/25/20":5, + "2/26/20":5, + "2/27/20":5, + "2/28/20":5, + "2/29/20":9, + "2/3/20":2, + "2/4/20":3, + "2/5/20":3, + "2/6/20":4, + "2/7/20":5, + "2/8/20":5, + "2/9/20":5, + "3/1/20":9, + "3/10/20":18, + "3/11/20":20, + "3/12/20":20, + "3/13/20":35, + "3/14/20":46, + "3/15/20":61, + "3/2/20":9, + "3/3/20":11, + "3/4/20":11, + "3/5/20":13, + "3/6/20":13, + "3/7/20":13, + "3/8/20":15, + "3/9/20":15 + }, + "latest":61, + "province":"Queensland" + }, + { + "coordinates":{ + "lat":"11.55", + "long":"104.9167" + }, + "country":"Cambodia", + "country_code":"KH", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":1, + "2/11/20":1, + "2/12/20":1, + "2/13/20":1, + "2/14/20":1, + "2/15/20":1, + "2/16/20":1, + "2/17/20":1, + "2/18/20":1, + "2/19/20":1, + "2/2/20":1, + "2/20/20":1, + "2/21/20":1, + "2/22/20":1, + "2/23/20":1, + "2/24/20":1, + "2/25/20":1, + "2/26/20":1, + "2/27/20":1, + "2/28/20":1, + "2/29/20":1, + "2/3/20":1, + "2/4/20":1, + "2/5/20":1, + "2/6/20":1, + "2/7/20":1, + "2/8/20":1, + "2/9/20":1, + "3/1/20":1, + "3/10/20":2, + "3/11/20":3, + "3/12/20":3, + "3/13/20":5, + "3/14/20":7, + "3/15/20":7, + "3/2/20":1, + "3/3/20":1, + "3/4/20":1, + "3/5/20":1, + "3/6/20":1, + "3/7/20":1, + "3/8/20":2, + "3/9/20":2 + }, + "latest":7, + "province":"" + } + ], + "source":"https://github.com/ExpDev07/coronavirus-tracker-api" + }, + "deaths":{ + "last_updated":"2020-03-17T10:23:22.505550Z", + "latest":1940, + "locations":[ + { + "coordinates":{ + "lat":"15", + "long":"101" + }, + "country":"Thailand", + "country_code":"TH", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":2, + "1/23/20":3, + "1/24/20":5, + "1/25/20":7, + "1/26/20":8, + "1/27/20":8, + "1/28/20":14, + "1/29/20":14, + "1/30/20":14, + "1/31/20":19, + "2/1/20":19, + "2/10/20":32, + "2/11/20":33, + "2/12/20":33, + "2/13/20":33, + "2/14/20":33, + "2/15/20":33, + "2/16/20":34, + "2/17/20":35, + "2/18/20":35, + "2/19/20":35, + "2/2/20":19, + "2/20/20":35, + "2/21/20":35, + "2/22/20":35, + "2/23/20":35, + "2/24/20":35, + "2/25/20":37, + "2/26/20":40, + "2/27/20":40, + "2/28/20":41, + "2/29/20":42, + "2/3/20":19, + "2/4/20":25, + "2/5/20":25, + "2/6/20":25, + "2/7/20":25, + "2/8/20":32, + "2/9/20":32, + "3/1/20":42, + "3/10/20":53, + "3/11/20":59, + "3/12/20":70, + "3/13/20":75, + "3/14/20":82, + "3/15/20":114, + "3/2/20":43, + "3/3/20":43, + "3/4/20":43, + "3/5/20":47, + "3/6/20":48, + "3/7/20":50, + "3/8/20":50, + "3/9/20":50 + }, + "latest":114, + "province":"" + }, + { + "coordinates":{ + "lat":"36", + "long":"138" + }, + "country":"Japan", + "country_code":"JP", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":2, + "1/23/20":1, + "1/24/20":2, + "1/25/20":2, + "1/26/20":4, + "1/27/20":4, + "1/28/20":7, + "1/29/20":7, + "1/30/20":11, + "1/31/20":15, + "2/1/20":20, + "2/10/20":26, + "2/11/20":26, + "2/12/20":28, + "2/13/20":28, + "2/14/20":29, + "2/15/20":43, + "2/16/20":59, + "2/17/20":66, + "2/18/20":74, + "2/19/20":84, + "2/2/20":20, + "2/20/20":94, + "2/21/20":105, + "2/22/20":122, + "2/23/20":147, + "2/24/20":159, + "2/25/20":170, + "2/26/20":189, + "2/27/20":214, + "2/28/20":228, + "2/29/20":241, + "2/3/20":20, + "2/4/20":22, + "2/5/20":22, + "2/6/20":45, + "2/7/20":25, + "2/8/20":25, + "2/9/20":26, + "3/1/20":256, + "3/10/20":581, + "3/11/20":639, + "3/12/20":639, + "3/13/20":701, + "3/14/20":773, + "3/15/20":839, + "3/2/20":274, + "3/3/20":293, + "3/4/20":331, + "3/5/20":360, + "3/6/20":420, + "3/7/20":461, + "3/8/20":502, + "3/9/20":511 + }, + "latest":839, + "province":"" + }, + { + "coordinates":{ + "lat":"1.2833", + "long":"103.8333" + }, + "country":"Singapore", + "country_code":"SG", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":1, + "1/24/20":3, + "1/25/20":3, + "1/26/20":4, + "1/27/20":5, + "1/28/20":7, + "1/29/20":7, + "1/30/20":10, + "1/31/20":13, + "2/1/20":16, + "2/10/20":45, + "2/11/20":47, + "2/12/20":50, + "2/13/20":58, + "2/14/20":67, + "2/15/20":72, + "2/16/20":75, + "2/17/20":77, + "2/18/20":81, + "2/19/20":84, + "2/2/20":18, + "2/20/20":84, + "2/21/20":85, + "2/22/20":85, + "2/23/20":89, + "2/24/20":89, + "2/25/20":91, + "2/26/20":93, + "2/27/20":93, + "2/28/20":93, + "2/29/20":102, + "2/3/20":18, + "2/4/20":24, + "2/5/20":28, + "2/6/20":28, + "2/7/20":30, + "2/8/20":33, + "2/9/20":40, + "3/1/20":106, + "3/10/20":160, + "3/11/20":178, + "3/12/20":178, + "3/13/20":200, + "3/14/20":212, + "3/15/20":226, + "3/2/20":108, + "3/3/20":110, + "3/4/20":110, + "3/5/20":117, + "3/6/20":130, + "3/7/20":138, + "3/8/20":150, + "3/9/20":150 + }, + "latest":226, + "province":"" + }, + { + "coordinates":{ + "lat":"28.1667", + "long":"84.25" + }, + "country":"Nepal", + "country_code":"NP", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":1, + "1/26/20":1, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":1, + "2/11/20":1, + "2/12/20":1, + "2/13/20":1, + "2/14/20":1, + "2/15/20":1, + "2/16/20":1, + "2/17/20":1, + "2/18/20":1, + "2/19/20":1, + "2/2/20":1, + "2/20/20":1, + "2/21/20":1, + "2/22/20":1, + "2/23/20":1, + "2/24/20":1, + "2/25/20":1, + "2/26/20":1, + "2/27/20":1, + "2/28/20":1, + "2/29/20":1, + "2/3/20":1, + "2/4/20":1, + "2/5/20":1, + "2/6/20":1, + "2/7/20":1, + "2/8/20":1, + "2/9/20":1, + "3/1/20":1, + "3/10/20":1, + "3/11/20":1, + "3/12/20":1, + "3/13/20":1, + "3/14/20":1, + "3/15/20":1, + "3/2/20":1, + "3/3/20":1, + "3/4/20":1, + "3/5/20":1, + "3/6/20":1, + "3/7/20":1, + "3/8/20":1, + "3/9/20":1 + }, + "latest":1, + "province":"" + }, + { + "coordinates":{ + "lat":"2.5", + "long":"112.5" + }, + "country":"Malaysia", + "country_code":"MY", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":3, + "1/26/20":4, + "1/27/20":4, + "1/28/20":4, + "1/29/20":7, + "1/30/20":8, + "1/31/20":8, + "2/1/20":8, + "2/10/20":18, + "2/11/20":18, + "2/12/20":18, + "2/13/20":19, + "2/14/20":19, + "2/15/20":22, + "2/16/20":22, + "2/17/20":22, + "2/18/20":22, + "2/19/20":22, + "2/2/20":8, + "2/20/20":22, + "2/21/20":22, + "2/22/20":22, + "2/23/20":22, + "2/24/20":22, + "2/25/20":22, + "2/26/20":22, + "2/27/20":23, + "2/28/20":23, + "2/29/20":25, + "2/3/20":8, + "2/4/20":10, + "2/5/20":12, + "2/6/20":12, + "2/7/20":12, + "2/8/20":16, + "2/9/20":16, + "3/1/20":29, + "3/10/20":129, + "3/11/20":149, + "3/12/20":149, + "3/13/20":197, + "3/14/20":238, + "3/15/20":428, + "3/2/20":29, + "3/3/20":36, + "3/4/20":50, + "3/5/20":50, + "3/6/20":83, + "3/7/20":93, + "3/8/20":99, + "3/9/20":117 + }, + "latest":428, + "province":"" + }, + { + "coordinates":{ + "lat":"49.2827", + "long":"-123.1207" + }, + "country":"Canada", + "country_code":"CA", + "continent_codes_set":["NAC"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":0, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":5, + "2/18/20":5, + "2/19/20":5, + "2/2/20":1, + "2/20/20":5, + "2/21/20":6, + "2/22/20":6, + "2/23/20":6, + "2/24/20":6, + "2/25/20":7, + "2/26/20":7, + "2/27/20":7, + "2/28/20":7, + "2/29/20":8, + "2/3/20":1, + "2/4/20":1, + "2/5/20":2, + "2/6/20":2, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":8, + "3/10/20":32, + "3/11/20":39, + "3/12/20":46, + "3/13/20":64, + "3/14/20":64, + "3/15/20":73, + "3/2/20":8, + "3/3/20":9, + "3/4/20":12, + "3/5/20":13, + "3/6/20":21, + "3/7/20":21, + "3/8/20":27, + "3/9/20":32 + }, + "latest":73, + "province":"British Columbia" + }, + { + "coordinates":{ + "lat":"-33.8688", + "long":"151.2093" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":3, + "1/27/20":4, + "1/28/20":4, + "1/29/20":4, + "1/30/20":4, + "1/31/20":4, + "2/1/20":4, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":4, + "2/18/20":4, + "2/19/20":4, + "2/2/20":4, + "2/20/20":4, + "2/21/20":4, + "2/22/20":4, + "2/23/20":4, + "2/24/20":4, + "2/25/20":4, + "2/26/20":4, + "2/27/20":4, + "2/28/20":4, + "2/29/20":4, + "2/3/20":4, + "2/4/20":4, + "2/5/20":4, + "2/6/20":4, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":6, + "3/10/20":55, + "3/11/20":65, + "3/12/20":65, + "3/13/20":92, + "3/14/20":112, + "3/15/20":134, + "3/2/20":6, + "3/3/20":13, + "3/4/20":22, + "3/5/20":22, + "3/6/20":26, + "3/7/20":28, + "3/8/20":38, + "3/9/20":48 + }, + "latest":134, + "province":"New South Wales" + }, + { + "coordinates":{ + "lat":"-37.8136", + "long":"144.9631" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":1, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":2, + "1/31/20":3, + "2/1/20":4, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":4, + "2/18/20":4, + "2/19/20":4, + "2/2/20":4, + "2/20/20":4, + "2/21/20":4, + "2/22/20":4, + "2/23/20":4, + "2/24/20":4, + "2/25/20":4, + "2/26/20":4, + "2/27/20":4, + "2/28/20":4, + "2/29/20":7, + "2/3/20":4, + "2/4/20":4, + "2/5/20":4, + "2/6/20":4, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":7, + "3/10/20":18, + "3/11/20":21, + "3/12/20":21, + "3/13/20":36, + "3/14/20":49, + "3/15/20":57, + "3/2/20":9, + "3/3/20":9, + "3/4/20":10, + "3/5/20":10, + "3/6/20":10, + "3/7/20":11, + "3/8/20":11, + "3/9/20":15 + }, + "latest":57, + "province":"Victoria" + }, + { + "coordinates":{ + "lat":"-28.0167", + "long":"153.4" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":0, + "1/28/20":0, + "1/29/20":1, + "1/30/20":3, + "1/31/20":2, + "2/1/20":3, + "2/10/20":5, + "2/11/20":5, + "2/12/20":5, + "2/13/20":5, + "2/14/20":5, + "2/15/20":5, + "2/16/20":5, + "2/17/20":5, + "2/18/20":5, + "2/19/20":5, + "2/2/20":2, + "2/20/20":5, + "2/21/20":5, + "2/22/20":5, + "2/23/20":5, + "2/24/20":5, + "2/25/20":5, + "2/26/20":5, + "2/27/20":5, + "2/28/20":5, + "2/29/20":9, + "2/3/20":2, + "2/4/20":3, + "2/5/20":3, + "2/6/20":4, + "2/7/20":5, + "2/8/20":5, + "2/9/20":5, + "3/1/20":9, + "3/10/20":18, + "3/11/20":20, + "3/12/20":20, + "3/13/20":35, + "3/14/20":46, + "3/15/20":61, + "3/2/20":9, + "3/3/20":11, + "3/4/20":11, + "3/5/20":13, + "3/6/20":13, + "3/7/20":13, + "3/8/20":15, + "3/9/20":15 + }, + "latest":61, + "province":"Queensland" + }, + { + "coordinates":{ + "lat":"11.55", + "long":"104.9167" + }, + "country":"Cambodia", + "country_code":"KH", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":1, + "2/11/20":1, + "2/12/20":1, + "2/13/20":1, + "2/14/20":1, + "2/15/20":1, + "2/16/20":1, + "2/17/20":1, + "2/18/20":1, + "2/19/20":1, + "2/2/20":1, + "2/20/20":1, + "2/21/20":1, + "2/22/20":1, + "2/23/20":1, + "2/24/20":1, + "2/25/20":1, + "2/26/20":1, + "2/27/20":1, + "2/28/20":1, + "2/29/20":1, + "2/3/20":1, + "2/4/20":1, + "2/5/20":1, + "2/6/20":1, + "2/7/20":1, + "2/8/20":1, + "2/9/20":1, + "3/1/20":1, + "3/10/20":2, + "3/11/20":3, + "3/12/20":3, + "3/13/20":5, + "3/14/20":7, + "3/15/20":7, + "3/2/20":1, + "3/3/20":1, + "3/4/20":1, + "3/5/20":1, + "3/6/20":1, + "3/7/20":1, + "3/8/20":2, + "3/9/20":2 + }, + "latest":7, + "province":"" + } + ], + "source":"https://github.com/ExpDev07/coronavirus-tracker-api" + }, + "latest":{ + "confirmed":1940, + "deaths":1940, + "recovered":1940 + }, + "recovered":{ + "last_updated":"2020-03-17T10:23:22.505550Z", + "latest":1940, + "locations":[ + { + "coordinates":{ + "lat":"15", + "long":"101" + }, + "country":"Thailand", + "country_code":"TH", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":2, + "1/23/20":3, + "1/24/20":5, + "1/25/20":7, + "1/26/20":8, + "1/27/20":8, + "1/28/20":14, + "1/29/20":14, + "1/30/20":14, + "1/31/20":19, + "2/1/20":19, + "2/10/20":32, + "2/11/20":33, + "2/12/20":33, + "2/13/20":33, + "2/14/20":33, + "2/15/20":33, + "2/16/20":34, + "2/17/20":35, + "2/18/20":35, + "2/19/20":35, + "2/2/20":19, + "2/20/20":35, + "2/21/20":35, + "2/22/20":35, + "2/23/20":35, + "2/24/20":35, + "2/25/20":37, + "2/26/20":40, + "2/27/20":40, + "2/28/20":41, + "2/29/20":42, + "2/3/20":19, + "2/4/20":25, + "2/5/20":25, + "2/6/20":25, + "2/7/20":25, + "2/8/20":32, + "2/9/20":32, + "3/1/20":42, + "3/10/20":53, + "3/11/20":59, + "3/12/20":70, + "3/13/20":75, + "3/14/20":82, + "3/15/20":114, + "3/2/20":43, + "3/3/20":43, + "3/4/20":43, + "3/5/20":47, + "3/6/20":48, + "3/7/20":50, + "3/8/20":50, + "3/9/20":50 + }, + "latest":114, + "province":"" + }, + { + "coordinates":{ + "lat":"36", + "long":"138" + }, + "country":"Japan", + "country_code":"JP", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":2, + "1/23/20":1, + "1/24/20":2, + "1/25/20":2, + "1/26/20":4, + "1/27/20":4, + "1/28/20":7, + "1/29/20":7, + "1/30/20":11, + "1/31/20":15, + "2/1/20":20, + "2/10/20":26, + "2/11/20":26, + "2/12/20":28, + "2/13/20":28, + "2/14/20":29, + "2/15/20":43, + "2/16/20":59, + "2/17/20":66, + "2/18/20":74, + "2/19/20":84, + "2/2/20":20, + "2/20/20":94, + "2/21/20":105, + "2/22/20":122, + "2/23/20":147, + "2/24/20":159, + "2/25/20":170, + "2/26/20":189, + "2/27/20":214, + "2/28/20":228, + "2/29/20":241, + "2/3/20":20, + "2/4/20":22, + "2/5/20":22, + "2/6/20":45, + "2/7/20":25, + "2/8/20":25, + "2/9/20":26, + "3/1/20":256, + "3/10/20":581, + "3/11/20":639, + "3/12/20":639, + "3/13/20":701, + "3/14/20":773, + "3/15/20":839, + "3/2/20":274, + "3/3/20":293, + "3/4/20":331, + "3/5/20":360, + "3/6/20":420, + "3/7/20":461, + "3/8/20":502, + "3/9/20":511 + }, + "latest":839, + "province":"" + }, + { + "coordinates":{ + "lat":"1.2833", + "long":"103.8333" + }, + "country":"Singapore", + "country_code":"SG", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":1, + "1/24/20":3, + "1/25/20":3, + "1/26/20":4, + "1/27/20":5, + "1/28/20":7, + "1/29/20":7, + "1/30/20":10, + "1/31/20":13, + "2/1/20":16, + "2/10/20":45, + "2/11/20":47, + "2/12/20":50, + "2/13/20":58, + "2/14/20":67, + "2/15/20":72, + "2/16/20":75, + "2/17/20":77, + "2/18/20":81, + "2/19/20":84, + "2/2/20":18, + "2/20/20":84, + "2/21/20":85, + "2/22/20":85, + "2/23/20":89, + "2/24/20":89, + "2/25/20":91, + "2/26/20":93, + "2/27/20":93, + "2/28/20":93, + "2/29/20":102, + "2/3/20":18, + "2/4/20":24, + "2/5/20":28, + "2/6/20":28, + "2/7/20":30, + "2/8/20":33, + "2/9/20":40, + "3/1/20":106, + "3/10/20":160, + "3/11/20":178, + "3/12/20":178, + "3/13/20":200, + "3/14/20":212, + "3/15/20":226, + "3/2/20":108, + "3/3/20":110, + "3/4/20":110, + "3/5/20":117, + "3/6/20":130, + "3/7/20":138, + "3/8/20":150, + "3/9/20":150 + }, + "latest":226, + "province":"" + }, + { + "coordinates":{ + "lat":"28.1667", + "long":"84.25" + }, + "country":"Nepal", + "country_code":"NP", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":1, + "1/26/20":1, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":1, + "2/11/20":1, + "2/12/20":1, + "2/13/20":1, + "2/14/20":1, + "2/15/20":1, + "2/16/20":1, + "2/17/20":1, + "2/18/20":1, + "2/19/20":1, + "2/2/20":1, + "2/20/20":1, + "2/21/20":1, + "2/22/20":1, + "2/23/20":1, + "2/24/20":1, + "2/25/20":1, + "2/26/20":1, + "2/27/20":1, + "2/28/20":1, + "2/29/20":1, + "2/3/20":1, + "2/4/20":1, + "2/5/20":1, + "2/6/20":1, + "2/7/20":1, + "2/8/20":1, + "2/9/20":1, + "3/1/20":1, + "3/10/20":1, + "3/11/20":1, + "3/12/20":1, + "3/13/20":1, + "3/14/20":1, + "3/15/20":1, + "3/2/20":1, + "3/3/20":1, + "3/4/20":1, + "3/5/20":1, + "3/6/20":1, + "3/7/20":1, + "3/8/20":1, + "3/9/20":1 + }, + "latest":1, + "province":"" + }, + { + "coordinates":{ + "lat":"2.5", + "long":"112.5" + }, + "country":"Malaysia", + "country_code":"MY", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":3, + "1/26/20":4, + "1/27/20":4, + "1/28/20":4, + "1/29/20":7, + "1/30/20":8, + "1/31/20":8, + "2/1/20":8, + "2/10/20":18, + "2/11/20":18, + "2/12/20":18, + "2/13/20":19, + "2/14/20":19, + "2/15/20":22, + "2/16/20":22, + "2/17/20":22, + "2/18/20":22, + "2/19/20":22, + "2/2/20":8, + "2/20/20":22, + "2/21/20":22, + "2/22/20":22, + "2/23/20":22, + "2/24/20":22, + "2/25/20":22, + "2/26/20":22, + "2/27/20":23, + "2/28/20":23, + "2/29/20":25, + "2/3/20":8, + "2/4/20":10, + "2/5/20":12, + "2/6/20":12, + "2/7/20":12, + "2/8/20":16, + "2/9/20":16, + "3/1/20":29, + "3/10/20":129, + "3/11/20":149, + "3/12/20":149, + "3/13/20":197, + "3/14/20":238, + "3/15/20":428, + "3/2/20":29, + "3/3/20":36, + "3/4/20":50, + "3/5/20":50, + "3/6/20":83, + "3/7/20":93, + "3/8/20":99, + "3/9/20":117 + }, + "latest":428, + "province":"" + }, + { + "coordinates":{ + "lat":"49.2827", + "long":"-123.1207" + }, + "country":"Canada", + "country_code":"CA", + "continent_codes_set":["NAC"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":0, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":5, + "2/18/20":5, + "2/19/20":5, + "2/2/20":1, + "2/20/20":5, + "2/21/20":6, + "2/22/20":6, + "2/23/20":6, + "2/24/20":6, + "2/25/20":7, + "2/26/20":7, + "2/27/20":7, + "2/28/20":7, + "2/29/20":8, + "2/3/20":1, + "2/4/20":1, + "2/5/20":2, + "2/6/20":2, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":8, + "3/10/20":32, + "3/11/20":39, + "3/12/20":46, + "3/13/20":64, + "3/14/20":64, + "3/15/20":73, + "3/2/20":8, + "3/3/20":9, + "3/4/20":12, + "3/5/20":13, + "3/6/20":21, + "3/7/20":21, + "3/8/20":27, + "3/9/20":32 + }, + "latest":73, + "province":"British Columbia" + }, + { + "coordinates":{ + "lat":"-33.8688", + "long":"151.2093" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":3, + "1/27/20":4, + "1/28/20":4, + "1/29/20":4, + "1/30/20":4, + "1/31/20":4, + "2/1/20":4, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":4, + "2/18/20":4, + "2/19/20":4, + "2/2/20":4, + "2/20/20":4, + "2/21/20":4, + "2/22/20":4, + "2/23/20":4, + "2/24/20":4, + "2/25/20":4, + "2/26/20":4, + "2/27/20":4, + "2/28/20":4, + "2/29/20":4, + "2/3/20":4, + "2/4/20":4, + "2/5/20":4, + "2/6/20":4, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":6, + "3/10/20":55, + "3/11/20":65, + "3/12/20":65, + "3/13/20":92, + "3/14/20":112, + "3/15/20":134, + "3/2/20":6, + "3/3/20":13, + "3/4/20":22, + "3/5/20":22, + "3/6/20":26, + "3/7/20":28, + "3/8/20":38, + "3/9/20":48 + }, + "latest":134, + "province":"New South Wales" + }, + { + "coordinates":{ + "lat":"-37.8136", + "long":"144.9631" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":1, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":2, + "1/31/20":3, + "2/1/20":4, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":4, + "2/18/20":4, + "2/19/20":4, + "2/2/20":4, + "2/20/20":4, + "2/21/20":4, + "2/22/20":4, + "2/23/20":4, + "2/24/20":4, + "2/25/20":4, + "2/26/20":4, + "2/27/20":4, + "2/28/20":4, + "2/29/20":7, + "2/3/20":4, + "2/4/20":4, + "2/5/20":4, + "2/6/20":4, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":7, + "3/10/20":18, + "3/11/20":21, + "3/12/20":21, + "3/13/20":36, + "3/14/20":49, + "3/15/20":57, + "3/2/20":9, + "3/3/20":9, + "3/4/20":10, + "3/5/20":10, + "3/6/20":10, + "3/7/20":11, + "3/8/20":11, + "3/9/20":15 + }, + "latest":57, + "province":"Victoria" + }, + { + "coordinates":{ + "lat":"-28.0167", + "long":"153.4" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":0, + "1/28/20":0, + "1/29/20":1, + "1/30/20":3, + "1/31/20":2, + "2/1/20":3, + "2/10/20":5, + "2/11/20":5, + "2/12/20":5, + "2/13/20":5, + "2/14/20":5, + "2/15/20":5, + "2/16/20":5, + "2/17/20":5, + "2/18/20":5, + "2/19/20":5, + "2/2/20":2, + "2/20/20":5, + "2/21/20":5, + "2/22/20":5, + "2/23/20":5, + "2/24/20":5, + "2/25/20":5, + "2/26/20":5, + "2/27/20":5, + "2/28/20":5, + "2/29/20":9, + "2/3/20":2, + "2/4/20":3, + "2/5/20":3, + "2/6/20":4, + "2/7/20":5, + "2/8/20":5, + "2/9/20":5, + "3/1/20":9, + "3/10/20":18, + "3/11/20":20, + "3/12/20":20, + "3/13/20":35, + "3/14/20":46, + "3/15/20":61, + "3/2/20":9, + "3/3/20":11, + "3/4/20":11, + "3/5/20":13, + "3/6/20":13, + "3/7/20":13, + "3/8/20":15, + "3/9/20":15 + }, + "latest":61, + "province":"Queensland" + }, + { + "coordinates":{ + "lat":"11.55", + "long":"104.9167" + }, + "country":"Cambodia", + "country_code":"KH", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":1, + "2/11/20":1, + "2/12/20":1, + "2/13/20":1, + "2/14/20":1, + "2/15/20":1, + "2/16/20":1, + "2/17/20":1, + "2/18/20":1, + "2/19/20":1, + "2/2/20":1, + "2/20/20":1, + "2/21/20":1, + "2/22/20":1, + "2/23/20":1, + "2/24/20":1, + "2/25/20":1, + "2/26/20":1, + "2/27/20":1, + "2/28/20":1, + "2/29/20":1, + "2/3/20":1, + "2/4/20":1, + "2/5/20":1, + "2/6/20":1, + "2/7/20":1, + "2/8/20":1, + "2/9/20":1, + "3/1/20":1, + "3/10/20":2, + "3/11/20":3, + "3/12/20":3, + "3/13/20":5, + "3/14/20":7, + "3/15/20":7, + "3/2/20":1, + "3/3/20":1, + "3/4/20":1, + "3/5/20":1, + "3/6/20":1, + "3/7/20":1, + "3/8/20":2, + "3/9/20":2 + }, + "latest":7, + "province":"" + } + ], + "source":"https://github.com/ExpDev07/coronavirus-tracker-api" + } +} diff --git a/tests/expected_output/v1_confirmed.json b/tests/expected_output/v1_confirmed.json index 48dc9cc2..30c65ac7 100644 --- a/tests/expected_output/v1_confirmed.json +++ b/tests/expected_output/v1_confirmed.json @@ -1 +1,677 @@ -{"last_updated":"2020-03-17T10:23:22.505550Z","latest":1940,"locations":[{"coordinates":{"lat":"15","long":"101"},"country":"Thailand","country_code":"TH","history":{"1/22/20":2,"1/23/20":3,"1/24/20":5,"1/25/20":7,"1/26/20":8,"1/27/20":8,"1/28/20":14,"1/29/20":14,"1/30/20":14,"1/31/20":19,"2/1/20":19,"2/10/20":32,"2/11/20":33,"2/12/20":33,"2/13/20":33,"2/14/20":33,"2/15/20":33,"2/16/20":34,"2/17/20":35,"2/18/20":35,"2/19/20":35,"2/2/20":19,"2/20/20":35,"2/21/20":35,"2/22/20":35,"2/23/20":35,"2/24/20":35,"2/25/20":37,"2/26/20":40,"2/27/20":40,"2/28/20":41,"2/29/20":42,"2/3/20":19,"2/4/20":25,"2/5/20":25,"2/6/20":25,"2/7/20":25,"2/8/20":32,"2/9/20":32,"3/1/20":42,"3/10/20":53,"3/11/20":59,"3/12/20":70,"3/13/20":75,"3/14/20":82,"3/15/20":114,"3/2/20":43,"3/3/20":43,"3/4/20":43,"3/5/20":47,"3/6/20":48,"3/7/20":50,"3/8/20":50,"3/9/20":50},"latest":114,"province":""},{"coordinates":{"lat":"36","long":"138"},"country":"Japan","country_code":"JP","history":{"1/22/20":2,"1/23/20":1,"1/24/20":2,"1/25/20":2,"1/26/20":4,"1/27/20":4,"1/28/20":7,"1/29/20":7,"1/30/20":11,"1/31/20":15,"2/1/20":20,"2/10/20":26,"2/11/20":26,"2/12/20":28,"2/13/20":28,"2/14/20":29,"2/15/20":43,"2/16/20":59,"2/17/20":66,"2/18/20":74,"2/19/20":84,"2/2/20":20,"2/20/20":94,"2/21/20":105,"2/22/20":122,"2/23/20":147,"2/24/20":159,"2/25/20":170,"2/26/20":189,"2/27/20":214,"2/28/20":228,"2/29/20":241,"2/3/20":20,"2/4/20":22,"2/5/20":22,"2/6/20":45,"2/7/20":25,"2/8/20":25,"2/9/20":26,"3/1/20":256,"3/10/20":581,"3/11/20":639,"3/12/20":639,"3/13/20":701,"3/14/20":773,"3/15/20":839,"3/2/20":274,"3/3/20":293,"3/4/20":331,"3/5/20":360,"3/6/20":420,"3/7/20":461,"3/8/20":502,"3/9/20":511},"latest":839,"province":""},{"coordinates":{"lat":"1.2833","long":"103.8333"},"country":"Singapore","country_code":"SG","history":{"1/22/20":0,"1/23/20":1,"1/24/20":3,"1/25/20":3,"1/26/20":4,"1/27/20":5,"1/28/20":7,"1/29/20":7,"1/30/20":10,"1/31/20":13,"2/1/20":16,"2/10/20":45,"2/11/20":47,"2/12/20":50,"2/13/20":58,"2/14/20":67,"2/15/20":72,"2/16/20":75,"2/17/20":77,"2/18/20":81,"2/19/20":84,"2/2/20":18,"2/20/20":84,"2/21/20":85,"2/22/20":85,"2/23/20":89,"2/24/20":89,"2/25/20":91,"2/26/20":93,"2/27/20":93,"2/28/20":93,"2/29/20":102,"2/3/20":18,"2/4/20":24,"2/5/20":28,"2/6/20":28,"2/7/20":30,"2/8/20":33,"2/9/20":40,"3/1/20":106,"3/10/20":160,"3/11/20":178,"3/12/20":178,"3/13/20":200,"3/14/20":212,"3/15/20":226,"3/2/20":108,"3/3/20":110,"3/4/20":110,"3/5/20":117,"3/6/20":130,"3/7/20":138,"3/8/20":150,"3/9/20":150},"latest":226,"province":""},{"coordinates":{"lat":"28.1667","long":"84.25"},"country":"Nepal","country_code":"NP","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":1,"1/26/20":1,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":1,"2/11/20":1,"2/12/20":1,"2/13/20":1,"2/14/20":1,"2/15/20":1,"2/16/20":1,"2/17/20":1,"2/18/20":1,"2/19/20":1,"2/2/20":1,"2/20/20":1,"2/21/20":1,"2/22/20":1,"2/23/20":1,"2/24/20":1,"2/25/20":1,"2/26/20":1,"2/27/20":1,"2/28/20":1,"2/29/20":1,"2/3/20":1,"2/4/20":1,"2/5/20":1,"2/6/20":1,"2/7/20":1,"2/8/20":1,"2/9/20":1,"3/1/20":1,"3/10/20":1,"3/11/20":1,"3/12/20":1,"3/13/20":1,"3/14/20":1,"3/15/20":1,"3/2/20":1,"3/3/20":1,"3/4/20":1,"3/5/20":1,"3/6/20":1,"3/7/20":1,"3/8/20":1,"3/9/20":1},"latest":1,"province":""},{"coordinates":{"lat":"2.5","long":"112.5"},"country":"Malaysia","country_code":"MY","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":3,"1/26/20":4,"1/27/20":4,"1/28/20":4,"1/29/20":7,"1/30/20":8,"1/31/20":8,"2/1/20":8,"2/10/20":18,"2/11/20":18,"2/12/20":18,"2/13/20":19,"2/14/20":19,"2/15/20":22,"2/16/20":22,"2/17/20":22,"2/18/20":22,"2/19/20":22,"2/2/20":8,"2/20/20":22,"2/21/20":22,"2/22/20":22,"2/23/20":22,"2/24/20":22,"2/25/20":22,"2/26/20":22,"2/27/20":23,"2/28/20":23,"2/29/20":25,"2/3/20":8,"2/4/20":10,"2/5/20":12,"2/6/20":12,"2/7/20":12,"2/8/20":16,"2/9/20":16,"3/1/20":29,"3/10/20":129,"3/11/20":149,"3/12/20":149,"3/13/20":197,"3/14/20":238,"3/15/20":428,"3/2/20":29,"3/3/20":36,"3/4/20":50,"3/5/20":50,"3/6/20":83,"3/7/20":93,"3/8/20":99,"3/9/20":117},"latest":428,"province":""},{"coordinates":{"lat":"49.2827","long":"-123.1207"},"country":"Canada","country_code":"CA","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":0,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":5,"2/18/20":5,"2/19/20":5,"2/2/20":1,"2/20/20":5,"2/21/20":6,"2/22/20":6,"2/23/20":6,"2/24/20":6,"2/25/20":7,"2/26/20":7,"2/27/20":7,"2/28/20":7,"2/29/20":8,"2/3/20":1,"2/4/20":1,"2/5/20":2,"2/6/20":2,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":8,"3/10/20":32,"3/11/20":39,"3/12/20":46,"3/13/20":64,"3/14/20":64,"3/15/20":73,"3/2/20":8,"3/3/20":9,"3/4/20":12,"3/5/20":13,"3/6/20":21,"3/7/20":21,"3/8/20":27,"3/9/20":32},"latest":73,"province":"British Columbia"},{"coordinates":{"lat":"-33.8688","long":"151.2093"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":3,"1/27/20":4,"1/28/20":4,"1/29/20":4,"1/30/20":4,"1/31/20":4,"2/1/20":4,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":4,"2/18/20":4,"2/19/20":4,"2/2/20":4,"2/20/20":4,"2/21/20":4,"2/22/20":4,"2/23/20":4,"2/24/20":4,"2/25/20":4,"2/26/20":4,"2/27/20":4,"2/28/20":4,"2/29/20":4,"2/3/20":4,"2/4/20":4,"2/5/20":4,"2/6/20":4,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":6,"3/10/20":55,"3/11/20":65,"3/12/20":65,"3/13/20":92,"3/14/20":112,"3/15/20":134,"3/2/20":6,"3/3/20":13,"3/4/20":22,"3/5/20":22,"3/6/20":26,"3/7/20":28,"3/8/20":38,"3/9/20":48},"latest":134,"province":"New South Wales"},{"coordinates":{"lat":"-37.8136","long":"144.9631"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":1,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":2,"1/31/20":3,"2/1/20":4,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":4,"2/18/20":4,"2/19/20":4,"2/2/20":4,"2/20/20":4,"2/21/20":4,"2/22/20":4,"2/23/20":4,"2/24/20":4,"2/25/20":4,"2/26/20":4,"2/27/20":4,"2/28/20":4,"2/29/20":7,"2/3/20":4,"2/4/20":4,"2/5/20":4,"2/6/20":4,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":7,"3/10/20":18,"3/11/20":21,"3/12/20":21,"3/13/20":36,"3/14/20":49,"3/15/20":57,"3/2/20":9,"3/3/20":9,"3/4/20":10,"3/5/20":10,"3/6/20":10,"3/7/20":11,"3/8/20":11,"3/9/20":15},"latest":57,"province":"Victoria"},{"coordinates":{"lat":"-28.0167","long":"153.4"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":0,"1/28/20":0,"1/29/20":1,"1/30/20":3,"1/31/20":2,"2/1/20":3,"2/10/20":5,"2/11/20":5,"2/12/20":5,"2/13/20":5,"2/14/20":5,"2/15/20":5,"2/16/20":5,"2/17/20":5,"2/18/20":5,"2/19/20":5,"2/2/20":2,"2/20/20":5,"2/21/20":5,"2/22/20":5,"2/23/20":5,"2/24/20":5,"2/25/20":5,"2/26/20":5,"2/27/20":5,"2/28/20":5,"2/29/20":9,"2/3/20":2,"2/4/20":3,"2/5/20":3,"2/6/20":4,"2/7/20":5,"2/8/20":5,"2/9/20":5,"3/1/20":9,"3/10/20":18,"3/11/20":20,"3/12/20":20,"3/13/20":35,"3/14/20":46,"3/15/20":61,"3/2/20":9,"3/3/20":11,"3/4/20":11,"3/5/20":13,"3/6/20":13,"3/7/20":13,"3/8/20":15,"3/9/20":15},"latest":61,"province":"Queensland"},{"coordinates":{"lat":"11.55","long":"104.9167"},"country":"Cambodia","country_code":"KH","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":1,"2/11/20":1,"2/12/20":1,"2/13/20":1,"2/14/20":1,"2/15/20":1,"2/16/20":1,"2/17/20":1,"2/18/20":1,"2/19/20":1,"2/2/20":1,"2/20/20":1,"2/21/20":1,"2/22/20":1,"2/23/20":1,"2/24/20":1,"2/25/20":1,"2/26/20":1,"2/27/20":1,"2/28/20":1,"2/29/20":1,"2/3/20":1,"2/4/20":1,"2/5/20":1,"2/6/20":1,"2/7/20":1,"2/8/20":1,"2/9/20":1,"3/1/20":1,"3/10/20":2,"3/11/20":3,"3/12/20":3,"3/13/20":5,"3/14/20":7,"3/15/20":7,"3/2/20":1,"3/3/20":1,"3/4/20":1,"3/5/20":1,"3/6/20":1,"3/7/20":1,"3/8/20":2,"3/9/20":2},"latest":7,"province":""}],"source":"https://github.com/ExpDev07/coronavirus-tracker-api"} +{ + "last_updated":"2020-03-17T10:23:22.505550Z", + "latest":1940, + "locations":[ + { + "coordinates":{ + "lat":"15", + "long":"101" + }, + "country":"Thailand", + "country_code":"TH", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":2, + "1/23/20":3, + "1/24/20":5, + "1/25/20":7, + "1/26/20":8, + "1/27/20":8, + "1/28/20":14, + "1/29/20":14, + "1/30/20":14, + "1/31/20":19, + "2/1/20":19, + "2/10/20":32, + "2/11/20":33, + "2/12/20":33, + "2/13/20":33, + "2/14/20":33, + "2/15/20":33, + "2/16/20":34, + "2/17/20":35, + "2/18/20":35, + "2/19/20":35, + "2/2/20":19, + "2/20/20":35, + "2/21/20":35, + "2/22/20":35, + "2/23/20":35, + "2/24/20":35, + "2/25/20":37, + "2/26/20":40, + "2/27/20":40, + "2/28/20":41, + "2/29/20":42, + "2/3/20":19, + "2/4/20":25, + "2/5/20":25, + "2/6/20":25, + "2/7/20":25, + "2/8/20":32, + "2/9/20":32, + "3/1/20":42, + "3/10/20":53, + "3/11/20":59, + "3/12/20":70, + "3/13/20":75, + "3/14/20":82, + "3/15/20":114, + "3/2/20":43, + "3/3/20":43, + "3/4/20":43, + "3/5/20":47, + "3/6/20":48, + "3/7/20":50, + "3/8/20":50, + "3/9/20":50 + }, + "latest":114, + "province":"" + }, + { + "coordinates":{ + "lat":"36", + "long":"138" + }, + "country":"Japan", + "country_code":"JP", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":2, + "1/23/20":1, + "1/24/20":2, + "1/25/20":2, + "1/26/20":4, + "1/27/20":4, + "1/28/20":7, + "1/29/20":7, + "1/30/20":11, + "1/31/20":15, + "2/1/20":20, + "2/10/20":26, + "2/11/20":26, + "2/12/20":28, + "2/13/20":28, + "2/14/20":29, + "2/15/20":43, + "2/16/20":59, + "2/17/20":66, + "2/18/20":74, + "2/19/20":84, + "2/2/20":20, + "2/20/20":94, + "2/21/20":105, + "2/22/20":122, + "2/23/20":147, + "2/24/20":159, + "2/25/20":170, + "2/26/20":189, + "2/27/20":214, + "2/28/20":228, + "2/29/20":241, + "2/3/20":20, + "2/4/20":22, + "2/5/20":22, + "2/6/20":45, + "2/7/20":25, + "2/8/20":25, + "2/9/20":26, + "3/1/20":256, + "3/10/20":581, + "3/11/20":639, + "3/12/20":639, + "3/13/20":701, + "3/14/20":773, + "3/15/20":839, + "3/2/20":274, + "3/3/20":293, + "3/4/20":331, + "3/5/20":360, + "3/6/20":420, + "3/7/20":461, + "3/8/20":502, + "3/9/20":511 + }, + "latest":839, + "province":"" + }, + { + "coordinates":{ + "lat":"1.2833", + "long":"103.8333" + }, + "country":"Singapore", + "country_code":"SG", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":1, + "1/24/20":3, + "1/25/20":3, + "1/26/20":4, + "1/27/20":5, + "1/28/20":7, + "1/29/20":7, + "1/30/20":10, + "1/31/20":13, + "2/1/20":16, + "2/10/20":45, + "2/11/20":47, + "2/12/20":50, + "2/13/20":58, + "2/14/20":67, + "2/15/20":72, + "2/16/20":75, + "2/17/20":77, + "2/18/20":81, + "2/19/20":84, + "2/2/20":18, + "2/20/20":84, + "2/21/20":85, + "2/22/20":85, + "2/23/20":89, + "2/24/20":89, + "2/25/20":91, + "2/26/20":93, + "2/27/20":93, + "2/28/20":93, + "2/29/20":102, + "2/3/20":18, + "2/4/20":24, + "2/5/20":28, + "2/6/20":28, + "2/7/20":30, + "2/8/20":33, + "2/9/20":40, + "3/1/20":106, + "3/10/20":160, + "3/11/20":178, + "3/12/20":178, + "3/13/20":200, + "3/14/20":212, + "3/15/20":226, + "3/2/20":108, + "3/3/20":110, + "3/4/20":110, + "3/5/20":117, + "3/6/20":130, + "3/7/20":138, + "3/8/20":150, + "3/9/20":150 + }, + "latest":226, + "province":"" + }, + { + "coordinates":{ + "lat":"28.1667", + "long":"84.25" + }, + "country":"Nepal", + "country_code":"NP", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":1, + "1/26/20":1, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":1, + "2/11/20":1, + "2/12/20":1, + "2/13/20":1, + "2/14/20":1, + "2/15/20":1, + "2/16/20":1, + "2/17/20":1, + "2/18/20":1, + "2/19/20":1, + "2/2/20":1, + "2/20/20":1, + "2/21/20":1, + "2/22/20":1, + "2/23/20":1, + "2/24/20":1, + "2/25/20":1, + "2/26/20":1, + "2/27/20":1, + "2/28/20":1, + "2/29/20":1, + "2/3/20":1, + "2/4/20":1, + "2/5/20":1, + "2/6/20":1, + "2/7/20":1, + "2/8/20":1, + "2/9/20":1, + "3/1/20":1, + "3/10/20":1, + "3/11/20":1, + "3/12/20":1, + "3/13/20":1, + "3/14/20":1, + "3/15/20":1, + "3/2/20":1, + "3/3/20":1, + "3/4/20":1, + "3/5/20":1, + "3/6/20":1, + "3/7/20":1, + "3/8/20":1, + "3/9/20":1 + }, + "latest":1, + "province":"" + }, + { + "coordinates":{ + "lat":"2.5", + "long":"112.5" + }, + "country":"Malaysia", + "country_code":"MY", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":3, + "1/26/20":4, + "1/27/20":4, + "1/28/20":4, + "1/29/20":7, + "1/30/20":8, + "1/31/20":8, + "2/1/20":8, + "2/10/20":18, + "2/11/20":18, + "2/12/20":18, + "2/13/20":19, + "2/14/20":19, + "2/15/20":22, + "2/16/20":22, + "2/17/20":22, + "2/18/20":22, + "2/19/20":22, + "2/2/20":8, + "2/20/20":22, + "2/21/20":22, + "2/22/20":22, + "2/23/20":22, + "2/24/20":22, + "2/25/20":22, + "2/26/20":22, + "2/27/20":23, + "2/28/20":23, + "2/29/20":25, + "2/3/20":8, + "2/4/20":10, + "2/5/20":12, + "2/6/20":12, + "2/7/20":12, + "2/8/20":16, + "2/9/20":16, + "3/1/20":29, + "3/10/20":129, + "3/11/20":149, + "3/12/20":149, + "3/13/20":197, + "3/14/20":238, + "3/15/20":428, + "3/2/20":29, + "3/3/20":36, + "3/4/20":50, + "3/5/20":50, + "3/6/20":83, + "3/7/20":93, + "3/8/20":99, + "3/9/20":117 + }, + "latest":428, + "province":"" + }, + { + "coordinates":{ + "lat":"49.2827", + "long":"-123.1207" + }, + "country":"Canada", + "country_code":"CA", + "continent_codes_set":["NAC"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":0, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":5, + "2/18/20":5, + "2/19/20":5, + "2/2/20":1, + "2/20/20":5, + "2/21/20":6, + "2/22/20":6, + "2/23/20":6, + "2/24/20":6, + "2/25/20":7, + "2/26/20":7, + "2/27/20":7, + "2/28/20":7, + "2/29/20":8, + "2/3/20":1, + "2/4/20":1, + "2/5/20":2, + "2/6/20":2, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":8, + "3/10/20":32, + "3/11/20":39, + "3/12/20":46, + "3/13/20":64, + "3/14/20":64, + "3/15/20":73, + "3/2/20":8, + "3/3/20":9, + "3/4/20":12, + "3/5/20":13, + "3/6/20":21, + "3/7/20":21, + "3/8/20":27, + "3/9/20":32 + }, + "latest":73, + "province":"British Columbia" + }, + { + "coordinates":{ + "lat":"-33.8688", + "long":"151.2093" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":3, + "1/27/20":4, + "1/28/20":4, + "1/29/20":4, + "1/30/20":4, + "1/31/20":4, + "2/1/20":4, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":4, + "2/18/20":4, + "2/19/20":4, + "2/2/20":4, + "2/20/20":4, + "2/21/20":4, + "2/22/20":4, + "2/23/20":4, + "2/24/20":4, + "2/25/20":4, + "2/26/20":4, + "2/27/20":4, + "2/28/20":4, + "2/29/20":4, + "2/3/20":4, + "2/4/20":4, + "2/5/20":4, + "2/6/20":4, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":6, + "3/10/20":55, + "3/11/20":65, + "3/12/20":65, + "3/13/20":92, + "3/14/20":112, + "3/15/20":134, + "3/2/20":6, + "3/3/20":13, + "3/4/20":22, + "3/5/20":22, + "3/6/20":26, + "3/7/20":28, + "3/8/20":38, + "3/9/20":48 + }, + "latest":134, + "province":"New South Wales" + }, + { + "coordinates":{ + "lat":"-37.8136", + "long":"144.9631" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":1, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":2, + "1/31/20":3, + "2/1/20":4, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":4, + "2/18/20":4, + "2/19/20":4, + "2/2/20":4, + "2/20/20":4, + "2/21/20":4, + "2/22/20":4, + "2/23/20":4, + "2/24/20":4, + "2/25/20":4, + "2/26/20":4, + "2/27/20":4, + "2/28/20":4, + "2/29/20":7, + "2/3/20":4, + "2/4/20":4, + "2/5/20":4, + "2/6/20":4, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":7, + "3/10/20":18, + "3/11/20":21, + "3/12/20":21, + "3/13/20":36, + "3/14/20":49, + "3/15/20":57, + "3/2/20":9, + "3/3/20":9, + "3/4/20":10, + "3/5/20":10, + "3/6/20":10, + "3/7/20":11, + "3/8/20":11, + "3/9/20":15 + }, + "latest":57, + "province":"Victoria" + }, + { + "coordinates":{ + "lat":"-28.0167", + "long":"153.4" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":0, + "1/28/20":0, + "1/29/20":1, + "1/30/20":3, + "1/31/20":2, + "2/1/20":3, + "2/10/20":5, + "2/11/20":5, + "2/12/20":5, + "2/13/20":5, + "2/14/20":5, + "2/15/20":5, + "2/16/20":5, + "2/17/20":5, + "2/18/20":5, + "2/19/20":5, + "2/2/20":2, + "2/20/20":5, + "2/21/20":5, + "2/22/20":5, + "2/23/20":5, + "2/24/20":5, + "2/25/20":5, + "2/26/20":5, + "2/27/20":5, + "2/28/20":5, + "2/29/20":9, + "2/3/20":2, + "2/4/20":3, + "2/5/20":3, + "2/6/20":4, + "2/7/20":5, + "2/8/20":5, + "2/9/20":5, + "3/1/20":9, + "3/10/20":18, + "3/11/20":20, + "3/12/20":20, + "3/13/20":35, + "3/14/20":46, + "3/15/20":61, + "3/2/20":9, + "3/3/20":11, + "3/4/20":11, + "3/5/20":13, + "3/6/20":13, + "3/7/20":13, + "3/8/20":15, + "3/9/20":15 + }, + "latest":61, + "province":"Queensland" + }, + { + "coordinates":{ + "lat":"11.55", + "long":"104.9167" + }, + "country":"Cambodia", + "country_code":"KH", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":1, + "2/11/20":1, + "2/12/20":1, + "2/13/20":1, + "2/14/20":1, + "2/15/20":1, + "2/16/20":1, + "2/17/20":1, + "2/18/20":1, + "2/19/20":1, + "2/2/20":1, + "2/20/20":1, + "2/21/20":1, + "2/22/20":1, + "2/23/20":1, + "2/24/20":1, + "2/25/20":1, + "2/26/20":1, + "2/27/20":1, + "2/28/20":1, + "2/29/20":1, + "2/3/20":1, + "2/4/20":1, + "2/5/20":1, + "2/6/20":1, + "2/7/20":1, + "2/8/20":1, + "2/9/20":1, + "3/1/20":1, + "3/10/20":2, + "3/11/20":3, + "3/12/20":3, + "3/13/20":5, + "3/14/20":7, + "3/15/20":7, + "3/2/20":1, + "3/3/20":1, + "3/4/20":1, + "3/5/20":1, + "3/6/20":1, + "3/7/20":1, + "3/8/20":2, + "3/9/20":2 + }, + "latest":7, + "province":"" + } + ], + "source":"https://github.com/ExpDev07/coronavirus-tracker-api" +} diff --git a/tests/expected_output/v1_deaths.json b/tests/expected_output/v1_deaths.json index 48dc9cc2..30c65ac7 100644 --- a/tests/expected_output/v1_deaths.json +++ b/tests/expected_output/v1_deaths.json @@ -1 +1,677 @@ -{"last_updated":"2020-03-17T10:23:22.505550Z","latest":1940,"locations":[{"coordinates":{"lat":"15","long":"101"},"country":"Thailand","country_code":"TH","history":{"1/22/20":2,"1/23/20":3,"1/24/20":5,"1/25/20":7,"1/26/20":8,"1/27/20":8,"1/28/20":14,"1/29/20":14,"1/30/20":14,"1/31/20":19,"2/1/20":19,"2/10/20":32,"2/11/20":33,"2/12/20":33,"2/13/20":33,"2/14/20":33,"2/15/20":33,"2/16/20":34,"2/17/20":35,"2/18/20":35,"2/19/20":35,"2/2/20":19,"2/20/20":35,"2/21/20":35,"2/22/20":35,"2/23/20":35,"2/24/20":35,"2/25/20":37,"2/26/20":40,"2/27/20":40,"2/28/20":41,"2/29/20":42,"2/3/20":19,"2/4/20":25,"2/5/20":25,"2/6/20":25,"2/7/20":25,"2/8/20":32,"2/9/20":32,"3/1/20":42,"3/10/20":53,"3/11/20":59,"3/12/20":70,"3/13/20":75,"3/14/20":82,"3/15/20":114,"3/2/20":43,"3/3/20":43,"3/4/20":43,"3/5/20":47,"3/6/20":48,"3/7/20":50,"3/8/20":50,"3/9/20":50},"latest":114,"province":""},{"coordinates":{"lat":"36","long":"138"},"country":"Japan","country_code":"JP","history":{"1/22/20":2,"1/23/20":1,"1/24/20":2,"1/25/20":2,"1/26/20":4,"1/27/20":4,"1/28/20":7,"1/29/20":7,"1/30/20":11,"1/31/20":15,"2/1/20":20,"2/10/20":26,"2/11/20":26,"2/12/20":28,"2/13/20":28,"2/14/20":29,"2/15/20":43,"2/16/20":59,"2/17/20":66,"2/18/20":74,"2/19/20":84,"2/2/20":20,"2/20/20":94,"2/21/20":105,"2/22/20":122,"2/23/20":147,"2/24/20":159,"2/25/20":170,"2/26/20":189,"2/27/20":214,"2/28/20":228,"2/29/20":241,"2/3/20":20,"2/4/20":22,"2/5/20":22,"2/6/20":45,"2/7/20":25,"2/8/20":25,"2/9/20":26,"3/1/20":256,"3/10/20":581,"3/11/20":639,"3/12/20":639,"3/13/20":701,"3/14/20":773,"3/15/20":839,"3/2/20":274,"3/3/20":293,"3/4/20":331,"3/5/20":360,"3/6/20":420,"3/7/20":461,"3/8/20":502,"3/9/20":511},"latest":839,"province":""},{"coordinates":{"lat":"1.2833","long":"103.8333"},"country":"Singapore","country_code":"SG","history":{"1/22/20":0,"1/23/20":1,"1/24/20":3,"1/25/20":3,"1/26/20":4,"1/27/20":5,"1/28/20":7,"1/29/20":7,"1/30/20":10,"1/31/20":13,"2/1/20":16,"2/10/20":45,"2/11/20":47,"2/12/20":50,"2/13/20":58,"2/14/20":67,"2/15/20":72,"2/16/20":75,"2/17/20":77,"2/18/20":81,"2/19/20":84,"2/2/20":18,"2/20/20":84,"2/21/20":85,"2/22/20":85,"2/23/20":89,"2/24/20":89,"2/25/20":91,"2/26/20":93,"2/27/20":93,"2/28/20":93,"2/29/20":102,"2/3/20":18,"2/4/20":24,"2/5/20":28,"2/6/20":28,"2/7/20":30,"2/8/20":33,"2/9/20":40,"3/1/20":106,"3/10/20":160,"3/11/20":178,"3/12/20":178,"3/13/20":200,"3/14/20":212,"3/15/20":226,"3/2/20":108,"3/3/20":110,"3/4/20":110,"3/5/20":117,"3/6/20":130,"3/7/20":138,"3/8/20":150,"3/9/20":150},"latest":226,"province":""},{"coordinates":{"lat":"28.1667","long":"84.25"},"country":"Nepal","country_code":"NP","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":1,"1/26/20":1,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":1,"2/11/20":1,"2/12/20":1,"2/13/20":1,"2/14/20":1,"2/15/20":1,"2/16/20":1,"2/17/20":1,"2/18/20":1,"2/19/20":1,"2/2/20":1,"2/20/20":1,"2/21/20":1,"2/22/20":1,"2/23/20":1,"2/24/20":1,"2/25/20":1,"2/26/20":1,"2/27/20":1,"2/28/20":1,"2/29/20":1,"2/3/20":1,"2/4/20":1,"2/5/20":1,"2/6/20":1,"2/7/20":1,"2/8/20":1,"2/9/20":1,"3/1/20":1,"3/10/20":1,"3/11/20":1,"3/12/20":1,"3/13/20":1,"3/14/20":1,"3/15/20":1,"3/2/20":1,"3/3/20":1,"3/4/20":1,"3/5/20":1,"3/6/20":1,"3/7/20":1,"3/8/20":1,"3/9/20":1},"latest":1,"province":""},{"coordinates":{"lat":"2.5","long":"112.5"},"country":"Malaysia","country_code":"MY","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":3,"1/26/20":4,"1/27/20":4,"1/28/20":4,"1/29/20":7,"1/30/20":8,"1/31/20":8,"2/1/20":8,"2/10/20":18,"2/11/20":18,"2/12/20":18,"2/13/20":19,"2/14/20":19,"2/15/20":22,"2/16/20":22,"2/17/20":22,"2/18/20":22,"2/19/20":22,"2/2/20":8,"2/20/20":22,"2/21/20":22,"2/22/20":22,"2/23/20":22,"2/24/20":22,"2/25/20":22,"2/26/20":22,"2/27/20":23,"2/28/20":23,"2/29/20":25,"2/3/20":8,"2/4/20":10,"2/5/20":12,"2/6/20":12,"2/7/20":12,"2/8/20":16,"2/9/20":16,"3/1/20":29,"3/10/20":129,"3/11/20":149,"3/12/20":149,"3/13/20":197,"3/14/20":238,"3/15/20":428,"3/2/20":29,"3/3/20":36,"3/4/20":50,"3/5/20":50,"3/6/20":83,"3/7/20":93,"3/8/20":99,"3/9/20":117},"latest":428,"province":""},{"coordinates":{"lat":"49.2827","long":"-123.1207"},"country":"Canada","country_code":"CA","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":0,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":5,"2/18/20":5,"2/19/20":5,"2/2/20":1,"2/20/20":5,"2/21/20":6,"2/22/20":6,"2/23/20":6,"2/24/20":6,"2/25/20":7,"2/26/20":7,"2/27/20":7,"2/28/20":7,"2/29/20":8,"2/3/20":1,"2/4/20":1,"2/5/20":2,"2/6/20":2,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":8,"3/10/20":32,"3/11/20":39,"3/12/20":46,"3/13/20":64,"3/14/20":64,"3/15/20":73,"3/2/20":8,"3/3/20":9,"3/4/20":12,"3/5/20":13,"3/6/20":21,"3/7/20":21,"3/8/20":27,"3/9/20":32},"latest":73,"province":"British Columbia"},{"coordinates":{"lat":"-33.8688","long":"151.2093"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":3,"1/27/20":4,"1/28/20":4,"1/29/20":4,"1/30/20":4,"1/31/20":4,"2/1/20":4,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":4,"2/18/20":4,"2/19/20":4,"2/2/20":4,"2/20/20":4,"2/21/20":4,"2/22/20":4,"2/23/20":4,"2/24/20":4,"2/25/20":4,"2/26/20":4,"2/27/20":4,"2/28/20":4,"2/29/20":4,"2/3/20":4,"2/4/20":4,"2/5/20":4,"2/6/20":4,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":6,"3/10/20":55,"3/11/20":65,"3/12/20":65,"3/13/20":92,"3/14/20":112,"3/15/20":134,"3/2/20":6,"3/3/20":13,"3/4/20":22,"3/5/20":22,"3/6/20":26,"3/7/20":28,"3/8/20":38,"3/9/20":48},"latest":134,"province":"New South Wales"},{"coordinates":{"lat":"-37.8136","long":"144.9631"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":1,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":2,"1/31/20":3,"2/1/20":4,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":4,"2/18/20":4,"2/19/20":4,"2/2/20":4,"2/20/20":4,"2/21/20":4,"2/22/20":4,"2/23/20":4,"2/24/20":4,"2/25/20":4,"2/26/20":4,"2/27/20":4,"2/28/20":4,"2/29/20":7,"2/3/20":4,"2/4/20":4,"2/5/20":4,"2/6/20":4,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":7,"3/10/20":18,"3/11/20":21,"3/12/20":21,"3/13/20":36,"3/14/20":49,"3/15/20":57,"3/2/20":9,"3/3/20":9,"3/4/20":10,"3/5/20":10,"3/6/20":10,"3/7/20":11,"3/8/20":11,"3/9/20":15},"latest":57,"province":"Victoria"},{"coordinates":{"lat":"-28.0167","long":"153.4"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":0,"1/28/20":0,"1/29/20":1,"1/30/20":3,"1/31/20":2,"2/1/20":3,"2/10/20":5,"2/11/20":5,"2/12/20":5,"2/13/20":5,"2/14/20":5,"2/15/20":5,"2/16/20":5,"2/17/20":5,"2/18/20":5,"2/19/20":5,"2/2/20":2,"2/20/20":5,"2/21/20":5,"2/22/20":5,"2/23/20":5,"2/24/20":5,"2/25/20":5,"2/26/20":5,"2/27/20":5,"2/28/20":5,"2/29/20":9,"2/3/20":2,"2/4/20":3,"2/5/20":3,"2/6/20":4,"2/7/20":5,"2/8/20":5,"2/9/20":5,"3/1/20":9,"3/10/20":18,"3/11/20":20,"3/12/20":20,"3/13/20":35,"3/14/20":46,"3/15/20":61,"3/2/20":9,"3/3/20":11,"3/4/20":11,"3/5/20":13,"3/6/20":13,"3/7/20":13,"3/8/20":15,"3/9/20":15},"latest":61,"province":"Queensland"},{"coordinates":{"lat":"11.55","long":"104.9167"},"country":"Cambodia","country_code":"KH","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":1,"2/11/20":1,"2/12/20":1,"2/13/20":1,"2/14/20":1,"2/15/20":1,"2/16/20":1,"2/17/20":1,"2/18/20":1,"2/19/20":1,"2/2/20":1,"2/20/20":1,"2/21/20":1,"2/22/20":1,"2/23/20":1,"2/24/20":1,"2/25/20":1,"2/26/20":1,"2/27/20":1,"2/28/20":1,"2/29/20":1,"2/3/20":1,"2/4/20":1,"2/5/20":1,"2/6/20":1,"2/7/20":1,"2/8/20":1,"2/9/20":1,"3/1/20":1,"3/10/20":2,"3/11/20":3,"3/12/20":3,"3/13/20":5,"3/14/20":7,"3/15/20":7,"3/2/20":1,"3/3/20":1,"3/4/20":1,"3/5/20":1,"3/6/20":1,"3/7/20":1,"3/8/20":2,"3/9/20":2},"latest":7,"province":""}],"source":"https://github.com/ExpDev07/coronavirus-tracker-api"} +{ + "last_updated":"2020-03-17T10:23:22.505550Z", + "latest":1940, + "locations":[ + { + "coordinates":{ + "lat":"15", + "long":"101" + }, + "country":"Thailand", + "country_code":"TH", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":2, + "1/23/20":3, + "1/24/20":5, + "1/25/20":7, + "1/26/20":8, + "1/27/20":8, + "1/28/20":14, + "1/29/20":14, + "1/30/20":14, + "1/31/20":19, + "2/1/20":19, + "2/10/20":32, + "2/11/20":33, + "2/12/20":33, + "2/13/20":33, + "2/14/20":33, + "2/15/20":33, + "2/16/20":34, + "2/17/20":35, + "2/18/20":35, + "2/19/20":35, + "2/2/20":19, + "2/20/20":35, + "2/21/20":35, + "2/22/20":35, + "2/23/20":35, + "2/24/20":35, + "2/25/20":37, + "2/26/20":40, + "2/27/20":40, + "2/28/20":41, + "2/29/20":42, + "2/3/20":19, + "2/4/20":25, + "2/5/20":25, + "2/6/20":25, + "2/7/20":25, + "2/8/20":32, + "2/9/20":32, + "3/1/20":42, + "3/10/20":53, + "3/11/20":59, + "3/12/20":70, + "3/13/20":75, + "3/14/20":82, + "3/15/20":114, + "3/2/20":43, + "3/3/20":43, + "3/4/20":43, + "3/5/20":47, + "3/6/20":48, + "3/7/20":50, + "3/8/20":50, + "3/9/20":50 + }, + "latest":114, + "province":"" + }, + { + "coordinates":{ + "lat":"36", + "long":"138" + }, + "country":"Japan", + "country_code":"JP", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":2, + "1/23/20":1, + "1/24/20":2, + "1/25/20":2, + "1/26/20":4, + "1/27/20":4, + "1/28/20":7, + "1/29/20":7, + "1/30/20":11, + "1/31/20":15, + "2/1/20":20, + "2/10/20":26, + "2/11/20":26, + "2/12/20":28, + "2/13/20":28, + "2/14/20":29, + "2/15/20":43, + "2/16/20":59, + "2/17/20":66, + "2/18/20":74, + "2/19/20":84, + "2/2/20":20, + "2/20/20":94, + "2/21/20":105, + "2/22/20":122, + "2/23/20":147, + "2/24/20":159, + "2/25/20":170, + "2/26/20":189, + "2/27/20":214, + "2/28/20":228, + "2/29/20":241, + "2/3/20":20, + "2/4/20":22, + "2/5/20":22, + "2/6/20":45, + "2/7/20":25, + "2/8/20":25, + "2/9/20":26, + "3/1/20":256, + "3/10/20":581, + "3/11/20":639, + "3/12/20":639, + "3/13/20":701, + "3/14/20":773, + "3/15/20":839, + "3/2/20":274, + "3/3/20":293, + "3/4/20":331, + "3/5/20":360, + "3/6/20":420, + "3/7/20":461, + "3/8/20":502, + "3/9/20":511 + }, + "latest":839, + "province":"" + }, + { + "coordinates":{ + "lat":"1.2833", + "long":"103.8333" + }, + "country":"Singapore", + "country_code":"SG", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":1, + "1/24/20":3, + "1/25/20":3, + "1/26/20":4, + "1/27/20":5, + "1/28/20":7, + "1/29/20":7, + "1/30/20":10, + "1/31/20":13, + "2/1/20":16, + "2/10/20":45, + "2/11/20":47, + "2/12/20":50, + "2/13/20":58, + "2/14/20":67, + "2/15/20":72, + "2/16/20":75, + "2/17/20":77, + "2/18/20":81, + "2/19/20":84, + "2/2/20":18, + "2/20/20":84, + "2/21/20":85, + "2/22/20":85, + "2/23/20":89, + "2/24/20":89, + "2/25/20":91, + "2/26/20":93, + "2/27/20":93, + "2/28/20":93, + "2/29/20":102, + "2/3/20":18, + "2/4/20":24, + "2/5/20":28, + "2/6/20":28, + "2/7/20":30, + "2/8/20":33, + "2/9/20":40, + "3/1/20":106, + "3/10/20":160, + "3/11/20":178, + "3/12/20":178, + "3/13/20":200, + "3/14/20":212, + "3/15/20":226, + "3/2/20":108, + "3/3/20":110, + "3/4/20":110, + "3/5/20":117, + "3/6/20":130, + "3/7/20":138, + "3/8/20":150, + "3/9/20":150 + }, + "latest":226, + "province":"" + }, + { + "coordinates":{ + "lat":"28.1667", + "long":"84.25" + }, + "country":"Nepal", + "country_code":"NP", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":1, + "1/26/20":1, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":1, + "2/11/20":1, + "2/12/20":1, + "2/13/20":1, + "2/14/20":1, + "2/15/20":1, + "2/16/20":1, + "2/17/20":1, + "2/18/20":1, + "2/19/20":1, + "2/2/20":1, + "2/20/20":1, + "2/21/20":1, + "2/22/20":1, + "2/23/20":1, + "2/24/20":1, + "2/25/20":1, + "2/26/20":1, + "2/27/20":1, + "2/28/20":1, + "2/29/20":1, + "2/3/20":1, + "2/4/20":1, + "2/5/20":1, + "2/6/20":1, + "2/7/20":1, + "2/8/20":1, + "2/9/20":1, + "3/1/20":1, + "3/10/20":1, + "3/11/20":1, + "3/12/20":1, + "3/13/20":1, + "3/14/20":1, + "3/15/20":1, + "3/2/20":1, + "3/3/20":1, + "3/4/20":1, + "3/5/20":1, + "3/6/20":1, + "3/7/20":1, + "3/8/20":1, + "3/9/20":1 + }, + "latest":1, + "province":"" + }, + { + "coordinates":{ + "lat":"2.5", + "long":"112.5" + }, + "country":"Malaysia", + "country_code":"MY", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":3, + "1/26/20":4, + "1/27/20":4, + "1/28/20":4, + "1/29/20":7, + "1/30/20":8, + "1/31/20":8, + "2/1/20":8, + "2/10/20":18, + "2/11/20":18, + "2/12/20":18, + "2/13/20":19, + "2/14/20":19, + "2/15/20":22, + "2/16/20":22, + "2/17/20":22, + "2/18/20":22, + "2/19/20":22, + "2/2/20":8, + "2/20/20":22, + "2/21/20":22, + "2/22/20":22, + "2/23/20":22, + "2/24/20":22, + "2/25/20":22, + "2/26/20":22, + "2/27/20":23, + "2/28/20":23, + "2/29/20":25, + "2/3/20":8, + "2/4/20":10, + "2/5/20":12, + "2/6/20":12, + "2/7/20":12, + "2/8/20":16, + "2/9/20":16, + "3/1/20":29, + "3/10/20":129, + "3/11/20":149, + "3/12/20":149, + "3/13/20":197, + "3/14/20":238, + "3/15/20":428, + "3/2/20":29, + "3/3/20":36, + "3/4/20":50, + "3/5/20":50, + "3/6/20":83, + "3/7/20":93, + "3/8/20":99, + "3/9/20":117 + }, + "latest":428, + "province":"" + }, + { + "coordinates":{ + "lat":"49.2827", + "long":"-123.1207" + }, + "country":"Canada", + "country_code":"CA", + "continent_codes_set":["NAC"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":0, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":5, + "2/18/20":5, + "2/19/20":5, + "2/2/20":1, + "2/20/20":5, + "2/21/20":6, + "2/22/20":6, + "2/23/20":6, + "2/24/20":6, + "2/25/20":7, + "2/26/20":7, + "2/27/20":7, + "2/28/20":7, + "2/29/20":8, + "2/3/20":1, + "2/4/20":1, + "2/5/20":2, + "2/6/20":2, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":8, + "3/10/20":32, + "3/11/20":39, + "3/12/20":46, + "3/13/20":64, + "3/14/20":64, + "3/15/20":73, + "3/2/20":8, + "3/3/20":9, + "3/4/20":12, + "3/5/20":13, + "3/6/20":21, + "3/7/20":21, + "3/8/20":27, + "3/9/20":32 + }, + "latest":73, + "province":"British Columbia" + }, + { + "coordinates":{ + "lat":"-33.8688", + "long":"151.2093" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":3, + "1/27/20":4, + "1/28/20":4, + "1/29/20":4, + "1/30/20":4, + "1/31/20":4, + "2/1/20":4, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":4, + "2/18/20":4, + "2/19/20":4, + "2/2/20":4, + "2/20/20":4, + "2/21/20":4, + "2/22/20":4, + "2/23/20":4, + "2/24/20":4, + "2/25/20":4, + "2/26/20":4, + "2/27/20":4, + "2/28/20":4, + "2/29/20":4, + "2/3/20":4, + "2/4/20":4, + "2/5/20":4, + "2/6/20":4, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":6, + "3/10/20":55, + "3/11/20":65, + "3/12/20":65, + "3/13/20":92, + "3/14/20":112, + "3/15/20":134, + "3/2/20":6, + "3/3/20":13, + "3/4/20":22, + "3/5/20":22, + "3/6/20":26, + "3/7/20":28, + "3/8/20":38, + "3/9/20":48 + }, + "latest":134, + "province":"New South Wales" + }, + { + "coordinates":{ + "lat":"-37.8136", + "long":"144.9631" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":1, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":2, + "1/31/20":3, + "2/1/20":4, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":4, + "2/18/20":4, + "2/19/20":4, + "2/2/20":4, + "2/20/20":4, + "2/21/20":4, + "2/22/20":4, + "2/23/20":4, + "2/24/20":4, + "2/25/20":4, + "2/26/20":4, + "2/27/20":4, + "2/28/20":4, + "2/29/20":7, + "2/3/20":4, + "2/4/20":4, + "2/5/20":4, + "2/6/20":4, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":7, + "3/10/20":18, + "3/11/20":21, + "3/12/20":21, + "3/13/20":36, + "3/14/20":49, + "3/15/20":57, + "3/2/20":9, + "3/3/20":9, + "3/4/20":10, + "3/5/20":10, + "3/6/20":10, + "3/7/20":11, + "3/8/20":11, + "3/9/20":15 + }, + "latest":57, + "province":"Victoria" + }, + { + "coordinates":{ + "lat":"-28.0167", + "long":"153.4" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":0, + "1/28/20":0, + "1/29/20":1, + "1/30/20":3, + "1/31/20":2, + "2/1/20":3, + "2/10/20":5, + "2/11/20":5, + "2/12/20":5, + "2/13/20":5, + "2/14/20":5, + "2/15/20":5, + "2/16/20":5, + "2/17/20":5, + "2/18/20":5, + "2/19/20":5, + "2/2/20":2, + "2/20/20":5, + "2/21/20":5, + "2/22/20":5, + "2/23/20":5, + "2/24/20":5, + "2/25/20":5, + "2/26/20":5, + "2/27/20":5, + "2/28/20":5, + "2/29/20":9, + "2/3/20":2, + "2/4/20":3, + "2/5/20":3, + "2/6/20":4, + "2/7/20":5, + "2/8/20":5, + "2/9/20":5, + "3/1/20":9, + "3/10/20":18, + "3/11/20":20, + "3/12/20":20, + "3/13/20":35, + "3/14/20":46, + "3/15/20":61, + "3/2/20":9, + "3/3/20":11, + "3/4/20":11, + "3/5/20":13, + "3/6/20":13, + "3/7/20":13, + "3/8/20":15, + "3/9/20":15 + }, + "latest":61, + "province":"Queensland" + }, + { + "coordinates":{ + "lat":"11.55", + "long":"104.9167" + }, + "country":"Cambodia", + "country_code":"KH", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":1, + "2/11/20":1, + "2/12/20":1, + "2/13/20":1, + "2/14/20":1, + "2/15/20":1, + "2/16/20":1, + "2/17/20":1, + "2/18/20":1, + "2/19/20":1, + "2/2/20":1, + "2/20/20":1, + "2/21/20":1, + "2/22/20":1, + "2/23/20":1, + "2/24/20":1, + "2/25/20":1, + "2/26/20":1, + "2/27/20":1, + "2/28/20":1, + "2/29/20":1, + "2/3/20":1, + "2/4/20":1, + "2/5/20":1, + "2/6/20":1, + "2/7/20":1, + "2/8/20":1, + "2/9/20":1, + "3/1/20":1, + "3/10/20":2, + "3/11/20":3, + "3/12/20":3, + "3/13/20":5, + "3/14/20":7, + "3/15/20":7, + "3/2/20":1, + "3/3/20":1, + "3/4/20":1, + "3/5/20":1, + "3/6/20":1, + "3/7/20":1, + "3/8/20":2, + "3/9/20":2 + }, + "latest":7, + "province":"" + } + ], + "source":"https://github.com/ExpDev07/coronavirus-tracker-api" +} diff --git a/tests/expected_output/v1_recovered.json b/tests/expected_output/v1_recovered.json index 48dc9cc2..30c65ac7 100644 --- a/tests/expected_output/v1_recovered.json +++ b/tests/expected_output/v1_recovered.json @@ -1 +1,677 @@ -{"last_updated":"2020-03-17T10:23:22.505550Z","latest":1940,"locations":[{"coordinates":{"lat":"15","long":"101"},"country":"Thailand","country_code":"TH","history":{"1/22/20":2,"1/23/20":3,"1/24/20":5,"1/25/20":7,"1/26/20":8,"1/27/20":8,"1/28/20":14,"1/29/20":14,"1/30/20":14,"1/31/20":19,"2/1/20":19,"2/10/20":32,"2/11/20":33,"2/12/20":33,"2/13/20":33,"2/14/20":33,"2/15/20":33,"2/16/20":34,"2/17/20":35,"2/18/20":35,"2/19/20":35,"2/2/20":19,"2/20/20":35,"2/21/20":35,"2/22/20":35,"2/23/20":35,"2/24/20":35,"2/25/20":37,"2/26/20":40,"2/27/20":40,"2/28/20":41,"2/29/20":42,"2/3/20":19,"2/4/20":25,"2/5/20":25,"2/6/20":25,"2/7/20":25,"2/8/20":32,"2/9/20":32,"3/1/20":42,"3/10/20":53,"3/11/20":59,"3/12/20":70,"3/13/20":75,"3/14/20":82,"3/15/20":114,"3/2/20":43,"3/3/20":43,"3/4/20":43,"3/5/20":47,"3/6/20":48,"3/7/20":50,"3/8/20":50,"3/9/20":50},"latest":114,"province":""},{"coordinates":{"lat":"36","long":"138"},"country":"Japan","country_code":"JP","history":{"1/22/20":2,"1/23/20":1,"1/24/20":2,"1/25/20":2,"1/26/20":4,"1/27/20":4,"1/28/20":7,"1/29/20":7,"1/30/20":11,"1/31/20":15,"2/1/20":20,"2/10/20":26,"2/11/20":26,"2/12/20":28,"2/13/20":28,"2/14/20":29,"2/15/20":43,"2/16/20":59,"2/17/20":66,"2/18/20":74,"2/19/20":84,"2/2/20":20,"2/20/20":94,"2/21/20":105,"2/22/20":122,"2/23/20":147,"2/24/20":159,"2/25/20":170,"2/26/20":189,"2/27/20":214,"2/28/20":228,"2/29/20":241,"2/3/20":20,"2/4/20":22,"2/5/20":22,"2/6/20":45,"2/7/20":25,"2/8/20":25,"2/9/20":26,"3/1/20":256,"3/10/20":581,"3/11/20":639,"3/12/20":639,"3/13/20":701,"3/14/20":773,"3/15/20":839,"3/2/20":274,"3/3/20":293,"3/4/20":331,"3/5/20":360,"3/6/20":420,"3/7/20":461,"3/8/20":502,"3/9/20":511},"latest":839,"province":""},{"coordinates":{"lat":"1.2833","long":"103.8333"},"country":"Singapore","country_code":"SG","history":{"1/22/20":0,"1/23/20":1,"1/24/20":3,"1/25/20":3,"1/26/20":4,"1/27/20":5,"1/28/20":7,"1/29/20":7,"1/30/20":10,"1/31/20":13,"2/1/20":16,"2/10/20":45,"2/11/20":47,"2/12/20":50,"2/13/20":58,"2/14/20":67,"2/15/20":72,"2/16/20":75,"2/17/20":77,"2/18/20":81,"2/19/20":84,"2/2/20":18,"2/20/20":84,"2/21/20":85,"2/22/20":85,"2/23/20":89,"2/24/20":89,"2/25/20":91,"2/26/20":93,"2/27/20":93,"2/28/20":93,"2/29/20":102,"2/3/20":18,"2/4/20":24,"2/5/20":28,"2/6/20":28,"2/7/20":30,"2/8/20":33,"2/9/20":40,"3/1/20":106,"3/10/20":160,"3/11/20":178,"3/12/20":178,"3/13/20":200,"3/14/20":212,"3/15/20":226,"3/2/20":108,"3/3/20":110,"3/4/20":110,"3/5/20":117,"3/6/20":130,"3/7/20":138,"3/8/20":150,"3/9/20":150},"latest":226,"province":""},{"coordinates":{"lat":"28.1667","long":"84.25"},"country":"Nepal","country_code":"NP","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":1,"1/26/20":1,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":1,"2/11/20":1,"2/12/20":1,"2/13/20":1,"2/14/20":1,"2/15/20":1,"2/16/20":1,"2/17/20":1,"2/18/20":1,"2/19/20":1,"2/2/20":1,"2/20/20":1,"2/21/20":1,"2/22/20":1,"2/23/20":1,"2/24/20":1,"2/25/20":1,"2/26/20":1,"2/27/20":1,"2/28/20":1,"2/29/20":1,"2/3/20":1,"2/4/20":1,"2/5/20":1,"2/6/20":1,"2/7/20":1,"2/8/20":1,"2/9/20":1,"3/1/20":1,"3/10/20":1,"3/11/20":1,"3/12/20":1,"3/13/20":1,"3/14/20":1,"3/15/20":1,"3/2/20":1,"3/3/20":1,"3/4/20":1,"3/5/20":1,"3/6/20":1,"3/7/20":1,"3/8/20":1,"3/9/20":1},"latest":1,"province":""},{"coordinates":{"lat":"2.5","long":"112.5"},"country":"Malaysia","country_code":"MY","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":3,"1/26/20":4,"1/27/20":4,"1/28/20":4,"1/29/20":7,"1/30/20":8,"1/31/20":8,"2/1/20":8,"2/10/20":18,"2/11/20":18,"2/12/20":18,"2/13/20":19,"2/14/20":19,"2/15/20":22,"2/16/20":22,"2/17/20":22,"2/18/20":22,"2/19/20":22,"2/2/20":8,"2/20/20":22,"2/21/20":22,"2/22/20":22,"2/23/20":22,"2/24/20":22,"2/25/20":22,"2/26/20":22,"2/27/20":23,"2/28/20":23,"2/29/20":25,"2/3/20":8,"2/4/20":10,"2/5/20":12,"2/6/20":12,"2/7/20":12,"2/8/20":16,"2/9/20":16,"3/1/20":29,"3/10/20":129,"3/11/20":149,"3/12/20":149,"3/13/20":197,"3/14/20":238,"3/15/20":428,"3/2/20":29,"3/3/20":36,"3/4/20":50,"3/5/20":50,"3/6/20":83,"3/7/20":93,"3/8/20":99,"3/9/20":117},"latest":428,"province":""},{"coordinates":{"lat":"49.2827","long":"-123.1207"},"country":"Canada","country_code":"CA","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":0,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":5,"2/18/20":5,"2/19/20":5,"2/2/20":1,"2/20/20":5,"2/21/20":6,"2/22/20":6,"2/23/20":6,"2/24/20":6,"2/25/20":7,"2/26/20":7,"2/27/20":7,"2/28/20":7,"2/29/20":8,"2/3/20":1,"2/4/20":1,"2/5/20":2,"2/6/20":2,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":8,"3/10/20":32,"3/11/20":39,"3/12/20":46,"3/13/20":64,"3/14/20":64,"3/15/20":73,"3/2/20":8,"3/3/20":9,"3/4/20":12,"3/5/20":13,"3/6/20":21,"3/7/20":21,"3/8/20":27,"3/9/20":32},"latest":73,"province":"British Columbia"},{"coordinates":{"lat":"-33.8688","long":"151.2093"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":3,"1/27/20":4,"1/28/20":4,"1/29/20":4,"1/30/20":4,"1/31/20":4,"2/1/20":4,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":4,"2/18/20":4,"2/19/20":4,"2/2/20":4,"2/20/20":4,"2/21/20":4,"2/22/20":4,"2/23/20":4,"2/24/20":4,"2/25/20":4,"2/26/20":4,"2/27/20":4,"2/28/20":4,"2/29/20":4,"2/3/20":4,"2/4/20":4,"2/5/20":4,"2/6/20":4,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":6,"3/10/20":55,"3/11/20":65,"3/12/20":65,"3/13/20":92,"3/14/20":112,"3/15/20":134,"3/2/20":6,"3/3/20":13,"3/4/20":22,"3/5/20":22,"3/6/20":26,"3/7/20":28,"3/8/20":38,"3/9/20":48},"latest":134,"province":"New South Wales"},{"coordinates":{"lat":"-37.8136","long":"144.9631"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":1,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":2,"1/31/20":3,"2/1/20":4,"2/10/20":4,"2/11/20":4,"2/12/20":4,"2/13/20":4,"2/14/20":4,"2/15/20":4,"2/16/20":4,"2/17/20":4,"2/18/20":4,"2/19/20":4,"2/2/20":4,"2/20/20":4,"2/21/20":4,"2/22/20":4,"2/23/20":4,"2/24/20":4,"2/25/20":4,"2/26/20":4,"2/27/20":4,"2/28/20":4,"2/29/20":7,"2/3/20":4,"2/4/20":4,"2/5/20":4,"2/6/20":4,"2/7/20":4,"2/8/20":4,"2/9/20":4,"3/1/20":7,"3/10/20":18,"3/11/20":21,"3/12/20":21,"3/13/20":36,"3/14/20":49,"3/15/20":57,"3/2/20":9,"3/3/20":9,"3/4/20":10,"3/5/20":10,"3/6/20":10,"3/7/20":11,"3/8/20":11,"3/9/20":15},"latest":57,"province":"Victoria"},{"coordinates":{"lat":"-28.0167","long":"153.4"},"country":"Australia","country_code":"AU","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":0,"1/28/20":0,"1/29/20":1,"1/30/20":3,"1/31/20":2,"2/1/20":3,"2/10/20":5,"2/11/20":5,"2/12/20":5,"2/13/20":5,"2/14/20":5,"2/15/20":5,"2/16/20":5,"2/17/20":5,"2/18/20":5,"2/19/20":5,"2/2/20":2,"2/20/20":5,"2/21/20":5,"2/22/20":5,"2/23/20":5,"2/24/20":5,"2/25/20":5,"2/26/20":5,"2/27/20":5,"2/28/20":5,"2/29/20":9,"2/3/20":2,"2/4/20":3,"2/5/20":3,"2/6/20":4,"2/7/20":5,"2/8/20":5,"2/9/20":5,"3/1/20":9,"3/10/20":18,"3/11/20":20,"3/12/20":20,"3/13/20":35,"3/14/20":46,"3/15/20":61,"3/2/20":9,"3/3/20":11,"3/4/20":11,"3/5/20":13,"3/6/20":13,"3/7/20":13,"3/8/20":15,"3/9/20":15},"latest":61,"province":"Queensland"},{"coordinates":{"lat":"11.55","long":"104.9167"},"country":"Cambodia","country_code":"KH","history":{"1/22/20":0,"1/23/20":0,"1/24/20":0,"1/25/20":0,"1/26/20":0,"1/27/20":1,"1/28/20":1,"1/29/20":1,"1/30/20":1,"1/31/20":1,"2/1/20":1,"2/10/20":1,"2/11/20":1,"2/12/20":1,"2/13/20":1,"2/14/20":1,"2/15/20":1,"2/16/20":1,"2/17/20":1,"2/18/20":1,"2/19/20":1,"2/2/20":1,"2/20/20":1,"2/21/20":1,"2/22/20":1,"2/23/20":1,"2/24/20":1,"2/25/20":1,"2/26/20":1,"2/27/20":1,"2/28/20":1,"2/29/20":1,"2/3/20":1,"2/4/20":1,"2/5/20":1,"2/6/20":1,"2/7/20":1,"2/8/20":1,"2/9/20":1,"3/1/20":1,"3/10/20":2,"3/11/20":3,"3/12/20":3,"3/13/20":5,"3/14/20":7,"3/15/20":7,"3/2/20":1,"3/3/20":1,"3/4/20":1,"3/5/20":1,"3/6/20":1,"3/7/20":1,"3/8/20":2,"3/9/20":2},"latest":7,"province":""}],"source":"https://github.com/ExpDev07/coronavirus-tracker-api"} +{ + "last_updated":"2020-03-17T10:23:22.505550Z", + "latest":1940, + "locations":[ + { + "coordinates":{ + "lat":"15", + "long":"101" + }, + "country":"Thailand", + "country_code":"TH", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":2, + "1/23/20":3, + "1/24/20":5, + "1/25/20":7, + "1/26/20":8, + "1/27/20":8, + "1/28/20":14, + "1/29/20":14, + "1/30/20":14, + "1/31/20":19, + "2/1/20":19, + "2/10/20":32, + "2/11/20":33, + "2/12/20":33, + "2/13/20":33, + "2/14/20":33, + "2/15/20":33, + "2/16/20":34, + "2/17/20":35, + "2/18/20":35, + "2/19/20":35, + "2/2/20":19, + "2/20/20":35, + "2/21/20":35, + "2/22/20":35, + "2/23/20":35, + "2/24/20":35, + "2/25/20":37, + "2/26/20":40, + "2/27/20":40, + "2/28/20":41, + "2/29/20":42, + "2/3/20":19, + "2/4/20":25, + "2/5/20":25, + "2/6/20":25, + "2/7/20":25, + "2/8/20":32, + "2/9/20":32, + "3/1/20":42, + "3/10/20":53, + "3/11/20":59, + "3/12/20":70, + "3/13/20":75, + "3/14/20":82, + "3/15/20":114, + "3/2/20":43, + "3/3/20":43, + "3/4/20":43, + "3/5/20":47, + "3/6/20":48, + "3/7/20":50, + "3/8/20":50, + "3/9/20":50 + }, + "latest":114, + "province":"" + }, + { + "coordinates":{ + "lat":"36", + "long":"138" + }, + "country":"Japan", + "country_code":"JP", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":2, + "1/23/20":1, + "1/24/20":2, + "1/25/20":2, + "1/26/20":4, + "1/27/20":4, + "1/28/20":7, + "1/29/20":7, + "1/30/20":11, + "1/31/20":15, + "2/1/20":20, + "2/10/20":26, + "2/11/20":26, + "2/12/20":28, + "2/13/20":28, + "2/14/20":29, + "2/15/20":43, + "2/16/20":59, + "2/17/20":66, + "2/18/20":74, + "2/19/20":84, + "2/2/20":20, + "2/20/20":94, + "2/21/20":105, + "2/22/20":122, + "2/23/20":147, + "2/24/20":159, + "2/25/20":170, + "2/26/20":189, + "2/27/20":214, + "2/28/20":228, + "2/29/20":241, + "2/3/20":20, + "2/4/20":22, + "2/5/20":22, + "2/6/20":45, + "2/7/20":25, + "2/8/20":25, + "2/9/20":26, + "3/1/20":256, + "3/10/20":581, + "3/11/20":639, + "3/12/20":639, + "3/13/20":701, + "3/14/20":773, + "3/15/20":839, + "3/2/20":274, + "3/3/20":293, + "3/4/20":331, + "3/5/20":360, + "3/6/20":420, + "3/7/20":461, + "3/8/20":502, + "3/9/20":511 + }, + "latest":839, + "province":"" + }, + { + "coordinates":{ + "lat":"1.2833", + "long":"103.8333" + }, + "country":"Singapore", + "country_code":"SG", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":1, + "1/24/20":3, + "1/25/20":3, + "1/26/20":4, + "1/27/20":5, + "1/28/20":7, + "1/29/20":7, + "1/30/20":10, + "1/31/20":13, + "2/1/20":16, + "2/10/20":45, + "2/11/20":47, + "2/12/20":50, + "2/13/20":58, + "2/14/20":67, + "2/15/20":72, + "2/16/20":75, + "2/17/20":77, + "2/18/20":81, + "2/19/20":84, + "2/2/20":18, + "2/20/20":84, + "2/21/20":85, + "2/22/20":85, + "2/23/20":89, + "2/24/20":89, + "2/25/20":91, + "2/26/20":93, + "2/27/20":93, + "2/28/20":93, + "2/29/20":102, + "2/3/20":18, + "2/4/20":24, + "2/5/20":28, + "2/6/20":28, + "2/7/20":30, + "2/8/20":33, + "2/9/20":40, + "3/1/20":106, + "3/10/20":160, + "3/11/20":178, + "3/12/20":178, + "3/13/20":200, + "3/14/20":212, + "3/15/20":226, + "3/2/20":108, + "3/3/20":110, + "3/4/20":110, + "3/5/20":117, + "3/6/20":130, + "3/7/20":138, + "3/8/20":150, + "3/9/20":150 + }, + "latest":226, + "province":"" + }, + { + "coordinates":{ + "lat":"28.1667", + "long":"84.25" + }, + "country":"Nepal", + "country_code":"NP", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":1, + "1/26/20":1, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":1, + "2/11/20":1, + "2/12/20":1, + "2/13/20":1, + "2/14/20":1, + "2/15/20":1, + "2/16/20":1, + "2/17/20":1, + "2/18/20":1, + "2/19/20":1, + "2/2/20":1, + "2/20/20":1, + "2/21/20":1, + "2/22/20":1, + "2/23/20":1, + "2/24/20":1, + "2/25/20":1, + "2/26/20":1, + "2/27/20":1, + "2/28/20":1, + "2/29/20":1, + "2/3/20":1, + "2/4/20":1, + "2/5/20":1, + "2/6/20":1, + "2/7/20":1, + "2/8/20":1, + "2/9/20":1, + "3/1/20":1, + "3/10/20":1, + "3/11/20":1, + "3/12/20":1, + "3/13/20":1, + "3/14/20":1, + "3/15/20":1, + "3/2/20":1, + "3/3/20":1, + "3/4/20":1, + "3/5/20":1, + "3/6/20":1, + "3/7/20":1, + "3/8/20":1, + "3/9/20":1 + }, + "latest":1, + "province":"" + }, + { + "coordinates":{ + "lat":"2.5", + "long":"112.5" + }, + "country":"Malaysia", + "country_code":"MY", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":3, + "1/26/20":4, + "1/27/20":4, + "1/28/20":4, + "1/29/20":7, + "1/30/20":8, + "1/31/20":8, + "2/1/20":8, + "2/10/20":18, + "2/11/20":18, + "2/12/20":18, + "2/13/20":19, + "2/14/20":19, + "2/15/20":22, + "2/16/20":22, + "2/17/20":22, + "2/18/20":22, + "2/19/20":22, + "2/2/20":8, + "2/20/20":22, + "2/21/20":22, + "2/22/20":22, + "2/23/20":22, + "2/24/20":22, + "2/25/20":22, + "2/26/20":22, + "2/27/20":23, + "2/28/20":23, + "2/29/20":25, + "2/3/20":8, + "2/4/20":10, + "2/5/20":12, + "2/6/20":12, + "2/7/20":12, + "2/8/20":16, + "2/9/20":16, + "3/1/20":29, + "3/10/20":129, + "3/11/20":149, + "3/12/20":149, + "3/13/20":197, + "3/14/20":238, + "3/15/20":428, + "3/2/20":29, + "3/3/20":36, + "3/4/20":50, + "3/5/20":50, + "3/6/20":83, + "3/7/20":93, + "3/8/20":99, + "3/9/20":117 + }, + "latest":428, + "province":"" + }, + { + "coordinates":{ + "lat":"49.2827", + "long":"-123.1207" + }, + "country":"Canada", + "country_code":"CA", + "continent_codes_set":["NAC"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":0, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":5, + "2/18/20":5, + "2/19/20":5, + "2/2/20":1, + "2/20/20":5, + "2/21/20":6, + "2/22/20":6, + "2/23/20":6, + "2/24/20":6, + "2/25/20":7, + "2/26/20":7, + "2/27/20":7, + "2/28/20":7, + "2/29/20":8, + "2/3/20":1, + "2/4/20":1, + "2/5/20":2, + "2/6/20":2, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":8, + "3/10/20":32, + "3/11/20":39, + "3/12/20":46, + "3/13/20":64, + "3/14/20":64, + "3/15/20":73, + "3/2/20":8, + "3/3/20":9, + "3/4/20":12, + "3/5/20":13, + "3/6/20":21, + "3/7/20":21, + "3/8/20":27, + "3/9/20":32 + }, + "latest":73, + "province":"British Columbia" + }, + { + "coordinates":{ + "lat":"-33.8688", + "long":"151.2093" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":3, + "1/27/20":4, + "1/28/20":4, + "1/29/20":4, + "1/30/20":4, + "1/31/20":4, + "2/1/20":4, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":4, + "2/18/20":4, + "2/19/20":4, + "2/2/20":4, + "2/20/20":4, + "2/21/20":4, + "2/22/20":4, + "2/23/20":4, + "2/24/20":4, + "2/25/20":4, + "2/26/20":4, + "2/27/20":4, + "2/28/20":4, + "2/29/20":4, + "2/3/20":4, + "2/4/20":4, + "2/5/20":4, + "2/6/20":4, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":6, + "3/10/20":55, + "3/11/20":65, + "3/12/20":65, + "3/13/20":92, + "3/14/20":112, + "3/15/20":134, + "3/2/20":6, + "3/3/20":13, + "3/4/20":22, + "3/5/20":22, + "3/6/20":26, + "3/7/20":28, + "3/8/20":38, + "3/9/20":48 + }, + "latest":134, + "province":"New South Wales" + }, + { + "coordinates":{ + "lat":"-37.8136", + "long":"144.9631" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":1, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":2, + "1/31/20":3, + "2/1/20":4, + "2/10/20":4, + "2/11/20":4, + "2/12/20":4, + "2/13/20":4, + "2/14/20":4, + "2/15/20":4, + "2/16/20":4, + "2/17/20":4, + "2/18/20":4, + "2/19/20":4, + "2/2/20":4, + "2/20/20":4, + "2/21/20":4, + "2/22/20":4, + "2/23/20":4, + "2/24/20":4, + "2/25/20":4, + "2/26/20":4, + "2/27/20":4, + "2/28/20":4, + "2/29/20":7, + "2/3/20":4, + "2/4/20":4, + "2/5/20":4, + "2/6/20":4, + "2/7/20":4, + "2/8/20":4, + "2/9/20":4, + "3/1/20":7, + "3/10/20":18, + "3/11/20":21, + "3/12/20":21, + "3/13/20":36, + "3/14/20":49, + "3/15/20":57, + "3/2/20":9, + "3/3/20":9, + "3/4/20":10, + "3/5/20":10, + "3/6/20":10, + "3/7/20":11, + "3/8/20":11, + "3/9/20":15 + }, + "latest":57, + "province":"Victoria" + }, + { + "coordinates":{ + "lat":"-28.0167", + "long":"153.4" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":0, + "1/28/20":0, + "1/29/20":1, + "1/30/20":3, + "1/31/20":2, + "2/1/20":3, + "2/10/20":5, + "2/11/20":5, + "2/12/20":5, + "2/13/20":5, + "2/14/20":5, + "2/15/20":5, + "2/16/20":5, + "2/17/20":5, + "2/18/20":5, + "2/19/20":5, + "2/2/20":2, + "2/20/20":5, + "2/21/20":5, + "2/22/20":5, + "2/23/20":5, + "2/24/20":5, + "2/25/20":5, + "2/26/20":5, + "2/27/20":5, + "2/28/20":5, + "2/29/20":9, + "2/3/20":2, + "2/4/20":3, + "2/5/20":3, + "2/6/20":4, + "2/7/20":5, + "2/8/20":5, + "2/9/20":5, + "3/1/20":9, + "3/10/20":18, + "3/11/20":20, + "3/12/20":20, + "3/13/20":35, + "3/14/20":46, + "3/15/20":61, + "3/2/20":9, + "3/3/20":11, + "3/4/20":11, + "3/5/20":13, + "3/6/20":13, + "3/7/20":13, + "3/8/20":15, + "3/9/20":15 + }, + "latest":61, + "province":"Queensland" + }, + { + "coordinates":{ + "lat":"11.55", + "long":"104.9167" + }, + "country":"Cambodia", + "country_code":"KH", + "continent_codes_set":["ASI"], + "history":{ + "1/22/20":0, + "1/23/20":0, + "1/24/20":0, + "1/25/20":0, + "1/26/20":0, + "1/27/20":1, + "1/28/20":1, + "1/29/20":1, + "1/30/20":1, + "1/31/20":1, + "2/1/20":1, + "2/10/20":1, + "2/11/20":1, + "2/12/20":1, + "2/13/20":1, + "2/14/20":1, + "2/15/20":1, + "2/16/20":1, + "2/17/20":1, + "2/18/20":1, + "2/19/20":1, + "2/2/20":1, + "2/20/20":1, + "2/21/20":1, + "2/22/20":1, + "2/23/20":1, + "2/24/20":1, + "2/25/20":1, + "2/26/20":1, + "2/27/20":1, + "2/28/20":1, + "2/29/20":1, + "2/3/20":1, + "2/4/20":1, + "2/5/20":1, + "2/6/20":1, + "2/7/20":1, + "2/8/20":1, + "2/9/20":1, + "3/1/20":1, + "3/10/20":2, + "3/11/20":3, + "3/12/20":3, + "3/13/20":5, + "3/14/20":7, + "3/15/20":7, + "3/2/20":1, + "3/3/20":1, + "3/4/20":1, + "3/5/20":1, + "3/6/20":1, + "3/7/20":1, + "3/8/20":2, + "3/9/20":2 + }, + "latest":7, + "province":"" + } + ], + "source":"https://github.com/ExpDev07/coronavirus-tracker-api" +} diff --git a/tests/expected_output/v2_locations.json b/tests/expected_output/v2_locations.json index e67d3f27..a096e9f1 100644 --- a/tests/expected_output/v2_locations.json +++ b/tests/expected_output/v2_locations.json @@ -1 +1,164 @@ -{"locations":[{"coordinates":{"latitude":"15","longitude":"101"},"country":"Thailand","country_code":"TH","id":0,"latest":{"confirmed":114,"deaths":114,"recovered":114},"province":""},{"coordinates":{"latitude":"36","longitude":"138"},"country":"Japan","country_code":"JP","id":1,"latest":{"confirmed":839,"deaths":839,"recovered":839},"province":""},{"coordinates":{"latitude":"1.2833","longitude":"103.8333"},"country":"Singapore","country_code":"SG","id":2,"latest":{"confirmed":226,"deaths":226,"recovered":226},"province":""},{"coordinates":{"latitude":"28.1667","longitude":"84.25"},"country":"Nepal","country_code":"NP","id":3,"latest":{"confirmed":1,"deaths":1,"recovered":1},"province":""},{"coordinates":{"latitude":"2.5","longitude":"112.5"},"country":"Malaysia","country_code":"MY","id":4,"latest":{"confirmed":428,"deaths":428,"recovered":428},"province":""},{"coordinates":{"latitude":"49.2827","longitude":"-123.1207"},"country":"Canada","country_code":"CA","id":5,"latest":{"confirmed":73,"deaths":73,"recovered":73},"province":"British Columbia"},{"coordinates":{"latitude":"-33.8688","longitude":"151.2093"},"country":"Australia","country_code":"AU","id":6,"latest":{"confirmed":134,"deaths":134,"recovered":134},"province":"New South Wales"},{"coordinates":{"latitude":"-37.8136","longitude":"144.9631"},"country":"Australia","country_code":"AU","id":7,"latest":{"confirmed":57,"deaths":57,"recovered":57},"province":"Victoria"},{"coordinates":{"latitude":"-28.0167","longitude":"153.4"},"country":"Australia","country_code":"AU","id":8,"latest":{"confirmed":61,"deaths":61,"recovered":61},"province":"Queensland"},{"coordinates":{"latitude":"11.55","longitude":"104.9167"},"country":"Cambodia","country_code":"KH","id":9,"latest":{"confirmed":7,"deaths":7,"recovered":7},"province":""}]} +{ + "locations":[ + { + "coordinates":{ + "latitude":"15", + "longitude":"101" + }, + "country":"Thailand", + "country_code":"TH", + "continent_codes_set":["ASI"], + "id":0, + "latest":{ + "confirmed":114, + "deaths":114, + "recovered":114 + }, + "province":"" + }, + { + "coordinates":{ + "latitude":"36", + "longitude":"138" + }, + "country":"Japan", + "country_code":"JP", + "continent_codes_set":["ASI"], + "id":1, + "latest":{ + "confirmed":839, + "deaths":839, + "recovered":839 + }, + "province":"" + }, + { + "coordinates":{ + "latitude":"1.2833", + "longitude":"103.8333" + }, + "country":"Singapore", + "country_code":"SG", + "continent_codes_set":["ASI"], + "id":2, + "latest":{ + "confirmed":226, + "deaths":226, + "recovered":226 + }, + "province":"" + }, + { + "coordinates":{ + "latitude":"28.1667", + "longitude":"84.25" + }, + "country":"Nepal", + "country_code":"NP", + "continent_codes_set":["ASI"], + "id":3, + "latest":{ + "confirmed":1, + "deaths":1, + "recovered":1 + }, + "province":"" + }, + { + "coordinates":{ + "latitude":"2.5", + "longitude":"112.5" + }, + "country":"Malaysia", + "country_code":"MY", + "continent_codes_set":["ASI"], + "id":4, + "latest":{ + "confirmed":428, + "deaths":428, + "recovered":428 + }, + "province":"" + }, + { + "coordinates":{ + "latitude":"49.2827", + "longitude":"-123.1207" + }, + "country":"Canada", + "country_code":"CA", + "continent_codes_set":["NAC"], + "id":5, + "latest":{ + "confirmed":73, + "deaths":73, + "recovered":73 + }, + "province":"British Columbia" + }, + { + "coordinates":{ + "latitude":"-33.8688", + "longitude":"151.2093" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "id":6, + "latest":{ + "confirmed":134, + "deaths":134, + "recovered":134 + }, + "province":"New South Wales" + }, + { + "coordinates":{ + "latitude":"-37.8136", + "longitude":"144.9631" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "id":7, + "latest":{ + "confirmed":57, + "deaths":57, + "recovered":57 + }, + "province":"Victoria" + }, + { + "coordinates":{ + "latitude":"-28.0167", + "longitude":"153.4" + }, + "country":"Australia", + "country_code":"AU", + "continent_codes_set":["OCE"], + "id":8, + "latest":{ + "confirmed":61, + "deaths":61, + "recovered":61 + }, + "province":"Queensland" + }, + { + "coordinates":{ + "latitude":"11.55", + "longitude":"104.9167" + }, + "country":"Cambodia", + "country_code":"KH", + "continent_codes_set":["ASI"], + "id":9, + "latest":{ + "confirmed":7, + "deaths":7, + "recovered":7 + }, + "province":"" + } + ] +} diff --git a/tests/expected_output/v2_locations_id_1.json b/tests/expected_output/v2_locations_id_1.json index c78c4e0c..868ce83b 100644 --- a/tests/expected_output/v2_locations_id_1.json +++ b/tests/expected_output/v2_locations_id_1.json @@ -1 +1,196 @@ -{"location":{"coordinates":{"latitude":"36","longitude":"138"},"country":"Japan","country_code":"JP","id":1,"latest":{"confirmed":839,"deaths":839,"recovered":839},"province":"","timelines":{"confirmed":{"latest":839,"timeline":{"2020-01-22T00:00:00Z":2,"2020-01-23T00:00:00Z":1,"2020-01-24T00:00:00Z":2,"2020-01-25T00:00:00Z":2,"2020-01-26T00:00:00Z":4,"2020-01-27T00:00:00Z":4,"2020-01-28T00:00:00Z":7,"2020-01-29T00:00:00Z":7,"2020-01-30T00:00:00Z":11,"2020-01-31T00:00:00Z":15,"2020-02-01T00:00:00Z":20,"2020-02-02T00:00:00Z":20,"2020-02-03T00:00:00Z":20,"2020-02-04T00:00:00Z":22,"2020-02-05T00:00:00Z":22,"2020-02-06T00:00:00Z":45,"2020-02-07T00:00:00Z":25,"2020-02-08T00:00:00Z":25,"2020-02-09T00:00:00Z":26,"2020-02-10T00:00:00Z":26,"2020-02-11T00:00:00Z":26,"2020-02-12T00:00:00Z":28,"2020-02-13T00:00:00Z":28,"2020-02-14T00:00:00Z":29,"2020-02-15T00:00:00Z":43,"2020-02-16T00:00:00Z":59,"2020-02-17T00:00:00Z":66,"2020-02-18T00:00:00Z":74,"2020-02-19T00:00:00Z":84,"2020-02-20T00:00:00Z":94,"2020-02-21T00:00:00Z":105,"2020-02-22T00:00:00Z":122,"2020-02-23T00:00:00Z":147,"2020-02-24T00:00:00Z":159,"2020-02-25T00:00:00Z":170,"2020-02-26T00:00:00Z":189,"2020-02-27T00:00:00Z":214,"2020-02-28T00:00:00Z":228,"2020-02-29T00:00:00Z":241,"2020-03-01T00:00:00Z":256,"2020-03-02T00:00:00Z":274,"2020-03-03T00:00:00Z":293,"2020-03-04T00:00:00Z":331,"2020-03-05T00:00:00Z":360,"2020-03-06T00:00:00Z":420,"2020-03-07T00:00:00Z":461,"2020-03-08T00:00:00Z":502,"2020-03-09T00:00:00Z":511,"2020-03-10T00:00:00Z":581,"2020-03-11T00:00:00Z":639,"2020-03-12T00:00:00Z":639,"2020-03-13T00:00:00Z":701,"2020-03-14T00:00:00Z":773,"2020-03-15T00:00:00Z":839}},"deaths":{"latest":839,"timeline":{"2020-01-22T00:00:00Z":2,"2020-01-23T00:00:00Z":1,"2020-01-24T00:00:00Z":2,"2020-01-25T00:00:00Z":2,"2020-01-26T00:00:00Z":4,"2020-01-27T00:00:00Z":4,"2020-01-28T00:00:00Z":7,"2020-01-29T00:00:00Z":7,"2020-01-30T00:00:00Z":11,"2020-01-31T00:00:00Z":15,"2020-02-01T00:00:00Z":20,"2020-02-02T00:00:00Z":20,"2020-02-03T00:00:00Z":20,"2020-02-04T00:00:00Z":22,"2020-02-05T00:00:00Z":22,"2020-02-06T00:00:00Z":45,"2020-02-07T00:00:00Z":25,"2020-02-08T00:00:00Z":25,"2020-02-09T00:00:00Z":26,"2020-02-10T00:00:00Z":26,"2020-02-11T00:00:00Z":26,"2020-02-12T00:00:00Z":28,"2020-02-13T00:00:00Z":28,"2020-02-14T00:00:00Z":29,"2020-02-15T00:00:00Z":43,"2020-02-16T00:00:00Z":59,"2020-02-17T00:00:00Z":66,"2020-02-18T00:00:00Z":74,"2020-02-19T00:00:00Z":84,"2020-02-20T00:00:00Z":94,"2020-02-21T00:00:00Z":105,"2020-02-22T00:00:00Z":122,"2020-02-23T00:00:00Z":147,"2020-02-24T00:00:00Z":159,"2020-02-25T00:00:00Z":170,"2020-02-26T00:00:00Z":189,"2020-02-27T00:00:00Z":214,"2020-02-28T00:00:00Z":228,"2020-02-29T00:00:00Z":241,"2020-03-01T00:00:00Z":256,"2020-03-02T00:00:00Z":274,"2020-03-03T00:00:00Z":293,"2020-03-04T00:00:00Z":331,"2020-03-05T00:00:00Z":360,"2020-03-06T00:00:00Z":420,"2020-03-07T00:00:00Z":461,"2020-03-08T00:00:00Z":502,"2020-03-09T00:00:00Z":511,"2020-03-10T00:00:00Z":581,"2020-03-11T00:00:00Z":639,"2020-03-12T00:00:00Z":639,"2020-03-13T00:00:00Z":701,"2020-03-14T00:00:00Z":773,"2020-03-15T00:00:00Z":839}},"recovered":{"latest":839,"timeline":{"2020-01-22T00:00:00Z":2,"2020-01-23T00:00:00Z":1,"2020-01-24T00:00:00Z":2,"2020-01-25T00:00:00Z":2,"2020-01-26T00:00:00Z":4,"2020-01-27T00:00:00Z":4,"2020-01-28T00:00:00Z":7,"2020-01-29T00:00:00Z":7,"2020-01-30T00:00:00Z":11,"2020-01-31T00:00:00Z":15,"2020-02-01T00:00:00Z":20,"2020-02-02T00:00:00Z":20,"2020-02-03T00:00:00Z":20,"2020-02-04T00:00:00Z":22,"2020-02-05T00:00:00Z":22,"2020-02-06T00:00:00Z":45,"2020-02-07T00:00:00Z":25,"2020-02-08T00:00:00Z":25,"2020-02-09T00:00:00Z":26,"2020-02-10T00:00:00Z":26,"2020-02-11T00:00:00Z":26,"2020-02-12T00:00:00Z":28,"2020-02-13T00:00:00Z":28,"2020-02-14T00:00:00Z":29,"2020-02-15T00:00:00Z":43,"2020-02-16T00:00:00Z":59,"2020-02-17T00:00:00Z":66,"2020-02-18T00:00:00Z":74,"2020-02-19T00:00:00Z":84,"2020-02-20T00:00:00Z":94,"2020-02-21T00:00:00Z":105,"2020-02-22T00:00:00Z":122,"2020-02-23T00:00:00Z":147,"2020-02-24T00:00:00Z":159,"2020-02-25T00:00:00Z":170,"2020-02-26T00:00:00Z":189,"2020-02-27T00:00:00Z":214,"2020-02-28T00:00:00Z":228,"2020-02-29T00:00:00Z":241,"2020-03-01T00:00:00Z":256,"2020-03-02T00:00:00Z":274,"2020-03-03T00:00:00Z":293,"2020-03-04T00:00:00Z":331,"2020-03-05T00:00:00Z":360,"2020-03-06T00:00:00Z":420,"2020-03-07T00:00:00Z":461,"2020-03-08T00:00:00Z":502,"2020-03-09T00:00:00Z":511,"2020-03-10T00:00:00Z":581,"2020-03-11T00:00:00Z":639,"2020-03-12T00:00:00Z":639,"2020-03-13T00:00:00Z":701,"2020-03-14T00:00:00Z":773,"2020-03-15T00:00:00Z":839}}}}} +{ + "location":{ + "coordinates":{ + "latitude":"36", + "longitude":"138" + }, + "country":"Japan", + "country_code":"JP", + "id":1, + "latest":{ + "confirmed":839, + "deaths":839, + "recovered":839 + }, + "province":"", + "timelines":{ + "confirmed":{ + "latest":839, + "timeline":{ + "2020-01-22T00:00:00Z":2, + "2020-01-23T00:00:00Z":1, + "2020-01-24T00:00:00Z":2, + "2020-01-25T00:00:00Z":2, + "2020-01-26T00:00:00Z":4, + "2020-01-27T00:00:00Z":4, + "2020-01-28T00:00:00Z":7, + "2020-01-29T00:00:00Z":7, + "2020-01-30T00:00:00Z":11, + "2020-01-31T00:00:00Z":15, + "2020-02-01T00:00:00Z":20, + "2020-02-02T00:00:00Z":20, + "2020-02-03T00:00:00Z":20, + "2020-02-04T00:00:00Z":22, + "2020-02-05T00:00:00Z":22, + "2020-02-06T00:00:00Z":45, + "2020-02-07T00:00:00Z":25, + "2020-02-08T00:00:00Z":25, + "2020-02-09T00:00:00Z":26, + "2020-02-10T00:00:00Z":26, + "2020-02-11T00:00:00Z":26, + "2020-02-12T00:00:00Z":28, + "2020-02-13T00:00:00Z":28, + "2020-02-14T00:00:00Z":29, + "2020-02-15T00:00:00Z":43, + "2020-02-16T00:00:00Z":59, + "2020-02-17T00:00:00Z":66, + "2020-02-18T00:00:00Z":74, + "2020-02-19T00:00:00Z":84, + "2020-02-20T00:00:00Z":94, + "2020-02-21T00:00:00Z":105, + "2020-02-22T00:00:00Z":122, + "2020-02-23T00:00:00Z":147, + "2020-02-24T00:00:00Z":159, + "2020-02-25T00:00:00Z":170, + "2020-02-26T00:00:00Z":189, + "2020-02-27T00:00:00Z":214, + "2020-02-28T00:00:00Z":228, + "2020-02-29T00:00:00Z":241, + "2020-03-01T00:00:00Z":256, + "2020-03-02T00:00:00Z":274, + "2020-03-03T00:00:00Z":293, + "2020-03-04T00:00:00Z":331, + "2020-03-05T00:00:00Z":360, + "2020-03-06T00:00:00Z":420, + "2020-03-07T00:00:00Z":461, + "2020-03-08T00:00:00Z":502, + "2020-03-09T00:00:00Z":511, + "2020-03-10T00:00:00Z":581, + "2020-03-11T00:00:00Z":639, + "2020-03-12T00:00:00Z":639, + "2020-03-13T00:00:00Z":701, + "2020-03-14T00:00:00Z":773, + "2020-03-15T00:00:00Z":839 + } + }, + "deaths":{ + "latest":839, + "timeline":{ + "2020-01-22T00:00:00Z":2, + "2020-01-23T00:00:00Z":1, + "2020-01-24T00:00:00Z":2, + "2020-01-25T00:00:00Z":2, + "2020-01-26T00:00:00Z":4, + "2020-01-27T00:00:00Z":4, + "2020-01-28T00:00:00Z":7, + "2020-01-29T00:00:00Z":7, + "2020-01-30T00:00:00Z":11, + "2020-01-31T00:00:00Z":15, + "2020-02-01T00:00:00Z":20, + "2020-02-02T00:00:00Z":20, + "2020-02-03T00:00:00Z":20, + "2020-02-04T00:00:00Z":22, + "2020-02-05T00:00:00Z":22, + "2020-02-06T00:00:00Z":45, + "2020-02-07T00:00:00Z":25, + "2020-02-08T00:00:00Z":25, + "2020-02-09T00:00:00Z":26, + "2020-02-10T00:00:00Z":26, + "2020-02-11T00:00:00Z":26, + "2020-02-12T00:00:00Z":28, + "2020-02-13T00:00:00Z":28, + "2020-02-14T00:00:00Z":29, + "2020-02-15T00:00:00Z":43, + "2020-02-16T00:00:00Z":59, + "2020-02-17T00:00:00Z":66, + "2020-02-18T00:00:00Z":74, + "2020-02-19T00:00:00Z":84, + "2020-02-20T00:00:00Z":94, + "2020-02-21T00:00:00Z":105, + "2020-02-22T00:00:00Z":122, + "2020-02-23T00:00:00Z":147, + "2020-02-24T00:00:00Z":159, + "2020-02-25T00:00:00Z":170, + "2020-02-26T00:00:00Z":189, + "2020-02-27T00:00:00Z":214, + "2020-02-28T00:00:00Z":228, + "2020-02-29T00:00:00Z":241, + "2020-03-01T00:00:00Z":256, + "2020-03-02T00:00:00Z":274, + "2020-03-03T00:00:00Z":293, + "2020-03-04T00:00:00Z":331, + "2020-03-05T00:00:00Z":360, + "2020-03-06T00:00:00Z":420, + "2020-03-07T00:00:00Z":461, + "2020-03-08T00:00:00Z":502, + "2020-03-09T00:00:00Z":511, + "2020-03-10T00:00:00Z":581, + "2020-03-11T00:00:00Z":639, + "2020-03-12T00:00:00Z":639, + "2020-03-13T00:00:00Z":701, + "2020-03-14T00:00:00Z":773, + "2020-03-15T00:00:00Z":839 + } + }, + "recovered":{ + "latest":839, + "timeline":{ + "2020-01-22T00:00:00Z":2, + "2020-01-23T00:00:00Z":1, + "2020-01-24T00:00:00Z":2, + "2020-01-25T00:00:00Z":2, + "2020-01-26T00:00:00Z":4, + "2020-01-27T00:00:00Z":4, + "2020-01-28T00:00:00Z":7, + "2020-01-29T00:00:00Z":7, + "2020-01-30T00:00:00Z":11, + "2020-01-31T00:00:00Z":15, + "2020-02-01T00:00:00Z":20, + "2020-02-02T00:00:00Z":20, + "2020-02-03T00:00:00Z":20, + "2020-02-04T00:00:00Z":22, + "2020-02-05T00:00:00Z":22, + "2020-02-06T00:00:00Z":45, + "2020-02-07T00:00:00Z":25, + "2020-02-08T00:00:00Z":25, + "2020-02-09T00:00:00Z":26, + "2020-02-10T00:00:00Z":26, + "2020-02-11T00:00:00Z":26, + "2020-02-12T00:00:00Z":28, + "2020-02-13T00:00:00Z":28, + "2020-02-14T00:00:00Z":29, + "2020-02-15T00:00:00Z":43, + "2020-02-16T00:00:00Z":59, + "2020-02-17T00:00:00Z":66, + "2020-02-18T00:00:00Z":74, + "2020-02-19T00:00:00Z":84, + "2020-02-20T00:00:00Z":94, + "2020-02-21T00:00:00Z":105, + "2020-02-22T00:00:00Z":122, + "2020-02-23T00:00:00Z":147, + "2020-02-24T00:00:00Z":159, + "2020-02-25T00:00:00Z":170, + "2020-02-26T00:00:00Z":189, + "2020-02-27T00:00:00Z":214, + "2020-02-28T00:00:00Z":228, + "2020-02-29T00:00:00Z":241, + "2020-03-01T00:00:00Z":256, + "2020-03-02T00:00:00Z":274, + "2020-03-03T00:00:00Z":293, + "2020-03-04T00:00:00Z":331, + "2020-03-05T00:00:00Z":360, + "2020-03-06T00:00:00Z":420, + "2020-03-07T00:00:00Z":461, + "2020-03-08T00:00:00Z":502, + "2020-03-09T00:00:00Z":511, + "2020-03-10T00:00:00Z":581, + "2020-03-11T00:00:00Z":639, + "2020-03-12T00:00:00Z":639, + "2020-03-13T00:00:00Z":701, + "2020-03-14T00:00:00Z":773, + "2020-03-15T00:00:00Z":839 + } + } + } + } +} diff --git a/tests/test_continents.py b/tests/test_continents.py new file mode 100644 index 00000000..0b385ddb --- /dev/null +++ b/tests/test_continents.py @@ -0,0 +1,28 @@ +import pytest + +from app.utils import continents, countries + + +# fmt: off +@pytest.mark.parametrize( + "country_name,expected_continent_codes_set", + [ + ("Germany", ["EUR"]), + ("Bolivia, Plurinational State of", ["SAC"]), + ("Korea, Democratic People's Republic of", ["ASI"]), + ("BlaBla", ["CCC"]), + ("United States Minor Outlying Islands", ["OCE", "NAC"]), + ("Russian Federation", ["EUR", "ASI"]), + ("Armenia", ["EUR", "ASI"]), + ("Georgia", ["EUR", "ASI"]), + ("Cyprus", ["EUR", "ASI"]), + ("Turkey", ["EUR", "ASI"]), + ("Kazakhstan", ["EUR", "ASI"]), + ("Azerbaijan", ["EUR", "ASI"]), + (" Azerbaijan", ["EUR", "ASI"]), + ], +) +def test_country_name__continent_codes_set(country_name, expected_continent_codes_set): + country_code = countries.country_code(country_name) + continent_codes_set = continents.continent_codes_set(country_code) + assert continent_codes_set == set(expected_continent_codes_set) diff --git a/tests/test_location.py b/tests/test_location.py index 567eddcd..2b9fba78 100644 --- a/tests/test_location.py +++ b/tests/test_location.py @@ -15,11 +15,11 @@ def __init__(self, latest): @pytest.mark.parametrize( - "test_id, country, country_code, province, latitude, longitude, confirmed_latest, deaths_latest, recovered_latest", + "test_id, country, country_code, continent_codes_set, province, latitude, longitude, confirmed_latest, deaths_latest, recovered_latest", [ - (0, "Thailand", "TH", "", 15, 100, 1000, 1111, 22222), - (1, "Deutschland", "DE", "", 15, 100, 1000, 1111, 22222), - (2, "Cruise Ship", "XX", "", 15, 100, 1000, 1111, 22222), + (0, "Thailand", "TH", ["ASI"], "", 15, 100, 1000, 1111, 22222), + (1, "Deutschland", "DE", ["EUR"], "", 15, 100, 1000, 1111, 22222), + (2, "Cruise Ship", "XX", ["CCC"], "", 15, 100, 1000, 1111, 22222), ], ) @mock.patch("app.timeline.Timeline", side_effect=mocked_timeline) @@ -28,6 +28,7 @@ def test_location_class( test_id, country, country_code, + continent_codes_set, province, latitude, longitude, @@ -52,4 +53,5 @@ def test_location_class( ) assert location_obj.country_code == country_code + assert location_obj.continent_codes_set == set(continent_codes_set) assert not location_obj.serialize() == None diff --git a/tests/test_routes.py b/tests/test_routes.py index 48d804e5..d0af0566 100644 --- a/tests/test_routes.py +++ b/tests/test_routes.py @@ -13,6 +13,25 @@ from .test_jhu import DATETIME_STRING, mocked_requests_get, mocked_strptime_isoformat +def format_json(s): + return json.dumps(json.loads(s), indent=4, sort_keys=True) + + +def do_test_v1(obj, state, mock_request_get, mock_datetime): + "Formatted json-strings make debugging easier" + mock_datetime.utcnow.return_value.isoformat.return_value = obj.date + mock_datetime.strptime.side_effect = mocked_strptime_isoformat + + json_ret = obj.asgi_client.get("/{}".format(state)).json() + ret = str(json_ret).replace("'", '"') + + filepath = "tests/expected_output/v1_{state}.json".format(state=state) + with open(filepath, "r") as file: + exp = file.read() + + assert format_json(ret) == format_json(exp) + + @mock.patch("app.services.location.jhu.datetime") @mock.patch("app.services.location.jhu.requests.get", side_effect=mocked_requests_get) class FlaskRoutesTest(unittest.TestCase): @@ -26,12 +45,6 @@ def setUp(self): self.asgi_client = TestClient(APP) self.date = DATETIME_STRING - def read_file_v1(self, state): - filepath = "tests/expected_output/v1_{state}.json".format(state=state) - with open(filepath, "r") as file: - expected_json_output = file.read() - return expected_json_output - def test_root_api(self, mock_request_get, mock_datetime): """Validate that / returns a 200 and is not a redirect.""" response = self.asgi_client.get("/") @@ -40,49 +53,23 @@ def test_root_api(self, mock_request_get, mock_datetime): assert not response.is_redirect def test_v1_confirmed(self, mock_request_get, mock_datetime): - mock_datetime.utcnow.return_value.isoformat.return_value = self.date - mock_datetime.strptime.side_effect = mocked_strptime_isoformat - state = "confirmed" - expected_json_output = self.read_file_v1(state=state) - return_data = self.asgi_client.get("/{}".format(state)).json() - - assert return_data == json.loads(expected_json_output) + do_test_v1(self, "confirmed", mock_request_get, mock_datetime) def test_v1_deaths(self, mock_request_get, mock_datetime): - mock_datetime.utcnow.return_value.isoformat.return_value = self.date - mock_datetime.strptime.side_effect = mocked_strptime_isoformat - state = "deaths" - expected_json_output = self.read_file_v1(state=state) - return_data = self.asgi_client.get("/{}".format(state)).json() - - assert return_data == json.loads(expected_json_output) + do_test_v1(self, "deaths", mock_request_get, mock_datetime) def test_v1_recovered(self, mock_request_get, mock_datetime): - mock_datetime.utcnow.return_value.isoformat.return_value = self.date - mock_datetime.strptime.side_effect = mocked_strptime_isoformat - state = "recovered" - expected_json_output = self.read_file_v1(state=state) - return_data = self.asgi_client.get("/{}".format(state)).json() - - assert return_data == json.loads(expected_json_output) + do_test_v1(self, "recovered", mock_request_get, mock_datetime) def test_v1_all(self, mock_request_get, mock_datetime): - mock_datetime.utcnow.return_value.isoformat.return_value = self.date - mock_datetime.strptime.side_effect = mocked_strptime_isoformat - state = "all" - expected_json_output = self.read_file_v1(state=state) - return_data = self.asgi_client.get("/{}".format(state)).json() - - assert return_data == json.loads(expected_json_output) + do_test_v1(self, "all", mock_request_get, mock_datetime) def test_v2_latest(self, mock_request_get, mock_datetime): mock_datetime.utcnow.return_value.isoformat.return_value = DATETIME_STRING mock_datetime.strptime.side_effect = mocked_strptime_isoformat state = "latest" return_data = self.asgi_client.get(f"/v2/{state}").json() - check_dict = {"latest": {"confirmed": 1940, "deaths": 1940, "recovered": 0}} - assert return_data == check_dict def test_v2_locations(self, mock_request_get, mock_datetime): @@ -93,9 +80,7 @@ def test_v2_locations(self, mock_request_get, mock_datetime): filepath = "tests/expected_output/v2_{state}.json".format(state=state) with open(filepath, "r") as file: - expected_json_output = file.read() - - # assert return_data == json.loads(expected_json_output) + data_read = file.read() def test_v2_locations_id(self, mock_request_get, mock_datetime): mock_datetime.utcnow.return_value.isoformat.return_value = DATETIME_STRING @@ -107,9 +92,7 @@ def test_v2_locations_id(self, mock_request_get, mock_datetime): filepath = "tests/expected_output/v2_{state}_id_{test_id}.json".format(state=state, test_id=test_id) with open(filepath, "r") as file: - expected_json_output = file.read() - - # assert return_data == expected_json_output + data_read = file.read() def tearDown(self): pass