Skip to content

signebedi/python_intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python_intro

Python Introduction course repository

Course Overview

This course is applied in the sense that it is a computer science class couched within the objectives of a social science class that, as part of a liberal arts education, seeks to teach you how to think and do research. As such, oftentimes the class material, which will focus primarily on the basics and helping everybody achieve a uniform understanding, will need to be augmented using a little bit of external research.

To that end, your success and enjoyment in this class will largely come down to whether you feel passionate enough about what we are learning - or, more importantly, how it can be applied to the things that you love - to want to go a little above and beyond to learn additional concepts. This is largely what the final group project is for: to encourage you to do a little bit of thinking outside the classroom using package repositories, documentation pages, stack overflow, and other resources to help hammer home the extensive breadth of the python programming language and its usefulness to you as a member of the social sciences community.

The final group project is the applied crux of the course. It invites students to do external research, but also leverage some of the ideas we've discussed in class, in the context of a group where you can delineate roles and build consensus around objectives and approaches. As such, I'm going to have students fill out questions in a Markdown project plan, where they can articulate what type of solutions, whether functional or object-oriented, that they plan to leverage, and start thinking through other questions like the data types that they'll work in and the external libraries that they'll leverage to complete their project. In a sense, you're doing a little bit of that research early on by filling the project plan out. I will assign groups in the first week, and then we'll discuss your final project and progress on your project plan during two conferences over the course of the class. While I will not dictate to you the best method to succeed in the final group project, I would encourage you all to meet outside of class sometime within the first week, and to meet as often as possible to fill out your project plan and start breaking down responsibilities.

Course Objectives

Through careful engagement with the course materials, classroom discussion, external resources, problem sets, and group collaboration, I would like each student to develop broad, applied competencies in using python for the social sciences. As such, I have adopted the following objectives for this course:

  1. To understand how to set up a coding environment, leveraging package managers and version control systems.
  2. To understand how python variables work.
  3. To understand how python functions work and when it makes sense to use them.
  4. To understand how python classes work and when it makes sense to use them.
  5. To understand the basics of python data types.
  6. To understand how to use python builtin and community libraries - especially data science libraries like numpy, pandas, and matplotlib.
  7. To understand how different data storage systems like CSV, databases, and JSON work and when it makes sense to use each.
  8. To understand how to understand assumptions and test these to ensure code reliability.

Student Evaluation

This is a pass/fail class. As such, I expect that the vast majority of students will have no problem earning a passing grade. To do so, students must attend every lecture, complete all required problem sets, and submit a final group project. If you are unable to attend a class for any reason, you must email me beforehand and review the class recording. In these cases, I will generally expect you to complete and submit one of the non-required problem sets for the modules that we discussed in class that day to help ensure that you have taken the time to cover the materials discussed in class.

Problem Sets

Problem sets are meant to be challenging but also provide a significant body of external resources to help you grasp the python programming language during this course and after you've completed it.

Course Curriculum

All resources and problem sets are optional unless marked as (required). Before the first week in class, please fill out the survey at *** placeholder to facilitate the creation of study groups constituting a mix of student backgrounds, experiences, and areas of study. Lecture Notes will generally come in two formats: markdown slides and Jupyter Notebooks. You can read the markdown slides directly in GitHub, where each horizontal rule separates two slides (see here for a quick markdown reference). Likewise, you can review Jupyter Notebooks from within GitHub (but, if you're having difficulty viewing them, you can paste the link to the page here and it should render properly) as well as in VSCode (when you are running the Jupyter Extension. We will spend the first class discussing how to make effective use of Lecture Notes and the Curriculum below.

In addition to Lecture Notes, I will generally post digital Problem Sets and Resources - again, all of these are optional unless marked as (required). Problem Sets will, in all cases, be written as Jupyter Notebooks. You should be able to read these in the browser, using Jupyter through your Anaconda Python installation, and/or in VSCode using the Jupyter plugin. These are written in such a way that you should be able to fill in your answers at the bottom of the Jupyter Notebook. Resources are a collection of reference material that may be useful to you when internalizing some of the concepts we are discussion in class.

One of the great things about programming is that there are a variety of ways to solve the same problem. Notwithstanding some solutions are more 'efficient' or 'paradigmatic' than others, the difference very often comes down to readability, simplicity, and intuitiveness. Often, my model solutions to our problem sets will fall short of the very best (read: efficient, paradigmatic) way to write the solution - because my goal in this class is to provide solutions that will be the most intellectually accessible, syntactically clear, and generally applicable for participants that may not have a computer science background. As such, I am not asking you to provide 'perfect' solutions, and indeed will often provide imperfect solutions myself, instead placing a premium on 'working code' that 'gets the job done'.

Python has an extensive community of developers and users. As a result, there is a substantial discourse over paradigms, conventions, and syntactical change. These are published in the Python Enhancement Proposals (PEPs), which can be found online and are a good resource on the language, along with Stack Overview, Real Python, and W3Schools.

*** The best way to approach this course is to create a github account and clone this repository. When you work on the final group project, you should write your code either in a separate repository or in one group member's clone of this repository.

Unit 1 - Environment Setup

Module 1.1 - VSCode and IDEs

  • Lecture Notes: placeholder
  • Problem Set 1.1.1 - install VSCode or VSCodium (required)
  • Problem Set 1.1.2 - Python “Hello World!”
  • Problem Set 1.1.3 - using replit as an IDE
  • Resources:
    • placeholder

Module 1.2 - Pip and Anaconda

  • Lecture Notes: placeholder
  • Problem Set 1.2.1 - install Anaconda (required)
  • Resources:
    • placeholder

Module 1.3 - Github

Module 1.4 - Virtual Environments

  • Lecture Notes: placeholder
  • Problem Set 1.4.1 - Create a virtual environment (required)
  • Resources:
    • placeholder

Unit 2 - Python Syntax, Paradigms, and Libraries

Out of Class Group Conferences #1

Module 2.1 - Variables and Paradigms

  • Lecture Notes: placeholder
  • Problem Set 2.1.1 - “labeling” and “referencing” objects
  • Problem Set 2.1.2 - Using the requests library
  • Problem Set 2.1.3 - Using the os library
  • Resources:

Module 2.2 - Functions and Functional Programming

Module 2.3 - Data Types and Data Structures

Module 2.4 - Flow Control

  • Lecture Notes: placeholder
  • Problem Set 2.4.1 - For- and While- Loops
  • Problem Set 2.4.2 - If Statements and Operators
  • Resources:

Module 2.5 - Classes and Object Oriented Programming

Unit 3 - Data Science Libraries

Module 3.1 - Basics of Python Libraries

  • Lecture Notes: placeholder
  • Problem Set 3.1.1 - placeholder
  • Resources:
    • placeholder

Module 3.2 - Numpy and Pandas

  • Lecture Notes: placeholder
  • Problem Set 3.2.1 - placeholder
  • Resources:
    • placeholder

Module 3.3 - Matplotlib and Plotly

  • Lecture Notes: placeholder
  • Problem Set 3.3.1 - placeholder
  • Resources:
    • placeholder

Module 3.4 - Data Sources

  • Lecture Notes: placeholder
  • Problem Set 3.4.1 - Relational Data: SQL and CSV
  • Problem Set 3.4.2 - Document Data: NoSQL and JSON
  • Problem Set 3.4.3 - Graph Data: Neo4j and Surreal
  • Resources:
    • placeholder

Unit 4 - Final Project

Module 4.1 - Testing Assumptions

Out of Class Group Conferences #2

Module 4.2 - Outside Guest Speaker/s

  • Guest Speaker: placeholder

Module 4.3 - Course Review

  • Lecture Notes: placeholder

Acknowledgements

I worked closely with Dr. Sam Hulse in the development of this curriculum and owe him many thanks for his suggestions on teaching methods, topics, and the development of problem sets.

About

Python Introduction course repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published