PotentialWeb / CoronaTab

Free & Open source platform for COVID19 data. Dashboard - REST API - Browser Extension - Localised 🦠 😷
MIT License
35 stars 20 forks source link

Are the GeoJSON coordinates for countries longitude and latitude? #26

Open goepi opened 4 years ago

goepi commented 4 years ago

I am a bit new to developing using maps, but I got google maps up and running quickly and I wanted to display some of the data on a google map using longitude and latitude.

For example, GET https://api.coronatab.app/places/netherlands?include[]=children returns

{
    "data": {
        "id": "netherlands",
        "typeId": "country",
        "alpha2code": "NL",
        "alpha3code": "NLD",
        "hospitalBedOccupancy": 0.654,
        "hospitalBeds": 56888,
        "icuBeds": 1097,
        "dataSource": "https://github.com/CSSEGISandData/COVID-19",
        "location": {
            "type": "Point",
            "coordinates": [
                -31.4185,
                32.7635
            ]
        },
(...)

What are the coordinates there? When I locate them on google maps, it's the middle of the ocean. This sort of thing happens for many countries, but not for others. Am I missing something completely by assuming that GeoJSON is longitude and latitude here?

nodeful commented 4 years ago

GeoJSON: [lng, lat] Google Maps: lat,lng

goepi commented 4 years ago

@nodeful Try opening Google Maps and inputting the coordinates I pasted in the example above. Whichever order you use for the coordinates, you do not end up in the Netherlands. Same goes for other countries using this API, such as the UK.

nodeful commented 4 years ago

You can edit the data here: /modules/data/src/seeds/places/countries/data.json

goepi commented 4 years ago

Ok sure I can potentially do that but one question: where did the seed data originally come from?

There are potentially many incorrect coordinates, so perhaps best to get to the root of the issue

nodeful commented 4 years ago

That's mentioned in the README. I would discourage to use our API at this point. The project hasn't picked up much traction so our company can't continue supporting it further.

goepi commented 4 years ago

gotcha ok