A one-day class in using Python for data analysis in government
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



  • A full-day course covering the key concepts of how to leverage the Python programming language for data analysis using open data. The course will cover the basic syntax of Python as it relates to performing basic exploratory data analysis, as well as how to create impactful charts, graphs, and other information visualizations using NYC Open Data for operational decision making.

Terminal Learning Objectives

  • Participants will understand what Python is and why it's useful
  • Participants will understand how Python structures data, and why that's different than Excel
  • Participants will open a dataset in Python and shape into a usable structure for analysis
  • Participants will create a visualization and calculate summary statistics of a dataset in Python
  • Participants will be exposed to elementary programming concepts and supplementary programming libraries in Python
  • Participants will apply skills to conduct a simple analysis of a dataset from the NYC Open Data Portal
  • Participants will model how Python can be used to build a data-driven culture in their workplace

Key Audience

  • Analysts working in city government with basic programming knowledge and/or experience performing advanced analysis in Excel (nested formulas with conditionals, PivotTables, and macros)


  • Introduction (Richard)
    • Class Schedule and Expectations (Richard)
    • Housekeeping (Richard)
    • What is Python? (Julia)
    • Value of Data (Julia)
    • What is Analysis? (Julia)
    • What is Python? (Julia)
    • Python vs Excel (Julia)
  • Today's Question (Julia)
  • Getting Started (Richard)
    • Using Jupyter Notebook (Richard)
    • Python Syntax (Richard)
  • Data Collection
    • Open 311 Dataset in Python
    • Explore Data Structures and Types
    • Learn Basic Syntax
  • Data Exploration
    • Calculate Summary Statistics
    • Identify Columns, Levels, and Known Issues
    • Explore Jupyter Notebook
  • Data Manipulation
    • Introduction to Python Packages
    • Learn to Create New Fields and Calculate New Values
    • Explore Algorithmic Ways to Tackle Problems in Python
  • Form Hypotheses
    • What Questions Can We Ask of This Data?
    • How Could We Structure Our Data Analysis?
  • Debugging
    • Understand Difference Between Syntax and Semantic Errors
    • Review Pro-tips for Problem-solving and Debugging
  • Data Visualization
    • Create a Table That Answers an Above Question
    • Create a Plot That Answers an Above Question
  • Wrap Up
    • How is Python Different Than Excel?
    • Examples of Python in Government Work
  • Resources