Editing Intro to Programming and Data Science (Spring 2020)
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: | ||
= Course Information = | = Course Information = | ||
:'''COM | :'''COM 574: Introduction to Programming and Data Science''' | ||
:'''Location:''' BRNG 2273 | :'''Location:''' BRNG 2273 | ||
:'''Class Hours:''' | :'''Class Hours:''' Tuesdays; 5:30-8:20pm | ||
== Instructor == | == Instructor == | ||
:'''Instructor:''' [https://jeremydfoote.com Jeremy Foote] | :'''Instructor:''' [https://jeremydfoote.com Jeremy Foote] | ||
:'''Email:''' jdfoote@purdue.edu | :'''Email:''' jdfoote@purdue.edu | ||
:'''Office Hours:''' | :'''Office Hours:''' Thursdays; 12:30-2:30pm; BRNG 2156 | ||
Line 39: | Line 39: | ||
== Readings == | == Readings == | ||
* Required text: '''[https://www.py4e.com/book Python for | * Required text: '''[https://www.py4e.com/book Python for Everyone]''' by Charles R. Severance. The book is [https://creativecommons.org/licenses/by/3.0/us/ freely licensed] and available online for free. You can also buy the book if you prefer a hard copy. | ||
I will list required chapters in the weekly notes below. In general, you should expect to spend far more time working on programming tasks than reading. 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. | I will list required chapters in the weekly notes below. In general, you should expect to spend far more time working on programming tasks than reading. 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. | ||
* Other readings: Throughout the year we will read and discuss examples of computational social science that I find particularly well done or interesting | * Other readings: Throughout the year we will read and discuss examples of computational social science that I find particularly well done or interesting. I will put these documents on Blackboard. If you come across additional examples that you think the class would benefit from, please suggest them to me. | ||
* Optional readings: Matthew Salganik's book 'Bit by Bit: Social Research in the Digital Age' is a wonderful introduction to computational social science. We will not be discussing it in class but I highly recommend it. | * Optional readings: Matthew Salganik's book 'Bit by Bit: Social Research in the Digital Age' is a wonderful introduction to computational social science. We will not be discussing it in class but I highly recommend it. | ||
= Course logistics = | = Course logistics = | ||
Line 81: | Line 83: | ||
''I strongly urge you'' to produce a project that will further your academic career outside of the class. There are many ways that this can happen. Some obvious options are to prepare a project that you can submit for publication, that you can use as pilot analysis that you can report in a grant or thesis proposal, and/or that fulfills a degree requirement. | ''I strongly urge you'' to produce a project that will further your academic career outside of the class. There are many ways that this can happen. Some obvious options are to prepare a project that you can submit for publication, that you can use as pilot analysis that you can report in a grant or thesis proposal, and/or that fulfills a degree requirement. | ||
There are several intermediate milestones and deadlines to help you accomplish a successful research project. Unless otherwise noted, all deliverables should be submitted via | There are several intermediate milestones and deadlines to help you accomplish a successful research project. Unless otherwise noted, all deliverables should be submitted via Blackboard. | ||
=== Project plan and dataset identification === | === Project plan and dataset identification === | ||
Line 142: | Line 144: | ||
== Weekly Coding Challenges == | == Weekly Coding Challenges == | ||
Most weeks I will give you all a set of weekly coding challenges before the end of class that will involve writing code or adding to code that I've given you. These coding challenges will be turned in on | Most weeks I will give you all a set of weekly coding challenges before the end of class that will involve writing code or adding to code that I've given you. These coding challenges will be turned in on Blackboard but will not be graded. I encourage you to work together on these challenges but to make sure that you understand the concepts yourself. | ||
I will share my solutions to each of the coding challenges in the subsequent class or via email. As you will see over the course of the semester, there are many possible solutions to many programming problems and my own approaches will often be different than yours. That's completely fine! Coding is a creative act! | I will share my solutions to each of the coding challenges in the subsequent class or via email. As you will see over the course of the semester, there are many possible solutions to many programming problems and my own approaches will often be different than yours. That's completely fine! Coding is a creative act! | ||
You are welcome to discuss the exercises on our | You are welcome to discuss the exercises on our Blackboard discussion board but please do not share answers to challenges more than 24 hours before they are due. After that, you are welcome and encouraged to share your solutions and/or to discuss different approaches. We will discuss a few of the exercises during class and I will randomly choose a few students to explain their solutions. | ||
== Reflection papers == | == Reflection papers == | ||
Line 223: | Line 225: | ||
'''Assignment Due:''' | '''Assignment Due:''' | ||
* Finish Day 1 exercises and tutorials | * Finish Day 1 exercises and tutorials | ||
'''Readings (before class):''' | '''Readings (before class):''' | ||
Line 230: | Line 231: | ||
'''Class Schedule:''' | '''Class Schedule:''' | ||
* [[Intro to Programming and Data Science (Spring 2020)/Day_2_Lecture|Lecture notes]] | |||
* Project time — We'll begin working on the [[wordplay]] projects independently or in small groups. | |||
Here are your [[Intro to Programming and Data Science (Spring 2020)/Day_2_Coding_Challenges|Exercises]] | |||
'''By the end of class you will:''' | |||
* Have written a program with loops and lists. | |||
* Have a better understanding of the expectations for your final project, and be ready to hand in your initial assignment. | |||
== Week 3: Conditionals and Functions (January 28) == | == Week 3: Conditionals and Functions (January 28) == | ||
'''Assignment Due:''' | '''Assignment Due:''' | ||
* Final project idea (turn in on | * Final project idea (turn in on Blackboard). | ||
* Finish | * Finish Wordplay examples | ||
'''Readings:''' | '''Readings:''' | ||
Line 245: | Line 253: | ||
'''Agenda:''' | '''Agenda:''' | ||
* Go over last week's assignment. | |||
* Go over last week's assignment | * Dictionaries and aggregations [[Intro to Programming and Data Science (Spring 2020)/Day 3 Notes|Day 3 Notes]] | ||
* | * Discuss average, median using the wordplay data. | ||
* 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. | |||
'''Coding Challenge''' | '''Coding Challenge''' | ||
Line 255: | Line 264: | ||
'''Assignment Due:''' | '''Assignment Due:''' | ||
* First | * First self-assessment reflection is due. | ||
* Finish Baby Names examples. | |||
'''Readings:''' | '''Readings:''' | ||
Line 265: | Line 275: | ||
'''Agenda:''' | '''Agenda:''' | ||
* Basic visualizations in python | |||
* Project time - We'll reuse the babynames code. | |||
* [[Intro to Programming and Data Science (Spring 2020)/Day 4 Coding Challenges|Day 4 Coding Challenges]] | * [[Intro to Programming and Data Science (Spring 2020)/Day 4 Coding Challenges|Day 4 Coding Challenges]] | ||
Line 271: | Line 284: | ||
'''Assignment Due:''' | '''Assignment Due:''' | ||
* | |||
* Turn in (on Blackboard) your solutions to the Day 4 coding challengss | |||
'''Readings:''' | '''Readings:''' | ||
book = open('Python for Everybody', 'r') | book = open('Python for Everybody', 'r') | ||
for chapter in book: | for chapter in book: | ||
Line 283: | Line 296: | ||
'''Agenda:''' | '''Agenda:''' | ||
* Go over last week's assignment. | |||
* Go over last week's assignment and review histograms. | |||
* Discuss APIs and downloading data from the internet. Refer to [[Intro to Programming and Data Science (Spring 2020)/Day 5 Notes|Day 5 Notes]] | |||
* Spend time on [[Intro to Programming and Data Science (Spring 2020)/Day 5 Coding Challenges|Day 5 Coding Challenges]] | * Spend time on [[Intro to Programming and Data Science (Spring 2020)/Day 5 Coding Challenges|Day 5 Coding Challenges]] | ||
== Week 6: | == Week 6: Dictionaries and networks (February 18) == | ||
'''Assignment Due:''' | '''Assignment Due:''' | ||
* Turn in (on | |||
* Turn in (on Blackboard) your solutions to the Day 4 coding challenges | |||
'''Readings:''' | '''Readings:''' | ||
* Python for Everybody, chapters 9 and 10 | * Python for Everybody, chapters 9 and 10 | ||
'''Agenda:''' | |||
* Discuss data downloading and cleaning. Refer to [[Intro to Programming and Data Science (Spring 2020)/Day 7 Notes|Day 7 Notes]] | |||
* | * We will be discussing this data set: https://hub.mph.in.gov/dataset/aries-crash-data-2007-2017/resource/cc90589c-72d8-4d92-a5fe-73254b555c73 | ||
* | * Spend time on [[Intro to Programming and Data Science (Spring 2020)/Day 7 Coding Challenges|Day 7 Coding Challenges]] which are group challenges. | ||
* | |||
== Week 7: | == Week 7: Pandas and dataframes (February 25) == | ||
'''Assignment Due:''' | '''Assignment Due:''' | ||
Final Project Proposal. | |||
'''Readings:''' | '''Readings:''' | ||
'''Agenda:''' | '''Agenda:''' | ||
* Discuss pivot tables in Excel | |||
* | * [[Intro to Programming and Data Science (Spring 2020)/Day 8 notes|Day 8 notes]] | ||
== Week 8: | == Week 8: Jupyter and Data Visualization (March 3) == | ||
'''Assignment Due:''' | '''Assignment Due:''' | ||
* Second | * Second self-assessment reflection is due. | ||
'''Readings:''' | '''Readings:''' | ||
* Kieran Healy and James Moody (2014). | * Kieran Healy and James Moody (2014). “Data Visualization in Sociology.” American Review of Sociology. 40: 105-28. | ||
'''Agenda:''' | '''Agenda:''' | ||
''' | * Follow up from last week: let's discuss inference and A/B testing. | ||
** [https://www.exp-platform.com/Documents/2016-11BestRefutedCausalClaimsFromObservationalStudies.pdf Examples of bad observational studies] | |||
* Visualization dos and don'ts. We'll discuss the European Environmental Agency's [https://www.eea.europa.eu/data-and-maps/daviz/learn-more/chart-dos-and-donts list of advice for making charts]. **I will refer to this guide as a grade your final projects.** | |||
* Two options for remainder of class. You can work through this introductory guide to visualization in python or you can work on your final project. I'll be here to answer any questions. | |||
'''Optional visualization in python tutorial''' | |||
Self-guided visualization tutorial in python. [https://raw.githubusercontent.com/guyrt/teaching/master/2019/Com520B/VisualizationNotebook.ipynb Download here]. Save the file in a new directory in your desktop and open it with jupyter notebook | |||
If you are on Windows, you may run into an issue with missing path variables. [https://stackoverflow.com/questions/52821162/jupyter-notebook-failed-to-load-dll This SO post helped me solve it.] | |||
== Week 9: Collecting data with APIs (March 10) == | == Week 9: Collecting data with APIs (March 10) == | ||
'''Assignment Due:''' | '''Assignment Due:''' | ||
'''Readings:''' | '''Readings:''' | ||
== March 17: SPRING BREAK == | == March 17: SPRING BREAK == | ||
Line 379: | Line 369: | ||
== Week 10: Cleaning data and operationalization (March | == Week 10: Cleaning data and operationalization (March 24) == | ||
'''Assignment Due:''' | '''Assignment Due:''' | ||
'''Readings:''' | '''Readings:''' | ||
* Robert K. Merton. 1948. | * Robert K. Merton. 1948. “The Bearing of Empirical Research Upon the Development of Social Theory.” American Sociological Review 13(5): 505-515. | ||
* | * Sara Klingenstein, Tim Hitchcock, and Simon DeDeo. 2014. The civilizing process in London’s Old Baily. Proceedings of the National Academy of Sciences 111(26): 9419-9424. | ||
'''Agenda:''' | '''Agenda:''' | ||
== Week 11: Storing code and data (March 31) == | |||
'''Assignment Due:''' | '''Assignment Due:''' | ||
'''Readings:''' | '''Readings:''' | ||
'''Agenda:''' | '''Agenda:''' | ||
* | * We will learn about using the version control system Git and the Git hosting site Github | ||
== Week 12: | == Week 12: Screen scraping (April 7) == | ||
'''Assignment Due:''' | '''Assignment Due:''' | ||
* Third self-assessment reflection is due. | * Third self-assessment reflection is due. | ||
'''Readings:''' | '''Readings:''' | ||
'''Agenda:''' | '''Agenda:''' | ||
== Week 13: Statistical summaries and tests (April | == Week 13: Statistical summaries and tests (April 14) == | ||
'''Assignment Due:''' | '''Assignment Due:''' | ||
'''Readings:''' | '''Readings:''' | ||
'''Agenda:''' | '''Agenda:''' | ||
== Week 14: | |||
== Week 14: Introduction to computational text analysis (April 21) == | |||
'''Assignment Due:''' | '''Assignment Due:''' | ||
'''Readings:''' | '''Readings:''' | ||
'''Agenda:''' | '''Agenda:''' | ||
== Week 15: Project presentations ( | |||
== Week 15: Project presentations (April 28) == | |||
'''Assignment Due:''' | '''Assignment Due:''' | ||
* Final project presentations | * Final project presentations | ||
'''Readings:''' | '''Readings:''' | ||
'''Agenda:''' | '''Agenda:''' | ||
* We will listen | * We will listen to each of the final project presentations. | ||
== Week 16: Finals week ( | == Week 16: Finals week (April 28) == | ||
'''Assignment Due:''' | '''Assignment Due:''' | ||
* Final paper due | * Final paper due | ||
= Administrative Notes = | = Administrative Notes = |