It’s easy enough for a SPARQL query to specify that you only want literal values that are tagged with a particular spoken language such as English or French. I had a more complex condition to express recently that has happened to me fairly often: how do I retrieve all the data for a particular resource except the literals tagged in a foreign language? I want all the triples with object property values, and I want all the ones with literal values, regardless of type, unless they are tagged…
In my book Learning SPARQL I often use a query for all the triples in a dataset (that is, all the triples in the default graph and all the triples in any named graphs) that I now realize needs some revision to be more accurate.
SPARQL Anything is an open source tool that lets you use SPARQL to query data in a long list of popular formats: XML, JSON, CSV, HTML, Excel, Text, Binary, EXIF, File System, Zip/Tar, Markdown, YAML, Bibtex, DOCx, and PPTx. It has a lot of great documentation and features, but I’ll start here with an example of it in action.
For a long time I’ve thought that it would be fun to use SPARQL queries of Wikidata to create music playlists that can be played back. While researching last month’s blog entry Use SPARQL to query for movies, then watch them I learned about the P724 Internet Archive ID property, and that turned out to be an excellent hook for finding Wikidata audio recordings that we can listen to.
I recently learned about WikiFlix, which lets you search for streamable movies on the Internet. It was assembled by Sandra Fauconnier and Magnus Manske. (Magnus played a major role in developing MediaWiki, which I’ve blogged about several times.) Sandra has provided some good background on the history and goals of WikiFlix on Wikimedia.
Wikipedia describes the Billboard Hot 100 as “the music industry standard record chart in the United States for songs, published weekly by Billboard magazine. Chart rankings are based on sales (physical and digital), online streaming, and radio airplay in the U.S.” A song that ranks highly there is a hit song (in the U.S.) by definition. The data goes back to the beginning of the chart’s history in 1958, when Rick Nelson’s Poor Little Fool was the number one song.