diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..c1aad7c Binary files /dev/null and b/.DS_Store differ diff --git a/Ideas/.Rhistory b/Ideas/.Rhistory new file mode 100644 index 0000000..e69de29 diff --git a/Ideas/Idea 2 NBA Player Props Proposal.md b/Ideas/Idea 2 NBA Player Props Proposal.md new file mode 100644 index 0000000..1dfe53e --- /dev/null +++ b/Ideas/Idea 2 NBA Player Props Proposal.md @@ -0,0 +1,53 @@ +# Luke Finkielstein Mini Project Idea Proposal 2: +# NBA Player Props Prediction + +Research Question: Can we predict NBA player point totals with reasonable accuracy using historical performance, matchup data, and contextual factors? + +Approach: Develop a regression model to predict individual player point totals in NBA games using historical player statistics and game context. The model will help identify player prop betting opportunities. + +## Gathering Tractable Data + +**Target:** Individual player point totals per game + +**Key Features:** +- Player historical scoring average (season, last 10 games, vs. specific opponents) +- Opponent defensive rating (points allowed per game) +- Game context (home/away, back-to-back games, rest days) +- Player usage rate and minutes played trends +- Opponent pace of play +- Player injury/availability status + +**Data sources:** ESPN, Basketball-reference.com, NBA.com, Kaggle datasets with historical player-game logs. Feasibility is high—player statistics are publicly available and well-documented. + +## Retrieval & Preparation + +Two approaches: +- Use existing player-game log datasets (faster, reduces timeline) +- Web scrape player statistics from ESPN/Basketball-reference (more control, more time-intensive) + +## EDA & Insights + +Analyze how player scoring varies by opponent strength, rest status, and usage rate. Identify key predictive features (recent form, matchup difficulty). Calculate correlations between candidate features and player point totals. Visualizations will include scatter plots of usage rate vs. scoring, distribution plots of scoring by opponent defense rating, and time-series analysis of individual player trends. Compare model performance against a simple baseline (e.g., using season average) to ensure meaningful predictive value. + +## Potential Limitations + +- **Game-to-game variance:** Player performance is highly variable; some games are outliers due to hot/cold shooting. +- **Injury uncertainty:** Last-minute injuries or load management decisions affect playing time unpredictably. +- **Small sample sizes:** Some matchups may have limited historical data. +- **Model assumes consistency:** Player form and roles can change mid-season due to trades or coaching changes. + +## Implications for Stakeholders + +**Sports Bettors:** Help identify player prop bets with positive expected value. + +**Sportsbooks:** Understand what drives player prop lines and refine odds-setting. + +**NBA Analysts:** Identify which factors most influence individual player performance. + +## Responsible Deployment & Ethics + +**Concerns:** Model could encourage problem gambling; predictions are probabilistic. + +**Legal:** Gambling laws vary by state. This model is for analysis only, not financial advice. + +**Mitigation:** Include gambling risk disclaimers; frame as educational/analytical exercise. \ No newline at end of file diff --git a/Ideas/Idea 2 NBA Player Props Proposal.md.html b/Ideas/Idea 2 NBA Player Props Proposal.md.html new file mode 100644 index 0000000..cc52f17 --- /dev/null +++ b/Ideas/Idea 2 NBA Player Props Proposal.md.html @@ -0,0 +1,42 @@ +NBA Player Props Prediction.md +

Luke Finkielstein Mini Project Idea Proposal 2:

+

NBA Player Props Prediction

+

Research Question: Can we predict NBA player point totals with reasonable accuracy using historical performance, matchup data, and contextual factors?

+

Approach: Develop a regression model to predict individual player point totals in NBA games using historical player statistics and game context. The model will help identify player prop betting opportunities.

+

Gathering Tractable Data

+

Target: Individual player point totals per game

+

Key Features:

+ +

Data sources: ESPN, Basketball-reference.com, NBA.com, Kaggle datasets with historical player-game logs. Feasibility is high—player statistics are publicly available and well-documented.

+

Retrieval & Preparation

+

Two approaches:

+ +

EDA & Insights

+

Analyze how player scoring varies by opponent strength, rest status, and usage rate. Identify key predictive features (recent form, matchup difficulty). Calculate correlations between candidate features and player point totals. Visualizations will include scatter plots of usage rate vs. scoring, distribution plots of scoring by opponent defense rating, and time-series analysis of individual player trends. Compare model performance against a simple baseline (e.g., using season average) to ensure meaningful predictive value.

+

Potential Limitations

+ +

Implications for Stakeholders

+

Sports Bettors: Help identify player prop bets with positive expected value.

+

Sportsbooks: Understand what drives player prop lines and refine odds-setting.

+

NBA Analysts: Identify which factors most influence individual player performance.

+

Responsible Deployment & Ethics

+

Concerns: Model could encourage problem gambling; predictions are probabilistic.

+

Legal: Gambling laws vary by state. This model is for analysis only, not financial advice.

+

Mitigation: Include gambling risk disclaimers; frame as educational/analytical exercise.

+ + \ No newline at end of file diff --git a/Ideas/NBA_Game_Prediction_Proposal.md b/Ideas/NBA_Game_Prediction_Proposal.md new file mode 100644 index 0000000..790a121 --- /dev/null +++ b/Ideas/NBA_Game_Prediction_Proposal.md @@ -0,0 +1,64 @@ +# Luke Finkielstein Mini Project Idea Proposal: +# NBA Game & Stat Prediction + + +Research Question: How can we predict the outcome of NBA games with better than 60% accuracy? + +Approach: Develop a classification model (probably logistic regression) to predict NBA game outcomes using historical game statistics and betting odds. The model will identify games with favorable edges to inform predictions. + + +## Gathering Tractable Data + +**Target:** Game outcomes (win/loss) + +**Key Features:** +- Team performance metrics (record, scoring, defense) +- Player availability/injury status +- Opponent strength ranking +- Game context (home/away, back-to-back games) +- Betting odds from sportsbooks (BetGM, DraftKings, Fanduel, etc.) + +**Data sources:** ESPN, NBA.com, Basektball-reference.com, Kaggle all have pre-compiled datasets of real games going back 20+ years. Additional data can be scraped from these websites if necessary. Feasibility is high—game data and odds are publicly available. + +## Retrieval & Preparation + +Two viable approaches: + +- Use existing public dataset (faster, reduces timeline overhead) +- Web scrape/API calls for game stats and odds (more control, more time-intensive) + + +## EDA & Insights + +Analyze outcome variation by team strength, matchups, injuries, and game context. Identify predictive features (home-court advantage, efficiency metrics). Perform EDA and visualize feature correlations with game outcomes. Calculate correlations between candidate features and game outcomes to determine which have the strongest predictive signals. Visualizations will include scatter plots of team efficiency metrics, heatmaps of feature correlations, and distribution plots comparing home vs. away performance. I can compare the model performance against a simple baseline (like always predicting the higher-seeded team) to ensure the model adds meaningful value. + +## Potential Limitations + +- **Unpredictable events:** Model cannot account for unexpected injuries, trades, coaching changes, or rest decisions made close to game time. +- **Probabilistic predictions:** Accuracy >50% does not guarantee profit; individual game predictions are probabilistic and subject to variance. +- **Data limitations:** Historical data may not fully capture changes in league dynamics, rule changes, or roster composition over 20+ years. +- **Sample size:** Model performance is limited by the number of games available for training and testing. + +## Implications for Stakeholders + +**Sports Bettors/Fans:** Would help make informed decisions on predicting winners and increase profitability. + +**Sportsbooks:** Understand what drives betting patterns and refine odds-setting. + +**NBA Teams**: Understanding which factors affect a team's ability to win would be very interesting to coaches/players/owners. + +## Responsible Deployment & Ethics + +**Concerns:** Model could encourage problem gambling; predictions are probabilistic and not deterministic. + +**Legal:** Gambling laws vary by state (sports betting is legal in PA, both online and in person). This model would be for analysis only, not financial advice. + +**Mitigation:** Include gambling risk disclaimers, talk about it as purely academic. + +## Timeline + +- Weeks 1-2: Data collection/preparation +- Week 3: EDA and feature engineering +- Weeks 4-5: Model development and evaluation + +**Deliverable:** Trained model with accuracy metrics and feature importance analysis. \ No newline at end of file diff --git a/Ideas/NBA_Game_Prediction_Proposal.md.html b/Ideas/NBA_Game_Prediction_Proposal.md.html new file mode 100644 index 0000000..7377431 --- /dev/null +++ b/Ideas/NBA_Game_Prediction_Proposal.md.html @@ -0,0 +1,48 @@ +NBA Game Prediction Proposal.md +

Luke Finkielstein Mini Project Idea Proposal:

+

NBA Game & Stat Prediction

+

Research Question: How can we predict the outcome of NBA games with better than 60% accuracy?

+

Approach: Develop a classification model (probably logistic regression) to predict NBA game outcomes using historical game statistics and betting odds. The model will identify games with favorable edges to inform predictions.

+

Gathering Tractable Data

+

Target: Game outcomes (win/loss)

+

Key Features:

+ +

Data sources: ESPN, NBA.com, Basektball-reference.com, Kaggle all have pre-compiled datasets of real games going back 20+ years. Additional data can be scraped from these websites if necessary. Feasibility is high—game data and odds are publicly available.

+

Retrieval & Preparation

+

Two viable approaches:

+ +

EDA & Insights

+

Analyze outcome variation by team strength, matchups, injuries, and game context. Identify predictive features (home-court advantage, efficiency metrics). Perform EDA and visualize feature correlations with game outcomes. Calculate correlations between candidate features and game outcomes to determine which have the strongest predictive signals. Visualizations will include scatter plots of team efficiency metrics, heatmaps of feature correlations, and distribution plots comparing home vs. away performance. I can compare the model performance against a simple baseline (like always predicting the higher-seeded team) to ensure the model adds meaningful value.

+

Potential Limitations

+ +

Implications for Stakeholders

+

Sports Bettors/Fans: Would help make informed decisions on predicting winners and increase profitability.

+

Sportsbooks: Understand what drives betting patterns and refine odds-setting.

+

NBA Teams: Understanding which factors affect a team’s ability to win would be very interesting to coaches/players/owners.

+

Responsible Deployment & Ethics

+

Concerns: Model could encourage problem gambling; predictions are probabilistic and not deterministic.

+

Legal: Gambling laws vary by state (sports betting is legal in PA, both online and in person). This model would be for analysis only, not financial advice.

+

Mitigation: Include gambling risk disclaimers, talk about it as purely academic.

+

Timeline

+ +

Deliverable: Trained model with accuracy metrics and feature importance analysis.

+ + \ No newline at end of file diff --git a/presentations/DATA400 Final Presentation.Rmd b/presentations/DATA400 Final Presentation.Rmd new file mode 100644 index 0000000..74819b9 --- /dev/null +++ b/presentations/DATA400 Final Presentation.Rmd @@ -0,0 +1,284 @@ +--- +title: "The Russo-Ukrainian War" +subtitle: "An Analysis of Russian Air/Drone Strikes on Ukraine" +author: "Denys Sharpylo & Luke Finkielstein" +date: "`r Sys.Date()`" +output: + xaringan::moon_reader: + css: [default, default-fonts] + nature: + highlightStyle: github + highlightLines: true + countIncrementalSlides: false +--- + +# Research Questions + +- What are the **temporal and geographic patterns** of Russian missile and UAV strikes? + +- Which regions are **most heavily targeted**, and why? + +- Can we **predict fatality presence** based on strike characteristics? + +- What factors **drive casualty counts** when fatalities occur? + +- How can these insights inform **humanitarian response and defense strategy**? + +--- + +# Data & Methodology + +**Primary Datasets (2022-2026):** + +.pull-left[ + +1. **ACLED** (Armed Conflict Location & Event Data) + - 6,119 conflict events + - 10,000+ fatalities + - Geolocation data (lat/long) + - Civilian targeting indicators + +] + +.pull-right[ + +2. **Missile/UAV Attack Data** (Kaggle) + - 85,814 recorded airstrikes + - Launch and destruction counts by model + - Temporal records spanning 4 years + +] + + +**Approach:** +- Exploratory Data Analysis (EDA) +- Temporal trend analysis +- Geospatial clustering (K-Means, k=5) +- Feature engineering (temporal, geospatial) +- Predictive modeling (Lasso Regression, Random Forest, Logistic Regression) + +--- + +# Key Statistics + +.pull-left[ + +## Scale of the Conflict + +- **6,119** conflict events recorded +- **10,000+** total fatalities +- **85,814** total recorded airstrikes +- **1.7** average fatalities per strike +- **1,030** unique locations affected + +] + +.pull-right[ + +## Weapon Systems + +- **Shahed-136/131** accounts for **88%** of all airstrikes +- Iranian-origin UAV dominates attack patterns +- **70%+** overall destruction rate for launched projectiles +- **50%+** of events result in zero fatalities + +] + +--- + +# Geographic Concentration + +**Most Affected Regions:** + +1. **Donetsk** - 2,460+ strikes (most heavily targeted) +2. **Kharkiv** - 790+ strikes +3. **Zaporizhia** - 760+ strikes + +**Key Finding:** Eastern frontline regions (Donetsk, Luhansk) experience disproportionately high attack concentrations, correlating with greater casualty counts despite not representing the majority of total incidents. + +Donetsk and Luhansk alone account for a **significant percentage of total conflict-related fatalities**. + +--- + +# Temporal Trends + +Attack intensity remained relatively stable through mid-2024, then escalated sharply with: + +- **Peak period:** July 2025 +- **Sharp escalation:** Mid-2024 onwards +- **Recent decline:** Early 2026 + +This temporal pattern suggests: +- Shifts in military strategy +- Seasonal variations +- Response to defensive improvements +- Correlation with broader conflict phases + +--- + +# Lasso Regression for Feature Selection + +### Task: Identify Key Predictors of Fatality Magnitude + +**Purpose:** Determine which features most strongly influence the number of fatalities when casualties occur. + +**Key Findings:** + +- **Geospatial clusters** show strong positive correlation with fatality counts +- **Population density** of target areas associated with increased casualties +- **Temporal features** (day of year, month) indicate seasonal fatality variations +- **Geographic coordinates** (longitude/latitude) are critical predictors + +**Interpretation:** When strikes do cause fatalities, location and temporal context significantly influence the scale of impact. These features were selected as most important for our binary classification model. + +--- + +# Predictive Modeling Results + +## Random Forest Classifier + +**Task:** Predict presence of fatalities (binary classification) + +**Performance:** +- **Accuracy: 0.90** +- **Precision: 0.89** +- **Recall: 0.90** +- **F1-Score: 0.90** + +**Top Predictive Features:** +1. Day of year +2. Longitude/Latitude of target +3. Population of target city +4. Temporal patterns (month, day of week) + +--- + +# Model Insights + +**Key Finding:** Geographic and temporal factors are **crucial determinants** of strike severity and casualty patterns. + +## What the Model Tells Us + +- **Location matters most** - Specific coordinates predict fatality likelihood with high accuracy +- **Population density is critical** - Strikes on populated areas are more likely to cause casualties +- **Seasonal patterns exist** - Certain times of year show higher fatality correlation +- **Predictability is high** - 90% accuracy suggests systematic, non-random targeting patterns + +This predictive capability offers a powerful tool for understanding and potentially mitigating the human cost of these attacks. + +--- + +# Geographic Distribution Map + +![Geographic distribution of Russian aerial strikes on Ukraine, showing civilian-targeted strikes (red dots) and non-civilian strikes (blue dots) across affected regions.](Ukraine 2d map.png) +--- + +# Interactive 3D Visualization + +**Explore the conflict in detail:** + +**[Access Interactive 3D Map](https://ukraine-3d-map-nt7et2c3m46k2boo2vqnfd.streamlit.app)** + +Features: +- Regional attack intensity (color-coded) +- Individual strike fatalities (3D bars) +- Hover tooltips with detailed statistics +- Rotatable 3D view to explore hotspots + +This visualization allows stakeholders to understand both the scale and distribution of attacks across Ukraine. + +--- + +# Implications for Stakeholders + +**Governments & Military Leadership** +- Evaluate effectiveness of current air-defense strategies +- Identify regions where strategic changes could reduce civilian harm +- Allocate resources to high-risk areas + +**Humanitarian Organizations** +- Target aid and protection efforts to most vulnerable regions +- Understand casualty patterns for response planning +- Provide evidence-based support recommendations + +**Policy Makers & International Community** +- Quantitative evidence on conflict scale and impact +- Support decisions on aid allocation and sanctions +- Inform diplomatic and military strategies + +**Accountability Mechanisms** +- Document targeting patterns for future accountability +- Analyze civilian vs. military infrastructure targeting +- Contribute to conflict documentation efforts + +--- + +# Ethical & Societal Implications + +This research prioritizes **preservation of human life** as the fundamental objective. + +**Potential Applications:** +- Guide investments in local air-defense technology +- Inform evacuation and protection strategies for at-risk populations +- Contribute to humanitarian resource allocation +- Support evidence-based policy decisions + +**Our Commitment:** +- Transparent methodology and data sources +- Acknowledgment of data limitations +- Respect for victims and affected communities +- Contribution to understanding conflict dynamics for peace-building + +--- + +# Limitations & Caveats + +- **ACLED data** relies on media reporting; coverage gaps may exist in isolated areas +- **Missile/UAV data** sourced from Ukrainian media; reflects Ukrainian reporting +- **Geolocation accuracy** varies; some events lack precise coordinates +- **Temporal lag** between incident occurrence and data publication +- **Zero-fatality events** may be underreported in media sources +- **Model predictions** assume historical patterns continue; future patterns may differ + +--- + +# Future Work + +**Potential Extensions:** + +- Integrate additional data sources (economic indicators, social media sentiment) +- Develop spatio-temporal deep learning models +- Predict specific types of casualties or infrastructure damage +- Analyze economic impact and reconstruction needs +- Model trajectory of conflict escalation/de-escalation + +**Next Steps:** +- Refine geospatial prediction models +- Develop early warning systems for escalating violence +- Expand analysis to include secondary effects of attacks + +--- + +# Project Resources + +**Full Analysis & Code:** + +**[GitHub Repository](https://github.com/lukef533/Russo-Ukrainian-Airstrike-Analysis/tree/main)** + +Includes: +- Complete Jupyter notebooks with analysis pipeline +- Data preprocessing and feature engineering code +- Model training and evaluation scripts +- All EDA visualizations +- Interactive map application code +- Poster and presentations + +--- + +class: center, middle + +# Questions? + +**Interactive Map:** [https://ukraine-3d-map-nt7et2c3m46k2boo2vqnfd.streamlit.app](https://ukraine-3d-map-nt7et2c3m46k2boo2vqnfd.streamlit.app) + +**GitHub Repository:** [https://github.com/lukef533/Russo-Ukrainian-Airstrike-Analysis](https://github.com/lukef533/Russo-Ukrainian-Airstrike-Analysis) diff --git a/presentations/DATA400-Final-Presentation.html b/presentations/DATA400-Final-Presentation.html new file mode 100644 index 0000000..503e61c --- /dev/null +++ b/presentations/DATA400-Final-Presentation.html @@ -0,0 +1,437 @@ + + + + The Russo-Ukrainian War + + + + + + + + + + + + + + + + + + diff --git a/presentations/DATA400TestPrez.Rmd b/presentations/DATA400TestPrez.Rmd new file mode 100644 index 0000000..b27708b --- /dev/null +++ b/presentations/DATA400TestPrez.Rmd @@ -0,0 +1,23 @@ +--- +title: "Test Presentation Ninja" +subtitle: "⚔
with xaringan" +author: "Luke Finkielstein" +institute: "RStudio, PBC" +date: "2016/12/12 (updated: `r Sys.Date()`)" +output: + xaringan::moon_reader: + lib_dir: libs + nature: + highlightStyle: github + highlightLines: true + countIncrementalSlides: false +--- + +background-image: url(https://upload.wikimedia.org/wikipedia/commons/b/be/Sharingan_triple.svg) + +```{r setup, include=FALSE} +options(htmltools.dir.version = FALSE) +``` + +# This is a test presentation + diff --git a/presentations/Test Presentation Ninja.html b/presentations/Test Presentation Ninja.html new file mode 100644 index 0000000..2e0e178 --- /dev/null +++ b/presentations/Test Presentation Ninja.html @@ -0,0 +1,175 @@ + + + + Test Presentation Ninja + + + + + + + + + + + + + + + + +