ExpDev07 / coronavirus-tracker-api

🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the 🔥 FastAPI framework. Supports multiple sources!
https://coronavirus-tracker-api.herokuapp.com
GNU General Public License v3.0
1.59k stars 320 forks source link

[BUG]Death data missing from countries id266 onwards as from 23/08/22 #489

Closed PRRH closed 2 years ago

PRRH commented 2 years ago

Describe the bug A clear and concise description of what the bug is. Please include timestamps and HTTP status codes. If possible include the httpie or curl request and response. Please include the verbose flag. -v

To Reproduce httpie/curl request to reproduce the behavior:

  1. Getting Italy data at v2/locations/IT gives a 422.
  2. Expected to same data as /v2/locations?country_code=IT
  3. See httpie request & response below

Expected behavior A clear and concise description of what you expected to happen.

Screenshots or Requests If applicable, add screenshots or httpie/curlrequests to help explain your problem.

$ http GET https://coronavirus-tracker-api.herokuapp.com/v2/locations/IT -v                                                                                                                                                            
GET /v2/locations/IT HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: coronavirus-tracker-api.herokuapp.com
User-Agent: HTTPie/2.0.0

HTTP/1.1 422 Unprocessable Entity
Connection: keep-alive
Content-Length: 99
Content-Type: application/json
Date: Sat, 18 Apr 2020 12:50:29 GMT
Server: uvicorn
Via: 1.1 vegur

{
    "detail": [
        {
            "loc": [
                "path",
                "id"
            ],
            "msg": "value is not a valid integer",
            "type": "type_error.integer"
        }
    ]
}

Additional context Add any other context about the problem here. Does the other instance at https://covid-tracker-us.herokuapp.com/ produce the same result?

ExpDev07 commented 2 years ago

Hi! Maybe not the best API design, but you have to provide the "id" as seen in /v2/locations?country_code=IT, for IT, this is 154, so the correct endpoint to hit would be/v2/locations/154 (without timelines: /v2/locations/154?timelines=false).

Hope this helped.

PRRH commented 2 years ago

https://coronavirus-tracker-api.herokuapp.com/#/v2/get_locations_v2_locations_get Thw .json file produced with try it out thenExecute from this websie produces th afore mentioned etror

ExpDev07 commented 2 years ago

Works fine for me

PRRH commented 2 years ago

https://covid-tracker-us.herokuapp.com/#/v2/get_locations_v2_locations_get produces the same error

ExpDev07 commented 2 years ago

No it does not. Could you provide a screenshot?

PRRH commented 2 years ago

It is not an error the figure produced for deaths is Zero. from channel islands onwards.

PRRH commented 2 years ago

{ "id": 265, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Channel Islands", "last_updated": "2022-08-24T09:02:51.575789Z", "coordinates": { "latitude": "49.3723", "longitude": "-2.3644" }, "latest": { "confirmed": 0, "deaths": 0, "recovered": 0 } }, { "id": 266, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Falkland Islands (Malvinas)", "last_updated": "2022-08-24T09:02:51.603109Z", "coordinates": { "latitude": "-51.7963", "longitude": "-59.5236" }, "latest": { "confirmed": 1881, "deaths": 0, "recovered": 0 } }, { "id": 267, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Gibraltar", "last_updated": "2022-08-24T09:02:51.616330Z", "coordinates": { "latitude": "36.1408", "longitude": "-5.3536" }, "latest": { "confirmed": 20049, "deaths": 0, "recovered": 0 } }, { "id": 268, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Guernsey", "last_updated": "2022-08-24T09:02:51.633121Z", "coordinates": { "latitude": "49.448196", "longitude": "-2.58949" }, "latest": { "confirmed": 30519, "deaths": 0, "recovered": 0 } }, { "id": 269, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Isle of Man", "last_updated": "2022-08-24T09:02:51.644295Z", "coordinates": { "latitude": "54.2361", "longitude": "-4.5481" }, "latest": { "confirmed": 37794, "deaths": 0, "recovered": 0 } }, { "id": 270, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Jersey", "last_updated": "2022-08-24T09:02:51.661530Z", "coordinates": { "latitude": "49.2138", "longitude": "-2.1358" }, "latest": { "confirmed": 58733, "deaths": 0, "recovered": 0 } }, { "id": 271, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Montserrat", "last_updated": "2022-08-24T09:02:51.679854Z", "coordinates": { "latitude": "16.742498", "longitude": "-62.187366" }, "latest": { "confirmed": 1106, "deaths": 0, "recovered": 0 } }, { "id": 272, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Saint Helena, Ascension and Tristan da Cunha", "last_updated": "2022-08-24T09:02:51.692343Z", "coordinates": { "latitude": "-7.9467", "longitude": "-14.3559" }, "latest": { "confirmed": 4, "deaths": 0, "recovered": 0 } }, { "id": 273, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Turks and Caicos Islands", "last_updated": "2022-08-24T09:02:51.706528Z", "coordinates": { "latitude": "21.694", "longitude": "-71.7979" }, "latest": { "confirmed": 6359, "deaths": 0, "recovered": 0 } }, { "id": 274, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "", "last_updated": "2022-08-24T09:02:51.726024Z", "coordinates": { "latitude": "55.3781", "longitude": "-3.436" }, "latest": { "confirmed": 23460787, "deaths": 0, "recovered": 0 } }, { "id": 275, "country": "Uruguay", "country_code": "UY", "country_population": 3449299, "province": "", "last_updated": "2022-08-24T09:02:51.749658Z", "coordinates": { "latitude": "-32.5228", "longitude": "-55.7658" }, "latest": { "confirmed": 977305, "deaths": 0, "recovered": 0 } }, { "id": 276, "country": "Uzbekistan", "country_code": "UZ", "country_population": 32955400, "province": "", "last_updated": "2022-08-24T09:02:51.776817Z", "coordinates": { "latitude": "41.377491", "longitude": "64.585262" }, "latest": { "confirmed": 243691, "deaths": 0, "recovered": 0 } }, { "id": 277, "country": "Vanuatu", "country_code": "VU", "country_population": 292680, "province": "", "last_updated": "2022-08-24T09:02:51.804276Z", "coordinates": { "latitude": "-15.3767", "longitude": "166.9592" }, "latest": { "confirmed": 11770, "deaths": 0, "recovered": 0 } }, { "id": 278, "country": "Venezuela", "country_code": "VE", "country_population": 28870195, "province": "", "last_updated": "2022-08-24T09:02:51.831714Z", "coordinates": { "latitude": "6.4238", "longitude": "-66.5897" }, "latest": { "confirmed": 541708, "deaths": 0, "recovered": 0 } }, { "id": 279, "country": "Vietnam", "country_code": "VN", "country_population": 95540395, "province": "", "last_updated": "2022-08-24T09:02:51.856009Z", "coordinates": { "latitude": "14.058324", "longitude": "108.277199" }, "latest": { "confirmed": 11389268, "deaths": 0, "recovered": 0 } }, { "id": 280, "country": "West Bank and Gaza", "country_code": "PS", "country_population": 4569087, "province": "", "last_updated": "2022-08-24T09:02:51.879145Z", "coordinates": { "latitude": "31.9522", "longitude": "35.2332" }, "latest": { "confirmed": 698384, "deaths": 0, "recovered": 0 } }, { "id": 281, "country": "Winter Olympics 2022", "country_code": "XX", "country_population": null, "province": "", "last_updated": "2022-08-24T09:02:51.902646Z", "coordinates": { "latitude": "39.9042", "longitude": "116.4074" }, "latest": { "confirmed": 535, "deaths": 0, "recovered": 0 } }, { "id": 282, "country": "Yemen", "country_code": "YE", "country_population": 28498687, "province": "", "last_updated": "2022-08-24T09:02:51.918727Z", "coordinates": { "latitude": "15.552727", "longitude": "48.516388" }, "latest": { "confirmed": 11917, "deaths": 0, "recovered": 0 } }, { "id": 283, "country": "Zambia", "country_code": "ZM", "country_population": 17351822, "province": "", "last_updated": "2022-08-24T09:02:51.932772Z", "coordinates": { "latitude": "-13.133897", "longitude": "27.849332" }, "latest": { "confirmed": 332527, "deaths": 0, "recovered": 0 } }, { "id": 284, "country": "Zimbabwe", "country_code": "ZW", "country_population": 14439018, "province": "", "last_updated": "2022-08-24T09:02:51.948633Z", "coordinates": { "latitude": "-19.015438", "longitude": "29.154857" }, "latest": { "confirmed": 256628, "deaths": 0, "recovered": 0 } } ] }

PRRH commented 2 years ago

By the way thanks for your help I have been usiing these web sites every day since March 2020 to download the coronavirus data for all countries. IT HAS BEEN VERY MUCH APPRECIEATED. It has been a lockdown project.

ExpDev07 commented 2 years ago

I understand what you mean now, I'll look into this. Could be an issue with the data provider.

And thanks for your kind words!

PRRH commented 2 years ago

The clue might be that Guernsey and Jersey were added some months ago and the Channel Island figures have been zero ever since. Its odd that the zero data starts here. Just a thought

ExpDev07 commented 2 years ago

This should be fixed now by the PR. Channel Islands still show 0 because, well, JHU haven't provided any data for it (maybe noone died?). Anyways, now, at least the locations coming after should not be affected @PRRH .

PRRH commented 2 years ago

Thanks very much for all your help. Guernsey + Jersey are the Channel Islands . Once again THANKS.