Page MenuHomePhabricator

Synchronising Wikidata and Wikipedias using pywikibot - Task 1
Closed, ResolvedPublic

Description

This is the first task for T276329, Synchronising Wikidata and Wikipedias using pywikibot, aimed at getting you familiar with Wikidata and how properties work within structured data.

  1. You should register a Wikimedia account if you don't already have one. You can do so at https://www.wikidata.org/w/index.php?title=Special:CreateAccount
  1. Pick the language Wikipedia that you are most familiar with - any language is OK (see https://www.wikipedia.org/ for a complete list), but Wikipedias with more articles will have more content to work with.
  1. Pick a type of article. This could be books, ships, arthropods, authors, sports, castles, bridges, chemists, museums, rivers, trees - anything you are interested in. Find a few of that type of article (say, 6-12) - as varied as you can.
  1. Have a look at how key facts are stored in the article - particularly in the infobox, but also look at the categories and the text. Start thinking about what you could define as very simple statements about the topic ('this is a human', 'this was published in 2020', 'this is made of stone", etc.)
  1. Have a look at the Wikidata item for each article. You can find that by clicking on the 'Wikidata item' link on the left-hand sidebar of the article (or similar for other languages). Each article has a 'Q' number, which is at the top of the page.
  1. You will see a set of properties with information about the topic. See how well they compare to the statements you were thinking of earlier. Are there obvious matches?
  1. Wikidata stores properties as "P" numbers (for example, 'instance of' is P31). - you can find these by hovering over the property label. Start collecting the ones that are used for your type of article. Properties will be linked against a value (date, number, text string, Q-number, filename, etc.)
  1. Start a page like https://www.wikidata.org/wiki/User:Mike_Peel/Outreachy_1 (change 'Mike_Peel' to your username). Follow the rough format there to document what you're seeing, e.g.:
* {{P|P31}}: [[:en:Lovell Telescope]] is a {{Q|Q184356}} in the infobox

The first part is the property, the second links to the article you were looking at (change 'en' to the relevant language code), and the 'Q' number is the value that it is linking to ('radio telescope' - or if it doesn't have a Q-number, give the string, date, filename etc.). Finally, say where in the article that piece of information is stored.

  1. See how many statements you can find matching properties (aim for around 15-20 different properties), and which ones you can't find (list those anyway and we can come back to them).

Bonus 1: you will see that some properties have qualifier values, also document those and understand how they work.

Bonus 2: Look for additional properties that could be used but currently aren't (see https://www.wikidata.org/wiki/Wikidata:List_of_properties ), and document those.

Bonus 3: Add new properties to the Wikidata items you have been looking at. At the bottom of the page, click on 'Add statements', and you can input a property (by P-number or text), and a value (by Q-number or text). If you can't see the link, or it doesn't work, check the top-right of the page to see if it has a padlock - this means that the item is protected and you will need to make edits to other items instead (you will be able to come back to this item once your account is auto-confirmed, so you can note down the item anyway to come back to it!)

Once you are happy, send me a link to your page (by email, on my talk page, or replying to this ticket as you prefer). Make sure to also register it as a contribution on the Outreachy website (https://www.outreachy.org/outreachy-may-2021-internship-round/communities/wikimedia/synchronising-wikidata-and-wikipedias-using-pywiki/contributions/)! I'll send you a reply to say whether it is accepted or not on the talk page for the contribution.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Nonye18 removed Mike_Peel as the assignee of this task.
Nonye18 subscribed.
This comment was removed by Nonye18.
Aklapper assigned this task to Mike_Peel.

@AnkitaxPriya we have to make our own page, the page provided my @Mike_Peel is just for demo purpose.

Hi Mike
Here is a link to my page

https://en.m.wikipedia.org/wiki/User:NonyeRita

Looking forward to your feedback
Thanks
Nonye

@Mike_Peel for task-1, say I take up books, then do we have to explore 15-20 properties of EACH book that we choose, or in all (say 6 books) it should add up to that?

@Mike_Peel for task-1, say I take up books, then do we have to explore 15-20 properties of ALL the books that we choose, or in all (say 6 books) it should add up to that?

Ideally they should be different properties, but they don't have to be present on all of the items. The idea is to get an idea of how to comprehensively describe the type of item on Wikidata based on the Wikipedia articles. However, it's up to you, duplicates are OK.

@Mike_Peel for task-1, say I take up books, then do we have to explore 15-20 properties of ALL the books that we choose, or in all (say 6 books) it should add up to that?

Ideally they should be different properties, but they don't have to be present on all of the items. The idea is to get an idea of how to comprehensively describe the type of item on Wikidata based on the Wikipedia articles. However, it's up to you, duplicates are OK.

Alright, I guess I got you. Thanks!

This comment was removed by MSGJ.

@Mike_Peel

Here is a link to my page https://www.wikidata.org/wiki/User:Anu_as.shruti/Outreachy_1.
If you have any suggestions I would be glad to work on them.
Thanks!

Edit:
I was using different accounts for wikimedia and wikidata which is creating a issue in the later tasks so here is the new link for my work:
User:ANU_Outreachy/Outreachy_1

I'll be using the ANU Outreachy account from now on.

Thanks!

Hi @Mike_Peel , I was working on an article for the Task 1 and for one property under Statements which is an image I can't find a Q number on hovering. What is the solution for such a case.

Also how is Q number to a Wikidata item given.

Link to the article: https://www.wikidata.org/wiki/Q2368479 , second property , image.

Also please have a look at my page: https://www.wikidata.org/wiki/User:Srishti0gupta nd share your suggestions.

Hi @Mike_Peel , When recording our contributions, there's a part for the date when contribution was merged or accepted, So for this case we are supposed to leave that blank till you give feedback or how do we go about it?

Hi @Srishti0gupta , I think based on the template that @Mike_Peel gave us, Images don't have Q numbers we just use the link to the file found on Wikimedia Commons(contains media files). You can get the file name by clicking on the image its at the top of the page. In your case File:Royal Wedding Stockholm 2010-Slottsbacken-05 edit.jpg

You can see how he included the image in his the template

  • {{P|P18}}: [[:en:South Pole Telescope]] has [[:File:South pole telescope nov2009.jpg]] at the top of the article

Your question on how Q numbers are given to a Wikidata Item is addressed here
https://www.wikidata.org/wiki/Help:FAQ
The numbers in identifiers are assigned in the order the items and properties were created in Wikidata.

Hi @Mike_Peel , When recording our contributions, there's a part for the date when contribution was merged or accepted, So for this case we are supposed to leave that blank till you give feedback or how do we go about it?

@SharonKerubo I think we are supposed to leave it blank for now. I have the same doubt regarding the merge as we have already published the article on wikidata.

Hi @Mike_Peel I am stilll working on task 1 and I have an additional property that isn't defined of Wikipedia. How and where do I list them?

Hi @Mike_Peel I am stilll working on task 1 and I have an additional property that isn't defined of Wikipedia. How and where do I list them?

@Nonye18 I think we can list them at the end. The format 'Added (property name and value) to (Wikipedia Page title)' will work fine I guess. Is it okay @Mike_Peel?

Hi @Mike_Peel I am stilll working on task 1 and I have an additional property that isn't defined of Wikipedia. How and where do I list them?

Yes, list them at the end.

Hi @Mike_Peel , When recording our contributions, there's a part for the date when contribution was merged or accepted, So for this case we are supposed to leave that blank till you give feedback or how do we go about it?

I think you leave that blank until I give you feedback. I'll leave a message on the talk page for the contribution, and/or reply by email.

Hello all and hi @Mike_Peel,
I am Vidhya, here's is my link to task 1

https://www.wikidata.org/wiki/User:Vidhya001/outreachy_1

Please have a look at it and give your feedback.

Looking forward to contributing

Thank you,
vidhya

Hey @Mike_Peel and everyone, this is my Wikidata page for task-1 : https://www.wikidata.org/wiki/User:Poornima7/Outreachy_1 .

Do have a look at it and provide your insights.

Thankyou :)

Great work everyone. If anyone is waiting for feedback on this task, just let me know.

@Mike_Peel I am still working on task 1 and I found that "dates" do not have an additional property on Wikipedia. How am I supposed to list them?

@AnkitaxPriya For now you could simply mention the date without any underlying link and if you wish you could add the reference url given along with the date.
You can later modify your list according to @Mike_Peel 's instructions

@AnkitaxPriya For now you could simply mention the date without any underlying link and if you wish you could add the reference url given along with the date.
You can later modify your list according to @Mike_Peel 's instructions

Much thanks @Anubhuti

I'm trying to 'Add statements' in Wikidata but unable to. Please guide @Mike_Peel

I'm trying to 'Add statements' in Wikidata but unable to. Please guide @Mike_Peel

Hi @AnkitaxPriya
Have you tried following this link?
https://www.wikidata.org/wiki/Help:Statements#Adding_statements

Which page are you trying to edit?

I'm trying to 'Add statements' in Wikidata but unable to. Please guide @Mike_Peel

What is your Wikimedia username AnkitaxPriya? There are a few items which are protected against editing but the vast majority are fully editable.

I'm trying to 'Add statements' in Wikidata but unable to. Please guide @Mike_Peel

Looking at https://www.wikidata.org/wiki/Special:Contributions/AnkitaxPriya - it seems that you have successfully made some edits. You might be trying to edit a protected item, can you give the Q-number or URL for the item you are trying to edit please?

I'm trying to 'Add statements' in Wikidata but unable to. Please guide @Mike_Peel

Looking at https://www.wikidata.org/wiki/Special:Contributions/AnkitaxPriya - it seems that you have successfully made some edits. You might be trying to edit a protected item, can you give the Q-number or URL for the item you are trying to edit please?

I did follow what @MSGJ suggested and it worked for me. Here is my wikidata page https://www.wikidata.org/wiki/User:AnkitaxPriya . Please have a look and suggest some changes if needed. Thank you.

Hi Mike,
I am sharing my Task 1 webpage

Task1_Neha

Do have a look and suggest improvements.

Looking forward to contributing

Neha

I think I'm up to date with replies now, if I've missed replying to you then please tell me!

I think I'm up to date with replies now, if I've missed replying to you then please tell me!

@Mike_Peel will you be reviewing our Task 1 before we proceed to Task 2 (for any improvements to be made from our end) or shall we proceed anyhow?

@Mike_Peel will you be reviewing our Task 1 before we proceed to Task 2 (for any improvements to be made from our end) or shall we proceed anyhow?

Oops, sorry! Feedback left at https://www.wikidata.org/wiki/User_talk:AnkitaxPriya Tasks 1 and 2 are mostly independent, but they become more interlinked later.

@Mike_Peel will you be reviewing our Task 1 before we proceed to Task 2 (for any improvements to be made from our end) or shall we proceed anyhow?

Oops, sorry! Feedback left at https://www.wikidata.org/wiki/User_talk:AnkitaxPriya Tasks 1 and 2 are mostly independent, but they become more interlinked later.

Thank you for the suggestions @Mike_Peel , will work on it. :)

Thank you @Mike_Peel and @MSGJ for the feedback. I really do appreciate your help

Hi! @Mike_Peel
I have completed task 1 kindly review it.
https://www.wikidata.org/wiki/User:Kanyal_manisha/Outreachy_1
Looking forward to contributing more.

@Mike_Peel I have updated my Task 1. Kindly review the same and let me know if any changes are needed. https://www.wikidata.org/wiki/User:AnkitaxPriya/Outreachy_1

Regards,
Ankita

Hi @Mike_Peel
This is a link to my page : https://www.wikidata.org/wiki/User:Pikaa97/Outreachy_1
Looking forward to your feedback.

Thanks in advance!

Hello @Mike_Peel! I just completed Task 1.
Please review it at the link https://www.wikidata.org/wiki/User:Joanastasia.
Hope to receive your feedback soon.
Thank you so much.
Kind regards,
Joan.

Hello @Mike_Peel!
I have tried my best with Task_1, and look forward to your feedback. Kindly review it at your time.
Here is the link:
https://www.wikidata.org/wiki/User:Tru2198/Outreachy_1

Also, while you review my first contribution, is it viable for me to begin with Task_2?

Thank you for your time.

Regards,

Trusha Patel.

Hi @MSGJ,
Thank you for reviewing my task.
I've added a few properties that might be useful based on your feedback. Hope its fine.

Please let me know if I can move on to the next task. Thanks in advance!

I think I've replied to everyone that has done Task 1 now (on talk pages), let me know if I've missed anyone! You can move on to any of the tasks when you want, you don't need to wait for the previous one to be accepted.

hi @Mike_Peel . Can u please review my task1. I am looking forward to improve it.
link : https://www.wikidata.org/wiki/User:Pushp24/Outreachy_1
Also i am having trouble when i wanted to include some property in Bihar Museum's page.

doubt.PNG (294×1 px, 11 KB)

as u can see in the above screenshot i wanted to make these changes on Bihar museum's site but i couldn't. Changes done by me were not getting published. I would be really grateful if you could clarify my doubt.
Thank you
Pushpanjali Kumari

@Pushp24 you are right that P2555 (fee) can be used for this, but the value of that property should be the fee itself (not Bihar Museum) along with a unit (e.g. Indian rupee).

For the qualifier try P6001 followed by child or adult?

@MSGJ fee is different for everyone based on age. how to add more than one value?

Add the first one (with qualifier) then press "Add value" to add another

Hello @MSGJ, @Mike_Peel,

Although yesterday, my task_1 got approved, I have added few extra properties and an article that might deviate a bit.

Will you be able to tell me, is it viable or not?

https://www.wikidata.org/wiki/User:Tru2198/Outreachy_1

Thank you!

Regards,

Trusha.

Hello @Mike_Peel . I have completed my page. Kindly give your feedback and review.
Link is https://www.wikidata.org/wiki/User:DaneshwariK/Outreachy_1

Regarding the adding of properties, I'm still working on them and will complete by tomorrow.

Hello, please for task 1 when we are asked to add statement am i adding the statement directly on the article itself?

Hello, please for task 1 when we are asked to add a statement am I adding the statement directly on the article itself?

yes, if it's allowing you to. Some articles are protected. (See the top right of the wikidata page to see the lock).
Hope that helped!

Hello @Mike_Peel I am done with my user page and I'll be waiting for any form of correction or suggestion
https://www.wikidata.org/wiki/User:Fonyuy237/Outreachy_1

Hi @Mike_Peel, @MSGJ!

I would like to submit my contribution for task 1 -> https://www.wikidata.org/wiki/User:Nina_Siam/Outreachy_1

I look forward to your response and feedback!

Thank you,
Nina

I think I'm up-to-date again with commenting on task 1 (on talk pages), please let me know if I've missed any! And you don't need to wait for approval before moving on to the other tasks.

I'm having some trouble finding the sandbox so that we can get comfortable with pywikibot. Can someone please direct me to where on Phabricator that info is located? Thanks so much.

Greetings Everyone. My name is Tambe Tabitha and I will be contributing with you.

@Mike_Peel this is my first submission https://www.wikidata.org/wiki/User:Tambe_Tabitha/Outreachy_1

I'm having some trouble finding the sandbox so that we can get comfortable with pywikibot. Can someone please direct me to where on Phabricator that info is located? Thanks so much.

On Wikidata it is https://www.wikidata.org/wiki/Q4115189 .

I'm having some trouble finding the sandbox so that we can get comfortable with pywikibot. Can someone please direct me to where on Phabricator that info is located? Thanks so much.

On Wikidata it is https://www.wikidata.org/wiki/Q4115189 .

Thank you !