Wikidata:EveryPolitician/Documentation/Tools/Harvest Templates/Pakistan
Jump to navigation
Jump to search
Case study: Importing dates of birth for Pakistani Members of the National Assembly 2013-18 from English Wikipedia to Wikidata using Harvest Templates[edit]
This document shows work done together with Saqib to set dates of birth on Pakistani Members of the National Assembly 2013-18 who did not have dates of birth set in Wikidata.
Background[edit]
Harvest Templates helps us to import information into Wikidata from structured information in templates from Wikipedia.
Preparatory work[edit]
- Make sure that the data to be harvested is structured in a template in Wikipedia.
- Ensure that all of the pages where the property is to be set are in a suitable category in Wikipedia.
Using Harvest Templates[edit]
Note: Any settings not mentioned are left as their default setting.
- Go to: https://tools.wmflabs.org/pltools/harvesttemplates/
- Set Property number to date of birth (P569). This represents the Wikidata property to be set.
- Set Template this is the Wikipedia template from which to import the data. In this case, it’s Birth date and age.
- Set the Parameter In this case the Birth date and age template specifies the order in which years, months and days are recorded - first year, then month, then day e.g. 1958|4|26. Leave the box next to Parameter blank and in the three boxes below specify:
- Year - enter “1”
- Month - enter “2”
- Day - enter “3”
- Set the Filter. This tells the system only to look for Wikipedia pages in a particular category. In this case, use Pakistani_MNAs_2013–18.
- Deselect “don't load items with the property set” (we get an error when we leave this selected).
- Hit Get Pages (you may need to wait a while).
- Demo the proposed changes. If it is working correctly in this case, you should see a series of green bars with the phrase ‘added value’ followed by the value which has been added.
- If that looks right, hit add value.
- Check that that did what you were expecting :)
This can be re-run when there are new items in the category or against other categories if the there are multiple categories for which the change is required.