Two Jupyter notebook projects using pandas, seaborn, and scikit-learn:
| Project | Dataset | What it does |
|---|---|---|
| 911 Call Data | 99,492 emergency calls, Dec 2015 – Aug 2016 | Feature engineering and exploratory analysis of when and why people call 911 |
| Brain Tumor Survival | 20,000 patient records | Data cleaning, EDA, and a linear regression predicting survival rate |
Both notebooks were run on Python 3.12 and include their outputs, so the charts and results show up directly on GitHub.
Data: 911.csv: latitude/longitude, description, zip code, title (e.g. EMS: BACK PAINS/INJURY), timestamp, township, and address.
- Explores the raw data: top zip codes and townships by call volume, and the number of unique call titles.
- Engineers features:
Reason: the department prefix before the colon intitle(EMS, Fire, or Traffic)Hour,Month,day_name, andDatepulled from the parsed timestamp
- Visualizes call patterns:
- Call counts by reason, by day of week, and by month (split by reason)
- Calls per month (bar chart) and calls per date (line chart), overall and separately for each reason
- An hour-of-day × day-of-week heatmap
- A correlation matrix of hour, reason, and day (categories converted to numeric codes)
- Writes up findings in notes between the charts:
- EMS is the most common reason for a call and Fire the least.
- January has the most calls.
- Volume is lowest around 3–7 AM and peaks around 3–5 PM.
- September to November are missing because the data ends in August.
- Scopes a regression model in a closing note (hour, day, month, and reason as features, R² as the metric) without running it.
groupby aggregation and pivot tables turn the flat call log into time-based counts, which feed every chart.
Data: brain_tumor_dataset.csv: age, gender, tumor type (benign/malignant), size, growth rate, location, histology, stage, three symptoms, radiation/surgery/chemotherapy flags, family history, MRI result, follow-up flag, and survival rate.
Research question: can survival rate be predicted from a patient's clinical characteristics?
- Cleans the data:
- Forward- and back-fills missing values and removes duplicate rows
- Drops impossible records: age ≤ 0, negative tumor size, or survival rate outside 0–100
- Standardizes text categories (gender, location, histology, stage)
- Handles outliers: caps age, tumor size, survival rate, and growth rate at the IQR fences (
Q1 − 1.5·IQR,Q3 + 1.5·IQR) rather than dropping rows. - Encodes and scales: label-encodes the 14 categorical columns and standardizes the four numeric columns with
StandardScaler. - Explores:
- Correlation heatmap across all features
- Tumor-size histogram with a density curve
- Age and survival-rate boxplots by tumor type
- Treatment counts (radiation, chemotherapy, surgery) by tumor type
- Models:
Survival_Rate ~ Age + Tumor_Size + Tumor_Growth_Ratewith scikit-learn'sLinearRegression, trained on 60% of the data and tested on 40% (random_state=42). - Evaluates: reports mean squared error and R², then plots actual vs. predicted survival for 100 random test patients.
Survival rate is standardized along with the other numeric columns, so the MSE is in standard-deviation units rather than percentage points.
Ordinary least squares regression: finds the weights on age, tumor size, and growth rate that minimize squared prediction error. MSE measures typical error size; R² is the share of variance in survival rate the model explains.
pip install pandas numpy matplotlib seaborn scikit-learn jupyter
jupyter notebookEach notebook loads its CSV by filename, so launch Jupyter from inside that project's folder (or open the notebook from there).
Python, pandas, NumPy, Matplotlib, seaborn, scikit-learn, Jupyter.
Apache 2.0. See LICENSE.