Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

DAT-129 Repository


This repository consists of Python scripts written to fulfill assignments in my DAT-129 Python 2 programming class at the Community College of Allegheny County (CCAC) in the Fall 2019 semester.


Includes 3 programs to help analyze the 311 dataset, which is published by the Western Pennsylvania Regional Data Center (WPRDC):

  • Uses Pandas to group and sort a large volume of 311 data so it can be more easily analyzed.
  • Consolidates 311 Request Types into Categories defined by the 311 Department's Issue and Category Codebook.
  • Uses Pandas to count 311 requests by originating neighborhood in the city of Pittsburgh.


Includes the following program:

  • Uses the Entrez API to search for ketamine-related publications in the Pubmed medical database and export the data to a .csv file.


Includes two programs to help analyze data in the Pennsylvania Department of Transportation's crash dataset:

  • Loads the crash dataset (a .csv file) into a SQL Server Database via the Pandas package.
  • Uses Pandas to help answer several questions about the nature of accidents on Pennsylvania roads.


Provides sample code to demostrate how Python can interact with databases for the purpose of peer teaching:

  • A very simple script that extracts the version number from SQLite.
  • Demonstrates the execution of different database operations (CREATE TABLE, INSERT, UPDATE, SELECT, and DELETE) using an SQLite database.
  • Provides sample connection strings for a variety of databases.


Includes the following script:

  • Allows a user to edit (modify, add to, delete from) a multi-level dictionary read in from a text schema file. Demonstrates the use of recursion to handle unlimited dictionary levels.

File IO

Includes class exercises in reading and writing data in various formats:

  • Formats a list of numbers and writes them out to a text file.
  • Builds a list of names from a text file and prints an appropriate greeting to the console.
  • Reads in an Allegheny County jail dataset from a .csv file and computes and displays statistics about it.
  • Same as, but uses Pandas to generate the statistics.
  • Reads in a JSON file containing Pittsburgh capital project data into a list of dictionaries, prints info about the projects, and writes the data out to a file in JSON format.


Includes the following script for traversing a directory tree structure:

  • Uses the os.walk method to traverse a directory structure, calculating statistics such as the maximum breadth and depth of a given file tree. It uses Pandas to display statistics for all traversed trees.

JSON Project

Includes two versions of a mini project that read in Pittsburgh capital project data from a .csv file, and allowed the data to be searched by various criteria. Matching records could be written out to a file in JSON format:

  • json_project_original: Written prior to the discussion of program specs in class. Reads in the Capital Projects .csv file into a dictionary list. Reads in empty selection criteria in a JSON file. Allows a user to enter values for those selection criteria. Displays matching records and writes them out to a file in JSON format.
  • json_project_inclass: An extension to work we did in class. Reads search criteria from a file in JSON format. Reads each row of the Capital Projects .csv file to determine if it matches the search criteria. Prints matching records to the console.


Includes the following script to demonstrate the use of the BeautifulSoup library to scrape data from a web site:

  • Uses the BeautifulSoup library to extract data from the Federal Government's database of clinical trials and write it out to a .csv file.


Repository for CCAC DAT-129 Coursework







No releases published


No packages published