Anonymous user
Community Data Science Workshops (Fall 2014)/Day 3 lecture: Difference between revisions
Community Data Science Workshops (Fall 2014)/Day 3 lecture (view source)
Revision as of 22:00, 15 March 2015
, 9 years agono edit summary
imported>Guyrt (copied over May 31 lecture with minimal changes.) |
imported>Mako No edit summary |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1:
{{CDSW Moved}}
== 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
Line 9 ⟶ 11:
* 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 (
* Project based work
** Project and challenge based continuition of the work in here focusing on Google Docs
Line 23 ⟶ 25:
== 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
** break▼
*** loops with a greater than or less than
▲** break / continue
** string.join()
** defining your own functions with <code>def foo(argument):</code>
▲* My philosophy about data analysis: ''use the tools you have''
* 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()
Line 38 ⟶ 43:
** 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:
Line 48 ⟶ 57:
** Answer question: ''Who are the most active editors on articles in Harry Potter?''
*** Count the number of edits per user
▲* 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
|