Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nice to see SPARQL getting used in the wild for real purposes!

I want to do this too, and have lots of questions. How do you look up relationship terms like "wdt:P31/wdt:P279* wd:Q134447"? Is there a graph or entity viewer somewhere that allows discovery based on browsing a particular entity's tuples?

Edit: In addition to Squad_Tamer's tip below, the things I've found:

1) removing the #defaultView:map comment results in a table

2) adding the `?x` back to the select will result in links to the full entity page, including all statements associated with the entity nicely organized.

3) The SERVICE statement was entirely new to me, but points to how difficult it is to do knowledge summary (I.e. wtf should I call this entity? let's write a service for that.)




I figured out that if you click the "info" icon at the top-left of the screen, it'll bring up a little GUI editor with dropdowns. Still not great for finding categories, but better than "wdt:P279"


To find the relationships and entity IDs, you can type the prefix like "wdt:" or "wd:" then type something in English and hit Ctrl-Space. For instance, wd:nuclear<Ctrl-Space>. Alternatively you can search on wikidata.org.

1) Indeed, there are many other kinds of visualizations available as well (have a look at the examples)

3) the SERVICE is just an easy way to retrieve the name, which is stored in Wikidata, in a reasonable language. You can also access the name directly in SPARQL




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: