Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
About
People
Publications
Teaching
Resources
Research Blog
Wiki Functions
Recent changes
Help
Licensing
Page
Discussion
Edit
View history
Editing
Community Data Science Workshops (Spring 2015)/Day 3 lecture
From CommunityData
Jump to:
navigation
,
search
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.
Anti-spam check. Do
not
fill this in!
== Material for the lecture == For the lecture, you will need two files. Download both of these to your computer by using right or control click on the link and then using ''Save as'' or ''Save link as''. Keep track of where you put the files. * http://mako.cc/teaching/2014/cdsw-autumn/build_hpwp_dataset.py * http://nada.com.washington.edu/~mako/hp_wiki.csv == Overview of the day == * Lecture ** Our philosophy around data visualization ** Introduce some new programming tools! ** We're going to walk through some analysis of edits to Harry Potter in Wikipedia, start to finish ** We'll focus on manipulating data in Python ** Visualizing things in Google Docs * Lunch (vegetarian Greek!) * Project based work ** Project and challenge based continuition of the work in here focusing on Google Docs ** [[Community Data Science Workshops/Saturday May 31st Matplotlib Session|Matplotlib]]! ** Room for you to to work on your projects! * Wrap-up! == Lecture outline == * My philosophy about data analysis: ''use the tools you have'' * Four things in Python I have to teach you: ** while loops *** infinite loops *** loops with a greater than or less than ** break / continue ** string.join() ** defining your own functions with <code>def foo(argument):</code> * Walk-through of <code>get_hpwp_dataset.py</code> * Look at dataset with <code>more</code> and/or in spreadsheet * Load data into Python ** review of opening files *** we can also open them for reading ** csv module and and csv.reader() function ** csv.DictReader() * Basic counting ** Answer question: ''What proportion of edits to Wikipedia Harry Potter articles are minor?'' *** Count the number of minor edits and calculate proportion * Looking at time series data ** "Bin" data by day to generate the trend line * Exporting and visualizing data ** Export dataset on edits over time ** Export dataset on articles over users ** Load data into Google Docs We mostly worked on these questions in the afternoon: * More advanced counting ** Answer question: ''What are the most edited articles on Harry Potter?'' *** Count the number of edits per articles ** Answer question: ''Who are the most active editors on articles in Harry Potter?'' *** Count the number of edits per user [[Category:Spring_2015_series]]
Summary:
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)
Tools
What links here
Related changes
Special pages
Page information