Skip to content

Instantly share code, notes, and snippets.

@sastoudt
Created March 1, 2024 15:36
Show Gist options
  • Save sastoudt/f8ec0e308dc26ff50b407febc993779d to your computer and use it in GitHub Desktop.
Save sastoudt/f8ec0e308dc26ff50b407febc993779d to your computer and use it in GitHub Desktop.
Data for sample AP Stat style question about comparing histograms
library(tidyverse)
awards <- read.csv("Awards.csv")
awards$AwardedAmountToDate = gsub("\\$","", awards$AwardedAmountToDate)
awards$AwardedAmountToDate = gsub("\\,","", awards$AwardedAmountToDate)
awards$AwardedAmountToDate = as.numeric(awards$AwardedAmountToDate)
summary(awards$AwardedAmountToDate)
unique(awards$AwardInstrument)
ggplot(awards, aes(AwardedAmountToDate)) + geom_histogram(bins = 25)+ facet_wrap(~AwardInstrument, ncol = 1) + theme_minimal() + xlab("amount awarded (in $)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment