Editing Community Data Science Course (Spring 2017)

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 1: Line 1:
:'''Community Data Science: Programming and Data Science for Social Media'''
:'''Community Data Science: Programming and Data Science for Social Media'''
:'''COM597I''' - Department of Communication
:'''COM597G''' - Department of Communication
:'''Instructor:''' [http://guyrt.github.com Richard Thomas (Tommy) Guy]  
:'''Instructor:''' [http://guyrt.github.com Richard Thomas (Tommy) Guy]  
:'''Course Website''': We will use Canvas for assignments and, and [https://canvas.uw.edu/courses/1153277/discussion_topics discussion]. Everything else will be linked on this page.
:'''Course Website''': We will use Canvas for [https://todo Announcements], [https://todo Assignments], and [https://todo discussion]. Everything else will be linked on this page.
:'''Course Catalog Description:'''
:'''Course Catalog Description:'''


Line 16: Line 16:
As part of the class, participants will learn to write software in Python to collect data from web APIs and process that data to produce numbers, hypothesis tests, tables, and graphical visualizations that answer real questions. The class will be built around student-designed independent projects. Every student will pick a question or issue they are interested in pursuing in the first week and will work with the instructor to build from that question toward a completed analysis of data that the student has collected using software they have written.
As part of the class, participants will learn to write software in Python to collect data from web APIs and process that data to produce numbers, hypothesis tests, tables, and graphical visualizations that answer real questions. The class will be built around student-designed independent projects. Every student will pick a question or issue they are interested in pursuing in the first week and will work with the instructor to build from that question toward a completed analysis of data that the student has collected using software they have written.


This is not a computer science class and I am not going to be training you to become professional programmers. This introduction to programming is intentionally quick and dirty and is focused on what you need to get things done. We will focus on effectively answering questions about social media by writing your own software and by managing and communicating more effectively with programmers.
This is not a computer science class and I am not going to be training you to become professional programmers. This introduction to programming is intentionally quick and dirty and is focused on what you need to get things done. If you want to become a professional programmers, this is probably not the right class. If you want to learn about programming so that you can more effectively answer questions about social media by writing your own software and by managing and communicating more effectively with programmers, you are in the right place.
 


I will consider this class a complete success if, at the end, every student can:
I will consider this class a complete success if, at the end, every student can:
Line 40: Line 39:
# '''[http://www.pythonlearn.com/book.php Python for Informatics: Exploring Information]''' by Charles Severance. The book is available online for free but you can also buy a physical copy of the book [http://www.amazon.com/gp/product/1492339245/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1492339245&linkCode=as2&tag=drchu02-20 from Amazon] or get an electronic copy from the [http://www.amazon.com/dp/B00K0O8HFQ Kindle Store]. According to the book's website: "The goal of this book is to provide an Informatics-oriented introduction to programming. The primary difference between a computer science approach and the Informatics approach taken in this book is a greater focus on using Python to solve data analysis problems common in the world of Informatics."
# '''[http://www.pythonlearn.com/book.php Python for Informatics: Exploring Information]''' by Charles Severance. The book is available online for free but you can also buy a physical copy of the book [http://www.amazon.com/gp/product/1492339245/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1492339245&linkCode=as2&tag=drchu02-20 from Amazon] or get an electronic copy from the [http://www.amazon.com/dp/B00K0O8HFQ Kindle Store]. According to the book's website: "The goal of this book is to provide an Informatics-oriented introduction to programming. The primary difference between a computer science approach and the Informatics approach taken in this book is a greater focus on using Python to solve data analysis problems common in the world of Informatics."


I will list required chapters in the weekly notes below. In general, you should expect to spend an hour or less reading per week and 6 or more hours a week on programming tasks.  
For book chapters, I'll make pdfs available at least 1 week ahead of time. In general, you should expect to spend an hour or less reading per week and 6 or more hours a week on programming tasks.  


Much like Math or other technical courses, this course will build on itself every week. You should make every effort to cover the reading and exercise material every week in preparation for the next week.
Much like Math or other technical courses, this course will build on itself every week. You should make every effort to cover the reading and exercise material every week in preparation for the next week.
Line 56: Line 55:
:'''Maximum Length:''' 600 words (~2 pages double spaced)
:'''Maximum Length:''' 600 words (~2 pages double spaced)
:'''Due Date:''' Week 3
:'''Due Date:''' Week 3
:'''Drop box:''' TODO on canvas




In this assignment, you should identify an area of interest, at least 2 sources with relevant data, and at least 3-4 questions that you plan to explore. I am hoping that each of you will pick an area that you are intellectually committed to and invested in (e.g., in your business or personal life). You will be successful if you describe the scope of the problem and explain why you think the data sources you've identified are relevant.  
In this assignment, you should identify an area of interest, at least 2 source domains with relevant data, and at least 3-4 questions that you plan to explore. I am hoping that each of you will pick an area or domain that you are intellectually committed to and invested in (e.g., in your business or personal life). You will be successful if you describe the scope of the problem and explain why you think the data sources you've identified are relevant.


   
   
I will give you feedback on these write-ups and will let you each know if I think you have identified a questions that might be too ambitious, too trivial, too broad, too narrow, etc. In week 2, we will walk through successful projects from previous course offerings to give you an idea of the correct scope.
I will give you feedback on these write-ups and will let you each know if I think you have identified a questions that might be too ambitious, too trivial, too broad, too narrow, etc.


=== Final Project Proposal ===  
=== Final Project Proposal ===  
Line 87: Line 87:
I expect that your reports will include text from the first two assignments and reflect comprehensive documentation of your project. Each project should include: (a) the description of the question you have identified and information necessary to frame your question, (b) a description of the how you collected your data, (c) the results, (d) a description of the scope or limitations of your conclusion.
I expect that your reports will include text from the first two assignments and reflect comprehensive documentation of your project. Each project should include: (a) the description of the question you have identified and information necessary to frame your question, (b) a description of the how you collected your data, (c) the results, (d) a description of the scope or limitations of your conclusion.


A successful project will tell a compelling, defensible story in prose and plots and will contain source code sufficient to reproduce the results.
A successful project will tell a compelling story and will engage with, and improve upon, the course material to teach an audience that includes me, your classmates, and Comm Lead students taking this class in future years how to take advantage of community data science more effectively. The very best papers will give us all a new understanding of some aspect of course material and change the way I teach some portion of this course in the future.


==== Paper and Code ====
==== Paper and Code ====
Line 109: Line 109:
==== Presentation ====
==== Presentation ====


Your presentation should provide me with a very clear idea of what to expect in your final paper. However, don't treat it as a comprehensive overview of your paper: I would rather you tell a subset of the story well than the whole story in a rushed fashion. For instance, you can give a completely successful presentation by describing the motivation and walking through one plot in your paper. I'm going to give you all at least a paragraph of feedback after your talk. This will be an opportunity for me to see a preview of your paper and give you a sense for what I think you can improve. It's to your advantage to both give a compelling talk and to give me a sense for your project.
Your presentation should provide me with a very clear idea of what to expect in your final paper. However, don't treat it as a comprehensive overview of your paper: I would rather you tell a subset of the story well than the whole story in a rushed fashion. I'm going to give you all at least a paragraph of feedback after your talk. This will be an opportunity for me to see a preview of your paper and give you a sense for what I think you can improve. It's to your advantage to both give a compelling talk and to give me a sense for your project.


;Timing: All presentations will need to be '''a maximum of 7 minutes long'' with additional 2-3 minutes for questions and answers. Timing is going to be tight and I'm going to set an alarm and stop presentations that go too long. Concisely communicating an idea in the time allotted is an important skill in its own right.
;Timing: All presentations will need to be '''a maximum of 7 minutes long'' with additional 2-3 minutes for questions and answers. Timing is going to be tight and I'm going to set an alarm and stop presentations that go too long. Concisely communicating an idea in the time allotted is an important skill in its own right.




;Slides: You are encouraged to use slides for your talk but I will need your slides ahead of class. See link at top of this section. Please keep in mind that your slides are meant to be additive, not a teleprompter.
;Slides: You are encouraged to use slides for your talk but I will need your slides ahead of class. See link at top of this section.


=== Participation ===
=== Participation ===
Line 133: Line 133:


== Schedule ==
== Schedule ==
'''This section will be updated weekly'''  This section will be modified throughout the course to introduce the week's material and any hand-ins. Check back in weekly.


=== Week 1: March 30 ===
=== Week 1: March 30 ===
Line 144: Line 142:
'''Class Schedule:'''
'''Class Schedule:'''


* Quick introductions — Be ready to introduce yourself and describe your interest and goals in the class.
* Class overview and expectations — We'll walk through this syllabus.
* Class overview and expectations — We'll walk through this syllabus.
* [[Community_Data_Science_Course_%28Spring_2017%29/Day_1_Exercise|Day 1 Exercise]] — You'll install software including the Python programming language and run through a series of exercises.
* [[Community_Data_Science_Course_%28Spring_2016%29/Day_1_Exercise|Day 1 Exercise]] — You'll install software including the Python programming language and run through a series of exercises.
* [[Community_Data_Science_Course_%28Spring_2017%29/Day_1_Tutorial|Day 1 Tutorial]] — You'll work through a self-guided tutorial introducing you to some basic concepts. When you're done, you'll meet with me and I'll check you off.
* [[Community_Data_Science_Course_%28Spring_2016%29/Day_1_Tutorial|Day 1 Tutorial]] — You'll work through a self-guided tutorial introducing you to some basic concepts. When you're done, you'll meet with a member of the teaching team and we'll check you off.
 
* A few interesting links we discussed in class are [[Community_Data_Science_Course_%28Spring_2017%29/DataSources|here]]
* Hints
** For exercise 5, look at chapter 3 of the textbook. This introduces "if" statements.


'''By the end of class you will:'''
'''By the end of class you will:'''
Line 156: Line 151:
* Have a working python environment on your personal laptop.
* Have a working python environment on your personal laptop.
* Have written your first program in the python language.
* Have written your first program in the python language.
[http://goo.gl/forms/KO9Kyc9nqN Poll]


=== Week 2: April 6 ===
=== Week 2: April 6 ===
Line 161: Line 158:
'''Assignment Due (nothing to turn in):'''  
'''Assignment Due (nothing to turn in):'''  


* Read chapters 2 and 3 of Python for Informatics:
** [http://www.pythonlearn.com/html-009/book003.html Chapter 2, Variables, Expressions, and Statements]
** [http://www.pythonlearn.com/html-009/book004.html Chapter 3, Conditional Execution]
* Finish setup, tutorial and code academy in the [[Community Data Science Course (Spring 2016)/Day 1 Exercise|week 01 exercises]].
* Finish setup, tutorial and code academy in the [[Community Data Science Course (Spring 2016)/Day 1 Exercise|week 01 exercises]].


'''Class Schedule:'''
'''Readings:'''


* Discuss a successful final project from last year.
* Python for Informatics: [http://www.pythonlearn.com/html-009/book003.html Chapter 2  Variables, expressions and statements] and [http://www.pythonlearn.com/html-009/book004.html Chapter 3  Conditional execution]
* [[Community_Data_Science_Course_%28Spring_2017%29/Day_2_Lecture|Lecture notes]]
* Review material from last week: variables, assignments, if statements
* Introduce new material: loops and lists
* Project time — We'll begin working on the [[wordplay]] independent projects independently or in small groups.


Here are your [[Community_Data_Science_Course_(Spring_2017)/Day_2_Coding_Challenges|Exercises]]
'''Class Schedule:'''


* Sample solutions can be found here: [https://github.com/guyrt/teaching/tree/master/2017/Com597I/wordplay github]
* [[Community Data Science Course (Spring 2016)/Day 2 Lecture|Day 2 Lecture]] — Interactive class lecture including a review of material from last week and new material including loops, lists, and modules.
* Project time — We'll begin working on the [[wordplay]] independent projects independently or in small groups with assistance from the teaching team.


'''By the end of class you will:'''
'''Resources:'''


* Have written a program with loops and lists.
* [[Community Data Science Course (Spring 2016)/Day 2 Plan|Day 2 Plan]]
* Have a better understanding of the expectations for your final project, and be ready to hand in your initial assignment.
* [[Community Data Science Course (Spring 2016)/Day 2 Coding Challenges|Day 2 Coding Challenges]]


[https://goo.gl/forms/4hV5bMo4mHabeIEH2 Take my poll! ]
[http://goo.gl/forms/xcwx6mDDZV Feedback Poll]


=== Week 3: April 13 ===
=== Week 3: April 13 ===
Line 189: Line 180:
'''Assignment Due:'''
'''Assignment Due:'''


Final project idea (turn in on canvas)
* [[#Final_Project_Ideas|Final Project Ideas]] [[https://canvas.uw.edu/courses/1039305/assignments/3252050 Turn in on Canvas]]
* Code solving challenges in [[wordplay]] project. This will ''not'' be graded, but I want to get a sense for where everyone is at. [[https://canvas.uw.edu/courses/1039305/assignments/3252042 Turn in on Canvas]]


Finish Wordplay examples
'''Class Schedule:'''
 
Reading
* Read chapter 4, 5 of Python for Informatics:
** [http://www.pythonlearn.com/html-009/book005.html Chapter 4, Functions] (this is mostly new)
** [http://www.pythonlearn.com/html-009/book006.html Chapter 5, Iteration] (this is mostly review)
 
'''Course plan:'''


* Go over last week's assignment.
* Review and Lecture — We'll walk through answers to the assignments for last week as a group.
* Dictionaries and aggregations [[Community Data Science Course (Spring 2016)/Day 3 Notes]]
* Project time — We'll begin working on a series of project based on the [[Baby_names]] project.
* A break! Let's really aim for 7:30 this time.
* Statistics! Let's discuss summary statistics for a data set. The full data is [https://github.com/guyrt/teaching/tree/master/2017/Com597I/summary here] or you can download the course material as a [https://github.com/guyrt/teaching/archive/master.zip zip file].  
* Project time — We'll begin working on a series of project based on the [http://mako.cc/teaching/2015/cdsw-autumn/babynames.zip Baby names] project.
* [[Community Data Science Course (Spring 2017)/Day 3 Coding Challenges|Day 3 Coding Challenges]]


'''Resources:'''
'''Resources:'''


* [[Python_data_types_cheat_sheet]] A cheat sheet with everything we've covered in class so far including today.
* [[Python_data_types_cheat_sheet]] A cheat sheet with everything we've covered in class so far including today.
* [[Community Data Science Course (Spring 2016)/Day 3 Plan|Day 3 Plan]]
* [[Community Data Science Course (Spring 2016)/Day 3 Coding Challenges|Day 3 Coding Challenges]]


=== Week 4: April 20 ===
=== Week 4: April 20 ===
'''Assignment Due:'''


Finish Baby Names examples.


Reading
'''Assignment Due (nothing to turn in):'''
* Read chapter 10 of Python for Informatics
 
** [http://www.pythonlearn.com/html-270/book010.html Chapter 10, Dictionaries] (this is review)
'''Class Schedule:'''
** [http://www.pythonlearn.com/html-270/book008.html Chapter 8, Files] (this is new)
 
* Data Viz: let's walk through an example.
* Review and Lecture — We'll walk through answers to the assignments for last week as a group. Then we'll introduce APIs.
* Project time — We'll begin working on a series of projects based on Wikipedia's API.
 
'''Resources:'''
 
* [[Community Data Science Course (Spring 2016)/Day 4 Plan|Day 4 Plan]]
* [[Community_Data_Science_Course_(Spring_2016)/Day_4_Lecture|Day 4 Lecture]]
* [[Community Data Science Course (Spring 2016)/Day 4 Coding Challenges|Day 4 Coding Challenges]]
* [[Python_data_types_cheat_sheet]] A cheat sheet with everything we've covered in class so far.


'''Course plan:'''
[[Community Data Science Course (Spring 2017)/Day 4 Notes|Day 4 Plan]]


=== Week 5: April 26 ===


'''Assignment Due:'''
=== Week 5: April 27 ===


Turn in the single homework question from last week.


'''Course plan:'''
'''Assignment Due (nothing to turn in):'''  


* Pivot tables!  You will need the SDOT data set from last week.
'''Class Schedule:'''
[[Community Data Science Course (Spring 2017)/Day 5 Notes|Day 5 Plan]]


=== Week 6: May 4 ===
* Review and Lecture — We'll walk through answers to the assignments for last week as a group. Then we'll introduce APIs.
* Project time — We'll begin working on a series of projects based on Wikipedia's API.


'''Course plan: '''
'''Resources:'''
* Go over challenge assignment and odds ratios again.
* downloading data from the internet using APIs 
[[Community Data Science Course (Spring 2017)/Day 6 Notes|Day 6 Plan]]


=== Week 7: May 11 ===
* [[Community Data Science Course (Spring 2016)/Day 5 Plan|Day 5 Plan]]
* [[Community_Data_Science_Course_(Spring_2016)/Day_5_Lecture|Day 5 Lecture]]
* [[Community Data Science Course (Spring 2016)/Day 5 Coding Challenges|Day 5 Coding Challenges]]
* [[Python_data_types_cheat_sheet]] A cheat sheet with everything we've covered in class so far.


'''Assignment Due:'''
=== Week 6: May 4 ===


Final Project Proposal
'''IMPORTANT: Class will be starting at 6:30 not 6:00 for May 4.'''


'''Assignment Due:''' Final project proposal.
[[https://canvas.uw.edu/courses/1039305/assignments/3270775 Turn in on Canvas]]


'''Course plan:'''
''' Class Schedule:'''


* Visualization! [[Community Data Science Course (Spring 2017)/Day 7 Notes|Day 7 Plan]]
* Review and Lecture - We'll review all of the material from last week. No new material this week: I want to make sure you get caught up to date on working APIs in general.
* Cleaning data in Python. [[Community Data Science Course (Spring 2017)/Day 7 Exercise|Day 7 Exercise]]
* Project time - Two options.
** Option 1: Continue working on the Wikipedia questions. I've added a few new questions.
** Option 2: Start working on your final project with the help of a mentor. Use this time to cover questions like data access. If you can already download your data, great! Start thinking about analysis questions and visualizations.  


=== Week 8: May 18 ===
* [[Community Data Science Course (Spring 2016)/Day 6 Plan|Day 6 Plan]]
* [[Community_Data_Science_Course_(Spring_2016)/Day_6_Coding_Challenges|Day 6 Challenge]]
* [[Python_data_types_cheat_sheet]] A cheat sheet with everything we've covered in class so far.


Here is the solution to last week's assignment: https://github.com/guyrt/teaching/blob/master/2017/Com597I/Week7/solution.py
=== Week 7: May 11 ===


'''Course plan:'''
'''Assignment Due:'''


* Introducing the ipython notebook, which is a way to write a document that includes both python and text.
* Finish the [[Twitter authentication setup]] to request keys necessary to begin using the Twitter API.
* Self-guided visualization tutorial in python.  [https://github.com/guyrt/teaching/blob/master/2017/Com597I/visualization/VisualizationNotebook.ipynb Download here] Save the file in a new directory in your desktop and open it with <code>jupyter notebook</code>
* If you have questions about your final project, or you want to spend some time on your python code while help is readily available, you can do that in class.


=== Week 9: May 25 ===
''' Class Schedule:'''


'''Course plan:'''
* Review and Lecture - we'll review the exercise from last week.
** Samples
* One new thing to learn: opening and reading files.
* Lecture - introduce the [https://dev.twitter.com/overview/documentation|Twitter API]
** Sample code is [[Community_Data_Science_Course_(Spring_2016)/Day_6_Lecture|here]]
* Project time - Three options.
** Option 1: If you are working on Twitter, I would encourage you to work on the [[Community_Data_Science_Workshops_(Spring_2016)/Day_2_Projects/Twitter|getting Twitter data]] exercises.
** Option 2: If you are not working on Twitter, I would encourage you to work on the [[Community_Data_Science_Workshops_%28Spring_2016%29/Day_3_Projects/Twitter|Using Twitter Data]] exercises.
** Option 3: Take this time to get help with your projects (and do one of the other options this week).


* Project time!
''' Resources '''
* Twitter: [https://mako.cc/teaching/2015/cdsw-autumn/twitter-api-cdsw.zip]


=== Week 10: June 1 ===
=== Week 8: May 18 ===


''' Final Project Presentation '''
''' Class Schedule:'''


''' Final project paper tentatively due June 8 '''
* Talk about final presentations.
* Review last week's Twitter assignments (30 mins)
* Lecture (without code!) about what makes a good metric.
* Project time. Take this time to get help with and/or work on your projects.


== Administrative Notes ==
== Administrative Notes ==
Line 284: Line 287:
=== Office Hours ===
=== Office Hours ===


Because this is an evening degree program and I understand you have busy schedules that keep us away from campus during the day, I will not hold regular office hours. In general, I am very happy to have a skype or hangouts session where we can share our screens and discuss your questions. Please contact me on email to arrange a meeting.
Because this is an evening degree program and I understand you have busy schedules that keep us away from campus during the day, I will not hold regular office hours. In general, I will be available to meet before class. Please contact me on email to arrange a meeting then or at another time.


=== Disability Accommodations Statement ===
=== Disability Accommodations Statement ===
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)