Course schedule 2018

Updated April 1, 2018 ]

This is the week-by-week outline for spring 2018. Weekly topics are subject to change. Please check this page once a week for the latest updates. All assigned work is listed here and linked when linking is relevant.

This schedule is subject to change throughout the semester, but assignments and deadlines will mostly stay as they are.

DEADLINES for all quizzes and assignments are in Canvas.

Week 1 – Jan. 9

Introduction to the course. Tools, technologies and outcomes.

Week 2 – Jan. 16

  • Before class: Watch and complete all exercises: SQL basics (9 parts)
  • Download XAMPP before class — follow these instructions to install it and start it (these are the NEW instructions, January 2018)

Introduction to SQL and databases.
Introduction to XAMPP, an Apache Web server that runs on your computer (Mac/Windows).
In-class exercise: A shoutbox using MySQL, JavaScript and PHP (XAMPP required).

  • Quiz 1
  • Complete the shoutbox in-class exercise at home (before next week’s class)

Week 3 – Jan. 23

Optional SQL resources:

  • SQL Tutorial and/or SQL Teaching
  • Note: Don’t use the object-oriented commands, such as $stmt->execute();
    We will use the procedural commands, such as mysqli_stmt_execute($stmt);
  • Explanation of the difference between the SQL object-oriented commands and SQL procedural commands (when you see -> that is NOT the way we are doing it); I added this in case you Google SQL commands and get confused
  • Prepared statements and stored procedures (from the PHP documentation)

In class:

SQL and databases, part 2. Security concerns and SQL.
How to create and use prepared statements in PHP.
jQuery Ajax + HTML forms + PHP.
Review of the shoutbox you have completed. Start Assignment 1.
Preview of Assignment 2.

  • Quiz 2
  • Assignment 1: Complete the shoutbox: Make it live on your own website

Week 4 – Jan. 30

  • Watch and complete exercises: Modifying databases with SQL (7 parts)
    NOTE: This is the fourth section of the Khan Academy course. We are skipping the third section (Relational queries in SQL). Feel free to complete the third section on your own, but I will be discussing the fourth section in class and not the third section.
  • Prepare for Assignment 2: Choose your data, sketch form, list fieldnames

Optional SQL resource:

  • PHP with MySQL Essential Training ( — login here. Like many courses, this is very long (14+ hours) and thorough. You can skip around among these videos to supplement or reinforce what we’ve covered in class. Section 14, “Using PHP to Access MySQL,” is especially good. You can also download the complete exercise files for the course. The only drawback: The instructor is using old XHTML tags that end with />do not copy his outdated HTML tags! (His DOCTYPE is also outdated.) On the plus side, he is using PHP’s newer mysqli_ functions and procedural style (not object-oriented style) — so his PHP matches what we have used in class.

In class:

Using phpMyAdmin to export, import, delete tables, and to test SQL queries.
Using UPDATE and DELETE to modify rows in your database.
Database passwords. Database transactions.
Your MySQL database project explained. Work on Assignment 2.
Assign dates for first round of student presentations.

Week 5 – Feb. 6

  • Read: Command line tips
  • Read chapters 1 and 2 in Automate the Boring Stuff with Python (Sweigart) — you will recognize concepts from JavaScript, but you’ll see that the Python syntax is different. The book is free online as web pages, but not as a PDF; there’s a link at the site to buy from Amazon.
  • To work on the exercises in the book, chapters 1 and 2, you need to download, install and run Python 3. DO NOT try to use “IDLE,” which Sweigart mentions. Instead, follow these basic instructions. Use the Python interactive shell (interactive interpreter) while you are reading the book. You will not really grasp anything if you do not type the commands yourself.
  • When you come to the part in chapter 1 with the heading “Your First Program,” read this.
  • Resource: Python Beginners (a GitHub repo)
  • There is no Monday quiz this week. I expect you to have read both chapters and to have typed the examples from chapters 1 and 2 into the Python shell (not “IDLE”; see previous bullet) BEFORE CLASS on Tuesday.

In class:

Introduction to the command line.
Introduction to Python.
Install Jupyter Notebooks.
Install Python3, virtualenv, Jupyter (in class)
Start Assignment 3 in class.
Student presentations

  • Assignment 3: Python review 1, based on Sweigart chapters (see Canvas for deadline and link to the assignment)
  • No quiz this week
  • Make sure you have the required book by Mitchell — assigned reading in one week

Week 6 – Feb. 13

  • Read: Sweigart, chapter 3
  • Read: Web Scraping: A Journalist’s Guide (Nael Shiab, August 2015) — very short: What is scraping? Why do it?
  • Read: On the Ethics of Web Scraping and Data Journalism (Nael Shiab, August 2015) — Is scraping legal? Is it unethical?
  • Read: Mitchell, Preface (pp. vii–xi) and chapters 1 and 2 — do not DO the things described in the book; we will do them (or at least start them) in class
  • Refer to Mitchell’s updated code in this repo
  • Read: Intro to PIP and virtualenv (we used both of these last week; this is the best explanation I’ve read of why we use virtualenv for Python projects)
  • Resource in python-beginners: week02

Introduction to Web scraping with Python and BeautifulSoup.
In class, we will set up a NEW virtualenv and install the BeautifulSoup library for scraping.
Mitchell discusses virtual environments on pp. 7–8.
Student presentations

  • Quiz 4 (covers both Shiab articles and Mitchell)
  • Assignment 4: Exercises from Mitchell (see Canvas for deadline)
  • Assignment 5: Python review 2, based on Sweigart (see Canvas for deadline)

Week 7 – Feb. 20

Web scraping, part 2. And — more Python!
Python lists (like arrays) and reading, writing files. This will be important for scraping. Later we’ll also learn how to read/write CSV files, which is much easier with Python than you might imagine.
Student presentations

  • Quiz 5
  • Assignment 6: Exercises based on Mitchell (see Canvas for deadline)
  • Assignment 7: Python review 3, based on Sweigart (see Canvas for deadline)

Week 8 – Feb. 27

This week has been revised.

  • Read: How to Break News While You Sleep (about email and bots)
  • Read in Mitchell:
    • Chapter 5 intro, page 71
    • Storing Data to CSV, pages 74–76
    • Email, pages 90–91
    • Ajax and Dynamic HTML, pages 151–152
    • Executing JavaScript in Python with Selenium, pages 152–156
    • Adjust Your Headers, pages 179–180
    • Timing Is Everything, pages 182–183
    • The Human Checklist, pages 186–187
  • Read Sweigart, chapter 8, up to page 112 (stop at “Using Data Structures to Model Real-World Things”)
  • Resources in python-beginnersmore-from-mitchell and modular-code
  • Resource: BeautifulSoup documentation (PDF)

Web scraping, part 3.
Python dictionaries. (They resemble JSON files.)
About your web scraping project.
Shown in class: CSV scraping exampleMLS soccer players example; breast cancer forum page (use of HTTP headers); Selenium scraper code for Tomatoes; (to get header info); XKCD comic

  • Quiz 6
  • Assignment 8 (see Canvas for deadline)
  • Web scraping proposal (see Canvas for deadline)

Week 9 – March 6

Spring Break – no classes

Week 10 – March 13

There will not be a third book. Readings will be online.

Wrap-up for Web scraping: Questions about your scraping project, due this Friday
Web frameworks: Why use a framework?
Installing Flask (hands on): flask README in python-beginners

  • Quiz 7
  • Assignment 9: Web scraping project

Week 11 – March 20

Web apps with Python: Flask
Flask templates: Introduction
Python dictionaries
Assign dates for second round of student presentations
Guests at 11:45: Moiz Syed and Trevor Aaronson of The Intercept, who received the University of Florida Award for Investigative Data Journalism for their story Trial and Terror (see story).

  • Quiz 8
  • No assignment

Week 12 – March 27

This week’s readings have been revised.

Flask and Bootstrap (more about templates)
Flask for Web forms with Flask-WTF and Bootstrap
Student presentations

  • Quiz 9
  • Assignment 10: Small Flask app

Week 13 – April 3

This week’s readings have been revised.

Flask applications continued: Databases and Flask-SQLAlchemy
WSGI is “a simple and universal interface between web servers and web applications or frameworks.”: the Python Web Server Gateway Interface.

  • Quiz 10
  • Assignment: Final project proposal

Week 14 – April 10

Student’s individual Web project — workshop hours during class period
Student presentations

Week 15 – April 17

Student’s individual Web project — workshop hours during class period
Student presentations

Week 16 – April 24

Student’s individual Web project — workshop hours during class period

Project Due Date

All projects are due on Monday, April 30, at 11:59 p.m. That is the Monday of finals week. You will post your project on your own website.

  • Post your project’s URL in Canvas by the deadline. This URL is on your own website.