You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

User:SRodlund/PAWS examples lists

From Wikitech-static
Jump to navigation Jump to search

Overview

This is a list of existing PAWS notebooks created by users that can serve as examples for others. The list includes notebooks that employ database connections and API connections and are useful to individuals wishing to complete research and on-wiki tasks.

To create the Wiki replicas list, I looked at all notebooks using the MyPySql libary and sorted through them removing any that employed JOINS (which may become problematic as Wiki replicas go through planned upgrades), any test or practice notebooks, and notebooks which were obvious assignments or labs. I looked for examples that would be useful templates or examples for others to follow in their own work with PAWS and databases.

To create the API notebooks list, I looked at all PAWS notebooks created in 2019 and 2020. I removed any test, practice, and incomplete notebooks, then looked for notebooks that would serve as useful templates or examples for others to understand how to complete onwiki tasks using PAWS. I looked for a variety of notebooks that interact with a number of different projects - Wikipedia, Wikimedia Commons, Wikidata, etc.

The notebooks were also marked with specific topic tags (see key below) to help aid in understanding what they cover and what tasks they are best suited for.

Ultimately, these example notebooks will (hopefully) help inform us to create a set of how-tos for specific On-Wiki tasks to help make it simpler for folks working on Wikis.

Key

Color key

A visual key to help keep track of what examples and tutorials are available

Example Tutorial or How-to API Wikireplicas Datadumps Research & Analysis On-Wiki tasks Pywikibot Wikidata SPARQL

Wiki replicas and datasets

PAWS notebook: Working with Wiki replicas and datasets

Tutorials and How-tos

Tutorial or How-to Research & Analysis Wikireplicas Wikidata SPARQL

Wikidata dumps tutorials

Tutorial or How-to Research & Analysis Wikidata Datadumps These are 3 Wikidata dump tutorials that Issac suggested might be part of a dumps specific notebook tutorial

Wiki replica Helper

Wiki replicas Research & Analysis Tutorial or How-to Example

This will be invaluable for anyone working with Wiki replicas and PAWS

Example notebooks

Note: This only includes notebooks without JOINS in their SQL queries -- which may not work correctly after planned changes to Wiki replicas. For a list of notebooks that inlcude JOINS by USER-ID, see this list: https://wikitech.wikimedia.org/wiki/User:SRodlund/PAWS_examples_lists/notebooks_with_joins

Wiki replicas

Wiki replicas Research & Analysis Wikidata Example

Dumps

Research & Analysis Datadumps Example

SPARQL

Research & Analysis SPARQL Wikidata Example

Wikidata Query

Research & Analysis Wikidata Example

APIs

PAWS notebook: API Connections

Tutorials and How-tos

API Tutorial or How-to

  • Mediawiki page history - The MediaWiki REST API lets you build apps and scripts that interact with any MediaWiki-based wiki. In this tutorial, we'll use the REST API page history endpoints to explore the history of articles on English Wikipedia.
  • Mediawiki Rest API examples- This notebook contains a variety of Mediawiki Rest API examples: search pages, autocomplete page title, get page history, get page history counts, get revision, compare revision, get page, get page offline, get page source, get languages, get files, get files on a page, create page, update page.
  • Wikimedia Feeds intro - Many Wikipedias include daily featured articles and other curated content on their homepages. You can see an example of this content on the main page of English, German, and French Wikipedias. The Wikifeeds API lets you access this content programmatically and add high-quality, multilingual content to your apps.
  • Create an image grid using free images from Wikimedia Commons - This guide uses the MediaWiki REST API to explore media files on Wikimedia Commons. Wikimedia Commons is a collection of over 60,000,000 freely usable media files, many of which are used in Wikipedia articles.
  • Reuse free images from Wikimedia Commons - This guide uses the MediaWiki REST API to explore media files on Wikimedia Commons. Wikimedia Commons is a collection of over 60,000,000 freely usable media files, many of which are used in Wikipedia articles.
  • Exploring page history- The MediaWiki REST API lets you build apps and scripts that interact with any MediaWiki-based wiki. In this tutorial, we'll use the REST API page history endpoints to explore the history of articles on English Wikipedia.
  • Search Wikipedia articles - The MediaWiki REST API lets you build apps and scripts that interact with any MediaWiki-based wiki. In this tutorial, we'll use the REST API search endpoints to search for articles about the Solar System on English Wikipedia.
  • Retrieving free knowledge - This guide uses the MediaWiki REST API to explore articles on English Wikipedia.
  • Wikipedia page stats comparison - This guide uses the MediaWiki REST API to explore articles on English Wikipedia.
  • Get featured content from English Wikipedia - The Wikifeeds API provides convenient access to content featured on the Main Page of English Wikipedia.

Example notebooks

Various notebooks using APIs

API Example On-Wiki tasks

Pywikibot (Uses MediaWiki API)

Pywikibot API Example On-Wiki tasks