lipas-liikuntapaikat / lipas

Lipas is a nationwide, public GIS service of Finnish sport and recreation facilities.
MIT License
70 stars 14 forks source link

Data structure #61

Closed pavetsu14 closed 1 year ago

pavetsu14 commented 2 years ago

Tried to figure out what information is being gathered from each type of sports place but I cannot find a corresponding field name for each piece of information available via browser version of Lipas?

Example case. Information about Petsmo jääkenttä via browser version: https://www.lipas.fi/liikuntapaikat/602467

Information about the same sports place via JSON API: http://lipas.cc.jyu.fi/api/sports-places/602467 and http://lipas.cc.jyu.fi/api/sports-place-types/1520

I am under the expression that I should find all used fields related to the Petsmo jääkenttä from the two above listed URLs. Yet I cannot find any field into which a user could input the swedish name of the sports place or the information about whether the sports place is at use or not. Still this information is available from the browser version (Nimi ruotsiksi, Liikuntapaikan tila).

Am I missing something or isn't the content of the JSON API up-to-date?

vharmain commented 2 years ago

Hi @pavetsu14 and sorry for a delayed response. I completely missed the issue here. 🤦

In the API you get the Swedish name (and other localized fields) by querying with lang=se query param http://lipas.cc.jyu.fi/api/sports-places/602467?lang=se

Does this help you forward?

vharmain commented 2 years ago

In addition.. Regarding the status (active, out-of-use-temporarily) etc... that doesn't currently exist in the API. The API includes only active places. However, if you need to know if a place is deleted, those can be queried with http://lipas.cc.jyu.fi/api/deleted-sports-places

vharmain commented 2 years ago

However, if you have a use-case where you need the more elaborated status information, please let me know and I'll think something. :)

vharmain commented 2 years ago

And for even further background information... The documented LIPAS-api predates the LIPAS-application that is in this repo. There have been some changes but we haven't yet published a new version of the REST-API because so far the users have been happy with the 'old' one. However, the data model in the current application is slightly different compared to the old one.

If you feel adventurous, the application itself runs on top of the "new" (undocumented) API. https://lipas.fi/api/sports-sites/602467 this query returns all the data about Petsmo jääkenttä that's used by the Web-UI, including the status. The new API can be used but there's no documentation for it due to lack of time/money/priority.

vharmain commented 1 year ago

Closing due to inactivity. Please re-open when necessary!