OpenStreetMap logo OpenStreetMap

In regards that the tool https://wiki.openstreetmap.orgdata.link works best with smaller administerey areas I will break it down on the municipality level(Kommun in Swedish) we have 290 in Sweden.

Goal:

To be served a table which have the following data:

municipality(kommun) Amount of linked lakes Total amount of lakes Precentage
Total amount of municipality(kommun) Total amount of linked lakes Total amount of lakes Total Precentage

Main category of all lakes in Sweden on sv.wikipedia.org:

The catgory I will use to get total amount of lakes in each municipality(kommun)

Kategori:Insjöar i Sverige efter kommun

Approach

I will then query each municipality(kommun) using Sophox in the SPARQL language on each municipality(kommun) (by name). I will then get a list of QID of all the wikidata lakes that I then can use to ask Sophox if any element has that wikidata QID. If anyone has that

Acknowledged drawbacks/limitations of this strategy:

  1. This database query will not detect cases which multiple elements in OSM has the same QID. The tool https://wiki.openstreetmap.orgdata.link will make you aware of this but not i a table which can give you an overview. For that it is best to update the code at that project, see issue #680 I created in it´s repostory.

Where does the data off the lakes come from in wikidata?

They are inported some time the last 10 years from the national database of lakes and bodies of water called VISS Bots created the articles on Swedish wikipedia from this database and this is the reason we now can link the data from OSM to the wikipedia articles through the wikidata QID on the https://wiki.openstreetmap.org/wiki/Tag:water=lake polygons(enclosed ways/areas and multipolygons).

Why didn´t I just use the Overpass Turbo API?

You may ask why I just didn´t query the Overpass API to get how many water=lake polygons also had a wikidata tag vs no wikidata tag? There could have been new very small lakes which where mapped in OSM which is not present in VISS(not a lake in the eyes of VISS/the government) and in extension wikipedia/wikidata. This projects goal is to show as many maplinked great polygons from OSM in the infoboxes on the lakes, to be able to motivate people to use https://wiki.openstreetmap.orgdata.link and track progress in doing so!

Presentation:

I will publish the Sophox query here in the diary and also try to pitch the creator for https://wiki.openstreetmap.orgdata.link to implement it the search tab for . Type: administrative. I will also publish the it as a Soppbox example.

Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Discussion

Log in to leave a comment