Skip to content

zachary-fennie/Python-Scripting-for-SQL-Database

Repository files navigation

CI/CD Install Format Lint Test

Fennie's Python Scripting for SQL Database

A Python script for an ETL pipeline to external data. The project will extract data from a url, make any necessary transformations, load the transformed data into a SQLite database, and perform CRUD queries to ananlyze and retrieve preliminary insights on the stored data.

diagram-export-10-6-2024-3_36_53-PM

Structure

The library directory contains extract.py to extract raw data from an online url source, transform_load.py to transform and load the original raw data from a .csv to a .db SQLite database, and crud_query.py to perform CRUD and query basic SQL operations.

Successful SQL Operations

Screenshot 2024-10-07 at 5 26 19 PM

Core Files of the Repo:

  • Jupyter notebook
  • icu.db
  • library.py
    • extract.py
    • transform_load.py
    • crud_query.py
  • test_main.py
  • requirements.txt
  • CI/CD pipeline
  • Makefile
  • README.md

Data

FiveThirtyEight's MMS ICU Beds Dataset

This dataset combines data from the Centers for Disease Control and Prevention's Behavioral Risk Factor Surveillance System (BRFSS) and the Kaiser Family Foundation to illustrate the number of people who were at high risk for hospitalization from the novel coronavirus COVID-19 in 2020.
URL: https://github.com/fivethirtyeight/data/blob/e6bbbb2d35310b5c63c2995a0d03d582d0c7b2e6/covid-geography/mmsa-icu-beds.csv

Summary Statistics of the ICU Dataset

Screenshot 2024-10-05 at 6 34 57 PM

Data Visualization of High Risk Persons per ICU beds & Hopitals

output

Jupyter Notebook for Preliminary Examination of Data

Notebook

About

Connect to a SQL database and perform CRUD operations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published