Template:Compare Wikidata with CSV


Documentation icon Template documentation[view · edit · history · purge ]

Compare Wikidata with CSV allows you to compare information in Wikidata against an external source of data, to highlight errors and omissions.

Usage edit

{{Compare Wikidata with CSV}}

Add this template to a page, and you will be presented with a wizard for setting up a new comparison. You'll need to supply a URL which points at a CSV file and then a Wikidata SPARQL query that attempts to replicate the data in that file. The result of the SPARQL query will be compared to the CSV file, and any differences between the two will be highlighted.

Examples edit

You can see this in action on pages like:

FAQ edit

Why aren't the columns I added appearing in the comparison? edit

This is most likely because you've added custom templates (linked to at the bottom of the prompt page). You'll need to go and manually add the columns to the custom templates. If you want to get back the default templates then you can remove the content of a template and then refresh the prompt or purge the cache, the prompter tool will re-generate the default templates including the newly added columns.

For more information see this GitHub issue.

How do I watch a prompt? edit

When a prompt is refreshed the main prompt page isn't updated, instead you'll need to watch the /comparison subpage of the prompt, which is the page that actually gets updated.

How can I leave a template blank without having the default appear? edit

Add the following to the template you want to leave intentionally blank:

<includeonly>__NOINDEX__</includeonly>

This is useful if you want to "hide" the added and removed rows and just show the modified ones, for example.

Ask a question edit

If you have a question then please ask it on the Template_talk:Compare_Wikidata_with_CSV page.

Further information edit

This tool is being developed as part of the Wikimedia / mySociety / EveryPolitician grant.

The source code for the prompter tool can be found in these two repositories: