Day Three
π§ Day 3 β SQL via Python: NYC School Data Exploration
Section titled βπ§ Day 3 β SQL via Python: NYC School Data ExplorationβWelcome to Day 3! Today, youβll learn to run SQL queries from within Python β a powerful combo for analysis, automation, and real-world workflows at Webeet.
π― Task Summary
Section titled βπ― Task SummaryβYouβll be working with a PostgreSQL database containing NYC school data. Your goals:
- Connect to the database using Python
- Write SQL queries and fetch results into
pandas
DataFrames - Analyze school patterns across boroughs, demographics, and safety metrics
- Submit your findings in a Jupyter Notebook
This reflects how we often work at Webeet β combining data access and analysis in one environment.
ποΈ Database Tables
Section titled βποΈ Database TablesβYouβll be querying these tables:
high_school_directory
β School names, locations, types, programsschool_demographics
β Enrollment data, ELL, FRPL, disabilities, etc.school_safety_report
β Reported incidents by type and location.
You can find description of these tables here : https://docs.google.com/spreadsheets/d/1-GBa4-i2ZJqc3lWVuefVKwS6o7jVHu2WWMRBEcJn-y8/edit?usp=sharing
π Connecting to the Database
Section titled βπ Connecting to the DatabaseβClone repo to your local machine.
Set up your connection in Python using one of the following as provided in the the setup guide:
π daily_tasks/day_3/day3_sql_combined_with_creds.ipynb
Make sure that connection works and you can query the data.
π Related GitHub Issue
Section titled βπ Related GitHub IssueβComplete the task following the instructions here: π Day 3 β SQL Practice via Python
π What to Submit
Section titled βπ What to Submitβ-
In your sub-branch (
[your-name]/day-3
), go to:
πdaily_tasks/day_3/
-
Add your notebook named:
πday3_sql_analysis.ipynb
-
The notebook should include:
- Connection setup
- SQL queries and results
- Commentary or markdown cells explaining what each query shows
- Summary of insights
-
Create a Pull Request with your work
-
Comment on the GitHub issue with a link to your PR
β³ Time Estimate
Section titled ββ³ Time EstimateβThis task should take about 4β5 hours, including database setup time.
Have fun blending SQL with Python β this is where analysis becomes superpowered! π₯ππ