guushoekman / local-football-team

Find your local football team with this voronoi map of clubs throughout the world
http://guushoekman.com/local-football-team/
MIT License
4 stars 1 forks source link

input.csv outdated #2

Open YaguraStation opened 6 years ago

YaguraStation commented 6 years ago

Lovely project. And I know it's just for lulz.

input.csv is outdated and I noticed that Wikidata is as well. So I'd be interested to find out how your query works and repair Wikidatas deficiencies wherever they occur (example Cape Town City FC).

guushoekman commented 6 years ago

Thanks! This was one of the first projects I did.

I added all the data manually! I used soccerway a lot I remember.

Do you have a suggestion on how this can be kept more up-to-date? It would be great to get the data from another source (like Wikidata) and keep that accurate so that it can be used by others.

YaguraStation commented 6 years ago

Thanks for letting me know. I will work on a SPARQL query at the Wikimedia ZA edit-a-thon April 21 that hopefully can be reused here.

When projects start relying on Wikidata, the more accurate it becomes and we all benefit ;-)

guushoekman commented 6 years ago

That would be very cool!

When I have enough time (like I did when I first worked on this project) I'll be very happy to contribute to Wikidata to make it more accurate.

YaguraStation commented 6 years ago

Below the SPARQL one could use in Wikidata Query or one of the other tools. Already there is a delta between input.csv and the Wikidata results, i.e. a lot of Wikidata editing lies ahead ;-).

To identity these deficits one can use the OPTIONAL clause to identify empty fields. To reduce the amount of results use more specific FILTER. Or simply use the map view in Wikidata Query instead of the table view to see where things are slightly off. E.g. South Africa.

Every once in a while I'll be reviewing teams and make repairs, reporting back to this issue.

SELECT ?association_football_teamLabel ?coordinates ?leagueLevelLabel ?countryLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?association_football_team wdt:P31 wd:Q476028.
  ?association_football_team wdt:P115 ?homeVenue.
  ?homeVenue wdt:P625 ?coordinates.
  ?association_football_team wdt:P118 ?league.
  ?league wdt:P3983 ?leagueLevel.
  FILTER (?leagueLevel < 4 )
  ?association_football_team wdt:P17 ?country.
}
guushoekman commented 6 years ago

That's so cool!

You're right that a lot of Wikidata editing is necessary but what a nice place to add the data. I'm very happy to spend time on this. I don't have a lot of spare time at the moment but I will in a few months' time.

YaguraStation commented 6 years ago

In April user Visvang [1] put in a ton of work making the query very presentable. We're getting there.

[1] https://www.wikidata.org/wiki/Special:Contributions/Visvang