A notebook filled with SQL query practice I've done. Data comes from Interview Cake's practice cake bakery dataset.
Queries are called in Jupyter notebook and imported into pandas dataframes for visualization. Uses anaconda to manage the environment
You'll need the following installed to run the analysis successfully:
- Anaconda
- PostgreSQL
First create the anaconda environment:
conda env create -f environment.yml -n sql-query-practice
Activate the environment:
$ source activate sql-query-practice
Next, run the get the data and sql table setup files.
curl -O https://static.interviewcake.com/bakery_schema_and_data.sql && mysql.server start && mysql -u root
Setup the database
source bakery_schema_and_data.sql;
Finally, start up Jupyter and visit localhost:8888 to see the analysis.
jupyter notebook
All data was taken from opendata sources.
asu data - https://moto.data.socrata.com/dataset/Arizona-State-University-Police-Department/6fzp-yqnh
To update project with new packages, add them to environment.yml, then type in
$ conda env update -f environment.yml -n sql-query-practice