Python for Social Science Syllabus

Course Outline

Linguistics 572

The table below gives an approximate schedule of classes, assignments, and lectures for this course.






Wed Aug 28 Book Draft: Table of Contents, 1. Preface, 2.1-2.2.1 Why Python? Installing Python Installing Python (Anaconda) 2.2.2 Starting up Python, 2.2.3 First Python session Running python assignment(Due Thurs. Sep 5) Introductory remarks Jupyter notebook Demo (notebook). Automate the Boring Stuff: Part 1: Chapters 1-5.
Wed Sep 04 Book Draft: 3.1-3.3 Running python assignment due, running_python assignment solution and discussion.    
Wed Sep 11 Book Draft: Python types, More Python types   Notebook demo (notebook), Today's notebook (zipfile) Automate the Boring Stuff: Part One: Chapters 4, 5, 6
Wed Sep 18 Book Draft: If-then statements, Boolean results, loops, List comprehension, Python types assignment due. Loops. Automate the Boring Stuff: Chapters 2 and 3.
Wed Sep 25 Book Draft: 4.6 Functions. Quiz on Python types. Python types discussion notebook. Python types solution notebook. Logic of Functions, Functions. Automate the Boring Stuff: Chapter 3
Wed Oct 02 Book Draft: Numpy: 6.1 - 6.4 Functions assignment due. Intro to numpy: arrays, tables, splicing, arithmetic with arrays, arrays versus lists. More numpy (HOML) arrays, Indexing with Boolean arrays, Boolean indexing, fancy indexing, creating subarrays. Automate the Boring Stuff: Chapter 2, 8
Wed Oct 09 Book Draft: 4.7. Functions 5.1: importing, 5.2 Namespaces, 5.3 block structure, 5.4 Functions and function parameters, import, namespaces, classes. Quiz on loops and functions and more Python types. Functions assignment answers. imports and namespaces, classes, Intro Python classes. Summary notebook programming topics.  
Wed Oct 16 Book Draft: Intro to pandas and pandas data frames 6.4 - 6.8., Pandas tutorial.
Numpy assignment due, Midterm Study notebook, Midterm Study answers. Lecture: Mid Semester Review. Tools: Pandas Intro (HOML). Pandas notebook I, Pandas notebook II (Note that pandas notbook II presupposes that pandas notebook I has already been downloaded.)  
Wed Oct 23   Midterm. (Midterm more study problems, Midterm more study problems.) Pivot tables and merges in Pandas, Census data example.  
Wed Oct 30 Book Draft: Introducing Regular Expressions, Reading in and tokenizing text data. Final project suggestions, Numpy quiz (3rd quiz!), Numpy assignment solution, Pandas assignment due . Regular expressions notebook. Automate the Boring Stuff: Chapters 7
Wed Nov 06 Book Draft: Chap. 7: Classification of text. Regression, Chap. 7: Linear classifiers, SVM classification, Applying linear classifiers to text: Movie review example. Pandas quiz. Pandas quiz. Pandas assignment solution. Classifying insults. Support Vector Machines, Classifying movie reviews with Naive Bayes, Regression, Regression and classification. NLTK Book ch. 3
Wed Nov 13 Book Draft: Chap. 9: Social networks intro, Gephi demo. Project suggestions revisited. Social Networks lectures slides, and Using networkx notebook, Networkx graphs with mousable nodes (using javascript), community detection, Community detection with a weighted graph.  
Wed Nov 20 Book Draft: Chap. 7: Regression. Regression,   Matplotlib Intro, 03_Classification (HOML). Regression, Regression and classification. NLTK Book ch. 3
Wed Nov 27 H'day H'day H'day H'day
Wed Dec 04 Book Draft: Chap. 8: Visualization. Either Regular expressions assignment or Anna Karenina Assignment or Classifying insults, or Regression and classification, or Census data example (Section 1.9 has an assignment). Color and color maps I: Parallel coordinates plots. Color and color maps II: Correlation heat maps.. Visualizing higher dimensional data with color, Boxplot notebook, Geographic visualization. Kernel density estimates. Projections.  
Wed Dec 11   Assignment solutions: Regular expressions, Anna Karenina, Regression and Classification, Census data. Dimensionality reduction with LSI slides, Dimensionality reduction with LSI notes, Python code for LSI example,
Last class day