Hi!
After a number of difficulties and unexpected setbacks[1] I am happy to announce that geospatial search for Wikidata Query Service is now deployed and functional. You can now search for items within certain radius of a point and within a box defined by two points - more detailed instructions are in the User Manual[2]. See also query examples[3] such as "airports within 100km of Berlin": http://tinyurl.com/zxy8o64
There are still a couple of things to complete, namely sorting by distance (coming soon) and units support (maybe). Overall progress of the task is tracked by T133566[4].
[1] https://lists.wikimedia.org/pipermail/wikidata/2016-May/008674.html [2] https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#Geospatial... [3] https://www.mediawiki.org/wiki/Wikibase/Indexing/SPARQL_Query_Examples#Airpo... [4] https://phabricator.wikimedia.org/T123565
Are the distances available somehow? I.e., the distances between the wikibase:center and the searched locations?
There has been some attempts (by James Heald?) on approximating the distances: http://tinyurl.com/otsp7cc
best regards Finn
On 05/09/2016 10:23 PM, Stas Malyshev wrote:
Hi!
After a number of difficulties and unexpected setbacks[1] I am happy to announce that geospatial search for Wikidata Query Service is now deployed and functional. You can now search for items within certain radius of a point and within a box defined by two points - more detailed instructions are in the User Manual[2]. See also query examples[3] such as "airports within 100km of Berlin": http://tinyurl.com/zxy8o64
There are still a couple of things to complete, namely sorting by distance (coming soon) and units support (maybe). Overall progress of the task is tracked by T133566[4].
[1] https://lists.wikimedia.org/pipermail/wikidata/2016-May/008674.html [2] https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#Geospatial... [3] https://www.mediawiki.org/wiki/Wikibase/Indexing/SPARQL_Query_Examples#Airpo... [4] https://phabricator.wikimedia.org/T123565
Hi!
Are the distances available somehow? I.e., the distances between the wikibase:center and the searched locations?
There is a distance function - see https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#Distance_f... - and there also soon will be a way to retrieve distances when searching around point - right now they are recalculated and this is a waste since the search already knows the distance, but in current version it discards it.
There's a slight bug in current version (see the example above for the workaround - the hint to disable analytic mode is required in some situations) - that's why it was not announced yet.
But for many applications geof:distance already works. The rest will be implemented an announced soon, probably sometime next week or week after that.
Very nice!
As a slight tweak on your query, here are some statues within 10km of London's Trafalgar Square http://tinyurl.com/htxqp5t
... or within 10km of Stockholm's Stortorget http://tinyurl.com/jnv5qo3 (Warning: per a recent decision of the Swedish Supreme Court, the latter search may be a copyright violation).
Probably quite a lot of items to add on both counts -- has anybody scoured Commons for public art, that may not yet have an article in any Wikipedia? -- but really exciting to be able to produce output like this so easily.
One thing I'm a little nervous about is that the first search is taking six and a half seconds to run, compared to 809 ms for every statue within Greater London http://tinyurl.com/hwf7pjg which I would have thought ought to be a similar-sized query.
I haven't checked the optimiser output -- is this likely to be because the join has been performed in a different order? Or is there a good reason why the geo-search should be so much slower, even now it has indexing built in ?
One other thing for the wishlist -- it would be really nice if the map mouseovers could show thumbnails (and indeed if there was a toggle to allow them for the table output, too). Also, should the Commons links not point to the file information pages, or alternatively to MediaViewer, rather than directly to the images? The latter makes it very hard to see the attribution information (etc) for the images, which could be a licence violation, eg of CC-BY.
But overall: wow! Fantastic!
All best,
James.
On 09/05/2016 21:23, Stas Malyshev wrote:
Hi!
After a number of difficulties and unexpected setbacks[1] I am happy to announce that geospatial search for Wikidata Query Service is now deployed and functional. You can now search for items within certain radius of a point and within a box defined by two points - more detailed instructions are in the User Manual[2]. See also query examples[3] such as "airports within 100km of Berlin": http://tinyurl.com/zxy8o64
There are still a couple of things to complete, namely sorting by distance (coming soon) and units support (maybe). Overall progress of the task is tracked by T133566[4].
[1] https://lists.wikimedia.org/pipermail/wikidata/2016-May/008674.html [2] https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#Geospatial... [3] https://www.mediawiki.org/wiki/Wikibase/Indexing/SPARQL_Query_Examples#Airpo... [4] https://phabricator.wikimedia.org/T123565
Just to add a little bit about those timings:
The number of hits and the query time are pretty similar for items within Greater London: http://tinyurl.com/z6h7tvn (4687 items in 562 ms)
compared to items within 10km of Trafalgar Square: http://tinyurl.com/j7jyc27 (6616 items in 668 ms)
The total number of statues we have is 11884 http://tinyurl.com/zuscnnt (342 ms)
All of these numbers are quite small, suggesting the performance issue isn't necessarily to do with what gets looked up first, but may be something else to do with the join.
-- James.
On 10/05/2016 18:28, James Heald wrote:
Very nice!
As a slight tweak on your query, here are some statues within 10km of London's Trafalgar Square http://tinyurl.com/htxqp5t
... or within 10km of Stockholm's Stortorget http://tinyurl.com/jnv5qo3 (Warning: per a recent decision of the Swedish Supreme Court, the latter search may be a copyright violation).
Probably quite a lot of items to add on both counts -- has anybody scoured Commons for public art, that may not yet have an article in any Wikipedia? -- but really exciting to be able to produce output like this so easily.
One thing I'm a little nervous about is that the first search is taking six and a half seconds to run, compared to 809 ms for every statue within Greater London http://tinyurl.com/hwf7pjg which I would have thought ought to be a similar-sized query.
I haven't checked the optimiser output -- is this likely to be because the join has been performed in a different order? Or is there a good reason why the geo-search should be so much slower, even now it has indexing built in ?
One other thing for the wishlist -- it would be really nice if the map mouseovers could show thumbnails (and indeed if there was a toggle to allow them for the table output, too). Also, should the Commons links not point to the file information pages, or alternatively to MediaViewer, rather than directly to the images? The latter makes it very hard to see the attribution information (etc) for the images, which could be a licence violation, eg of CC-BY.
But overall: wow! Fantastic!
All best,
James.
Fantastic!
Now impatiently waiting for AROUND implementation in wdq2sparql :-)
On Tue, May 10, 2016 at 6:51 PM James Heald j.heald@ucl.ac.uk wrote:
Just to add a little bit about those timings:
The number of hits and the query time are pretty similar for items within Greater London: http://tinyurl.com/z6h7tvn (4687 items in 562 ms)
compared to items within 10km of Trafalgar Square: http://tinyurl.com/j7jyc27 (6616 items in 668 ms)
The total number of statues we have is 11884 http://tinyurl.com/zuscnnt (342 ms)
All of these numbers are quite small, suggesting the performance issue isn't necessarily to do with what gets looked up first, but may be something else to do with the join.
-- James.
On 10/05/2016 18:28, James Heald wrote:
Very nice!
As a slight tweak on your query, here are some statues within 10km of London's Trafalgar Square http://tinyurl.com/htxqp5t
... or within 10km of Stockholm's Stortorget http://tinyurl.com/jnv5qo3 (Warning: per a recent decision of the Swedish Supreme Court, the latter search may be a copyright violation).
Probably quite a lot of items to add on both counts -- has anybody scoured Commons for public art, that may not yet have an article in any Wikipedia? -- but really exciting to be able to produce output like this so easily.
One thing I'm a little nervous about is that the first search is taking six and a half seconds to run, compared to 809 ms for every statue within Greater London http://tinyurl.com/hwf7pjg which I would have thought ought to be a similar-sized query.
I haven't checked the optimiser output -- is this likely to be because the join has been performed in a different order? Or is there a good reason why the geo-search should be so much slower, even now it has indexing built in ?
One other thing for the wishlist -- it would be really nice if the map mouseovers could show thumbnails (and indeed if there was a toggle to allow them for the table output, too). Also, should the Commons links not point to the file information pages, or alternatively to MediaViewer, rather than directly to the images? The latter makes it very hard to see the attribution information (etc) for the images, which could be a licence violation, eg of CC-BY.
But overall: wow! Fantastic!
All best,
James.
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wonderful, can you tell me if there are any plans to expand the functionality to include other shapes that don't correspond to a geographic border, central point or a box? E.g a user can draw a shape.
Thanks
John
On 11 May 2016 at 11:08, Magnus Manske magnusmanske@googlemail.com wrote:
Fantastic!
Now impatiently waiting for AROUND implementation in wdq2sparql :-)
On Tue, May 10, 2016 at 6:51 PM James Heald j.heald@ucl.ac.uk wrote:
Just to add a little bit about those timings:
The number of hits and the query time are pretty similar for items within Greater London: http://tinyurl.com/z6h7tvn (4687 items in 562 ms)
compared to items within 10km of Trafalgar Square: http://tinyurl.com/j7jyc27 (6616 items in 668 ms)
The total number of statues we have is 11884 http://tinyurl.com/zuscnnt (342 ms)
All of these numbers are quite small, suggesting the performance issue isn't necessarily to do with what gets looked up first, but may be something else to do with the join.
-- James.
On 10/05/2016 18:28, James Heald wrote:
Very nice!
As a slight tweak on your query, here are some statues within 10km of London's Trafalgar Square http://tinyurl.com/htxqp5t
... or within 10km of Stockholm's Stortorget http://tinyurl.com/jnv5qo3 (Warning: per a recent decision of the Swedish Supreme Court, the latter search may be a copyright violation).
Probably quite a lot of items to add on both counts -- has anybody scoured Commons for public art, that may not yet have an article in any Wikipedia? -- but really exciting to be able to produce output like this so easily.
One thing I'm a little nervous about is that the first search is taking six and a half seconds to run, compared to 809 ms for every statue within Greater London http://tinyurl.com/hwf7pjg which I would have thought ought to be a similar-sized query.
I haven't checked the optimiser output -- is this likely to be because the join has been performed in a different order? Or is there a good reason why the geo-search should be so much slower, even now it has indexing built in ?
One other thing for the wishlist -- it would be really nice if the map mouseovers could show thumbnails (and indeed if there was a toggle to allow them for the table output, too). Also, should the Commons links not point to the file information pages, or alternatively to MediaViewer, rather than directly to the images? The latter makes it very hard to see the attribution information (etc) for the images, which could be a licence violation, eg of CC-BY.
But overall: wow! Fantastic!
All best,
James.
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Very nice! From where is the map-data? Open street map?
On May 9, 2016, at 1:23 PM, Stas Malyshev smalyshev@wikimedia.org wrote:
Hi!
After a number of difficulties and unexpected setbacks[1] I am happy to announce that geospatial search for Wikidata Query Service is now deployed and functional. You can now search for items within certain radius of a point and within a box defined by two points - more detailed instructions are in the User Manual[2]. See also query examples[3] such as "airports within 100km of Berlin": http://tinyurl.com/zxy8o64
There are still a couple of things to complete, namely sorting by distance (coming soon) and units support (maybe). Overall progress of the task is tracked by T133566[4].
[1] https://lists.wikimedia.org/pipermail/wikidata/2016-May/008674.html [2] https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#Geospatial... [3] https://www.mediawiki.org/wiki/Wikibase/Indexing/SPARQL_Query_Examples#Airpo... [4] https://phabricator.wikimedia.org/T123565 -- Stas Malyshev smalyshev@wikimedia.org
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Hi!
Very nice! From where is the map-data? Open street map?
Yes, see: https://www.mediawiki.org/wiki/Maps