In this project, I built a pipeline that connects a publicly available CSV to a SQLite database and executes Create, Read, Update, and Delete (CRUD) operations using SQL syntax in a Python script. These operations could be used in the future to update entries in the database. In this example, each database entry represents the address of a polling place location.
This project uses data on Election Day polling places for the November 3rd, 2020 election in North Carolina.
More information and a link to the data is available at: https://www.ncsbe.gov/results-data/polling-place-data
- In the
mylibdirectory,extract.pyextracts the raw data from the link to the NCSBE website. Thetransform_load.pyscript transforms the raw data from.csvto a.dbSQLite database and creates a new connection. - The
query.pyscript includes the Create, Read, Update, and Delete (CRUD) operations to execute various SQL operations.
- Please view the "main.ipynb" notebook to view proof of successful database operations.
PeterdeGuzman_Mini5/
├── __pycache__/
├── .devcontainer/
│ ├── devcontainer.json
│ └── Dockerfile
├── .pytestcache/
├── .ruff_cache/
├── __pycache__
├── .github/
│ └── workflows/
│ └── cicd.yml
├── mylib/
│ ├── extract.py
│ ├── transform_load.py
│ └── query.py
├── data/
│ └── pollingplaces_2020.csv
├── .gitignore
├── proof_test.png
├── pllingplaces_2020.db
├── main.py
├── main.ipynb
├── main.html
├── main.pdf
├── Makefile
├── README.md
├── Requirements.txt
└── test_main.py
