Editing Community Data Science Workshops (Fall 2014)/Day 2 SQL project

From CommunityData
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 5: Line 5:
== Building a Dataset using MySQL ==
== Building a Dataset using MySQL ==


In this project, we will explore a few ways to gather data from Wikimedia using [https://en.wikipedia.org/wiki/MySQL MySQL] and the [http://quarry.wmflabs.org/ Quarry] web application. Once we've done that, we will download the results of our queries in [https://en.wikipedia.org/wiki/Comma-separated_values CSV format] which can be used to ask and answer questions and visualize data in the final session.
In this project, we will explore a few ways to gather data from Wikimedia and StackExchange projects using [https://en.wikipedia.org/wiki/MySQL MySQL] and the [http://quarry.wmflabs.org/ Quarry] and [http://data.stackexchange.com/ Data Explorer] applications. Once we've done that, we will download the results of our queries in [https://en.wikipedia.org/wiki/Comma-separated_values CSV format] which can be used to ask and answer questions and visualize data in the final session.


=== Goals ===
=== Goals ===


* Learn how to use MySQL (a [https://en.wikipedia.org/wiki/SQL Structured Query Language]) to build datasets.
* Learn how to use MySQL (a [https://en.wikipedia.org/wiki/SQL Structured Query Language]) to build datasets.
* Get set up to run MySQL queries to gather data from Wikimedia projects.
* Get set up to run MySQL queries to gather data from Wikimedia and StackExchange projects.
* Practice running MySQL queries on your own to get data about who is editing particular Wikipedia articles.
* Practice running MySQL queries on your own to get data about who is editing particular Wikipedia articles and answering questions on StackOverflow.
* Create a few collections of Wikipedia data that you can do research with in the final section.
* Create a few collections of Wikipedia data that you can do research with in the final section.


=== Prerequisite ===
=== Prerequisite ===


To participate in the afternoon session, you must have an a Wikimedia account. This is the account is used to run queries with Quarry. It is also an account you can use when you edit Wikipedia and other Wikimedia websites.
To participate in the afternoon session, you must have an a Wikimedia account. If you do not have an account already, you can create one by following these steps.
 
If you do not have a Wikimedia account already, <font size="+1">[https://en.wikipedia.org/wiki/Special:UserLogin >>click here to create an account <<]</font>.
 
If for some reason you are unable to create your account via the link above, try creating it via one of the links below. No matter which link you use, your account will allow you to log in to Quarry as well as any of the 100s of [https://meta.wikimedia.org/wiki/Wikimedia_projects Wikimedia project].
 
;Alternate account creation links
* [https://meta.wikimedia.org/wiki/Special:UserLogin meta.wikimedia.org]
* [https://commons.wikimedia.org/wiki/Special:UserLogin commons.wikimedia.org]
* [https://www.mediawiki.org/wiki/Special:UserLogin mediawiki.org]
* [https://en.wikisource.org/wiki/Special:UserLogin en.wikisource.org]
* [https://en.wiktionary.org/wiki/Special:UserLogin wiktionary.org]
* [https://en.wikivoyage.org/wiki/Special:UserLogin wikivoyage.org]
 
 
 


=== Practice ===
=== Practice ===
If you would like to practice SQL on your own, you can do so in the tutorial section of [http://sqlzoo.net/wiki/Main_Page SQLZoo].
If you would like to practice SQL on your own, you can do so in the tutorial section of [http://sqlzoo.net/wiki/Main_Page SQLZoo].
=== Notes ===
* For this session, you will not need to use Python or type commands on the command line.
==== Queries and other notes ====
* https://etherpad.wikimedia.org/p/CDSW_fall_2014_SQL_session_1
Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see CommunityData:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)