Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Mini Project Byers.pptx
Binary file not shown.
446 changes: 446 additions & 0 deletions idea1.html

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions idea1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
**<span style="font-size:2em;">Idea #1</span>**


**<span style="font-size:1.5em;">1) Research Question</span>**

How do the number/type of roads/factories/oil wells in an area impact the number of air quality and asthma/lung health issues? I want to explore if more factories in an area coincides with more lung health issues and the same with more roads and oil wells in the area. I also want to see if an increase in factories results in worse air quality, as well as the same process with roads and oil wells. I am thinking of confining this research to Pennsylvania as it is easier to find county by county data if you focus on one state and I feel that state by state data is too broad for my idea.

**<span style="font-size:1.5em;">
2) Data source</span>**

*<span style="font-size:1.1em;">
a) With details about how you will get the data</span>*

*<span style="font-size:1.1em;">
b) What variables the dataset has or you will create</span>*

*<span style="font-size:1.1em;">
c) This can get pretty long, which is fine!</span>*

I plan to use data about the road systems such as the miles of road in each state, broken down by rural/urban, interstate/not. This data comes from the US Department of Transportation Federal Highway Administration and is state by state. I found detailed road information for PA cities.

I found data from the US Census regarding the types and number of each type of business in every county of each US state. This data is available from 2002 to 2022.

I have found data through the Center for Disease Control that supplies the number and percentage of people with asthma in each state from 1999 to 2020. I have also found data from Pennsylvania Commonwealth detailing the percentage of students who have asthma by county.

I found data showing how many oil and gas wells have been drilled in each county of Pennsylvania and it can be displayed by whatever dates you want to search for. This data is from the Pennsylvania Department of Environmental Protection.

**<span style="font-size:1.5em;">3) What you will do with the data, EDA, model specification.</span>**

I want to create heat maps with the amount of roads per county, oil wells and factories. I would also break this down by population and land size as well. I would repeat the same process with number of people with lung health issues. I would try to create a model that predicted the number/percentage of people with lung issues/asthma based on roads, factories, air quality and oil/gas wells.
438 changes: 438 additions & 0 deletions idea2.html

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions idea2.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very practical idea. My only comment is that you should be mindful of how the results might impact player or team perceptions. For example, if your model predicts that certain players have a lower probability of achieving specific performance metrics, this could potentially affect how they’re viewed by coaches or teammates.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
**<span style="font-size:2em;">Idea #2</span>**


**<span style="font-size:1.5em;">1) Research Question</span>**

I would like to research how to predict the winner of a basketball game. What factors play bigger parts in determining a win? Number of assists, number of steals, 3 point percentage, field goal percentage, free throws, time in possession, and turnovers are some of the statistics I'd like to look at. This analysis could have an impact on winning more games which is always the goal of sports. I would also like to try predicting stats like which players will have a double-double in a game.

**<span style="font-size:1.5em;">
2) Data source</span>**

*<span style="font-size:1.1em;">
a) With details about how you will get the data</span>*

*<span style="font-size:1.1em;">
b) What variables the dataset has or you will create</span>*

*<span style="font-size:1.1em;">
c) This can get pretty long, which is fine!</span>*

Dickinson mens basketball has given me access to their three databases which include data about their team going back to 2015 and all NCAA mens basketball teams. They have every statistic I mentioned above and many many more.

**<span style="font-size:1.5em;">3) What you will do with the data, EDA, model specification.</span>**

I want to create some visualizations and maybe shot heat maps before creating a model - likely a mixed effects regression model to determine points scored and also maybe a mixed effects logistical model determining whether Dickinson will win the game or not.

**<span style="font-size:1.5em;">4) What are some ethical considerations for this topic?</span>**

I don't think there are many ethical considerations as the data is only about basketball which is not really a sensitive topic. There is no personal information about players beyond height, weight, year and name (name can be easily excluded from results if desired). I will need to talk to the basketball coaches about where this data can go but from our first meeting they seemed very open with me using it in a class for a project.
438 changes: 438 additions & 0 deletions idea3.html

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions idea3.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interesting idea. And you might want to provide more detail about how you’ll set up the simulation. What random variables will be modeled in each simulation? For example, will you introduce randomness into shooting percentages, turnovers, or other performance metrics?

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
**<span style="font-size:2em;">Idea #3</span>**


**<span style="font-size:1.5em;">1) Research Question</span>**

I have read about Monte Carlo simulations and I would like to try to do some with basketball win percentage. What are the odds Dickinson Mens Basketball wins a game against a certain team based on a set of factors?


**<span style="font-size:1.5em;">
2) Data source</span>**

*<span style="font-size:1.1em;">
a) With details about how you will get the data</span>*

*<span style="font-size:1.1em;">
b) What variables the dataset has or you will create</span>*

*<span style="font-size:1.1em;">
c) This can get pretty long, which is fine!</span>*

Dickinson mens basketball has given me access to their three databases which include data about their team going back to 2015 and all NCAA mens basketball teams. They have statistics as a team and as individual players for all the basic statistics like free throw %, field goal %, 3 point %, steals, assists, time with possession and turnovers. They also have many more statistics for team and individual.

**<span style="font-size:1.5em;">3) What you will do with the data, EDA, model specification.</span>**

I would run Monte Carlo simulations after creating data visualizations of the variables I chose to use in the simulations. I would run simulations of past games to see what the accuracy percentage of the predictor is before using it to predict upcoming games.


**<span style="font-size:1.5em;">4) What are some ethical considerations for this topic?</span>**

I don't think there are many ethical considerations as the data is only about basketball which is not really a sensitive topic. There is no personal information about players beyond height, weight, year and name (name can be easily excluded from results if desired). I will need to talk to the basketball coaches about where this data can go but from our first meeting they seemed very open with me using it in a class for a project.
97 changes: 97 additions & 0 deletions miniproject.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#read in data
co2emis <- read.csv("/Users/magsb/Downloads/per-capita-co2-sector.csv")
asthma <- read.csv("/Users/magsb/Documents/Downloads/county_asthma.csv")
miles <- read.csv("/Users/magsb/Downloads/miles.csv")

#packages
library(ggplot2)
library(tidyverse)
library(gridExtra)
library(reshape2)

#add data column to asthma dataframe
asthma$per_diag <-
c(8.61, 7.94, 7.99, 6.15, 6.01, 8.98, 17.27, 8.97, 10.33)

#EDA
co2emis |>
ggplot(aes(x = Year, y = manufacturing.and.construction, color = "blue")) +
geom_point()

co2emis |>
ggplot(aes(x = Year, y = energy.production, color = "green")) +
geom_point()



plot3 <- asthma |>
ggplot(aes(x = County, y = conventional_wells+unconventional_wells, fill = County)) +
geom_col() +
labs(
y = "Number of Wells",
title = "Number of Unconventional and Conventional Wells"
) +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) +
scale_fill_brewer(palette="Paired") +
theme(legend.position = "none")
plot3

plot2 <- asthma |>
ggplot(aes(x= County, y = Asthma_hosp, fill = County)) +
geom_col() +
labs(
y = "Hospitalization Rate",
title = "Hospitalization Rate for Childhood Asthma",
caption = "Number of children hospitalized per 100,000"
) +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) +
scale_fill_brewer(palette="Paired") +
theme(legend.position = "none")
plot2

plot1 <- miles |>
ggplot(aes(x = County, y = truck_dvmt, fill = County )) +
geom_col() +
labs(y = "Daily Vehicular Miles Traveled",
title = "Truck only DVMT per County")+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) +
scale_fill_brewer(palette="Paired") +
theme(legend.position = "none")
plot1



grid.arrange(plot1, plot2, plot3, ncol=3)



trucks <- miles |>
ggplot(aes(x = County, y = truck_dvmt, fill = County )) +
geom_col() +
labs(y = "Daily Vehicular Miles Traveled for Trucks",
title = "Truck DVMT per county")+
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

trucks



df2 <- melt(asthma, id.vars='County')
df2 <- df2 |> filter(variable == "Asthma_hosp" | variable == "per_diag")
head(df2)

ggplot(df2, aes(x=County, y=value, fill=variable)) +
geom_bar(stat='identity', position='dodge') +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

plot4 <- asthma |>
ggplot(aes(x= County, y = per_diag, fill = County)) +
geom_col() +
labs(
y = "Percent Diagnosed",
title = "Percent of K-12 Students Diagnosed with Asthma"
) +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) +
scale_fill_brewer(palette="Paired") +
theme(legend.position = "none")
plot4