The entity viewer¶
The entity viewer turns one resource of your data into a readable web page. Give it an IRI and it shows everything the endpoint knows about it. It is a port of ldview by René Voorburg.
/entity?uri=http://www.wikidata.org/entity/Q219831
…shows The Night Watch. Open /entity without a uri for a form where you
can paste an IRI.
What you see¶
- Label and description in your preferred language (from your browser's language settings). When a value exists in several languages, tabs let you switch.
- Type badges for the
rdf:types of the resource. - Images: from image properties such as Wikidata's image (
wdt:P18), from IIIF image services, and through configured property paths. - A map when the resource has coordinates (latitude/longitude, or WKT such
as Wikidata's coordinate location,
wdt:P625). - Property tables, grouped, with prefixed names (
wdt:P170instead of the full IRI) and labels for linked resources. Every linked resource is a link to its own entity page. - Blank nodes, up to four levels deep, each in its own table, with links from the parent table.
- Inverse relations: resources that point to this one. For large numbers, a link opens the query editor with a query that lists all of them.
Which profile is used?¶
- The profile in the
profile=parameter (its key or name), if given:/entity?uri=…&profile=wikidata. - Otherwise the profile whose
uri_prefixesmatch the IRI. The example Wikidata profile claimshttp://www.wikidata.org/entity/. - Otherwise the default profile.
Downloading RDF¶
Every entity page has download links. You can also ask for a format directly:
| Format | Parameter |
|---|---|
| Turtle | ?format=turtle |
| JSON-LD | ?format=json-ld |
| RDF/XML | ?format=xml |
| N-Triples | ?format=nt |
curl 'http://127.0.0.1:8000/entity?uri=http://www.wikidata.org/entity/Q41264&format=turtle'
An RDF Accept header (for example Accept: text/turtle) works too.
Settings for Wikidata¶
Wikidata is huge, so the example profile adjusts the viewer (display: in
config/profiles.yaml):
display:
# A simple, fast query: only the direct statements of the item.
construct_query: "CONSTRUCT { {subject_uris} ?p ?o . } WHERE { {subject_uris} ?p ?o . }"
# Famous items have hundreds of thousands of incoming links; skip them.
show_inverse_relations: false
# When a label isn't available in the reader's language, use Wikidata's
# multilingual labels ("mul"), then English.
fallback_languages: [mul, en]
For your own data, the defaults are usually right. All settings are listed in SPARQL profiles.