diff --git a/submissions/r8_solutions.Rmd b/submissions/r8_solutions.Rmd new file mode 100644 index 0000000..f2bb32a --- /dev/null +++ b/submissions/r8_solutions.Rmd @@ -0,0 +1,58 @@ +--- +title: "R Notebook" +output: html_notebook +--- + +This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code. + +Try executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Cmd+Shift+Enter*. + +```{r} +names(nys_acs) +names(nys_schools) +str(nys_acs) +str(nys_schools) +``` +```{r} +library(dplyr) +nys_schools <- nys_schools %>% filter(mean_ela_score != -99 & mean_math_score != -99& per_lep != -99 & per_free_lunch != -99 & per_reduced_lunch != -99 & total_enroll != -99) +summary(nys_schools) + +``` +```{r} +summary(nys_acs$county_per_poverty) +nys_acs <- nys_acs %>% + mutate(Poverty_Status = case_when( + county_per_poverty <=0.10903 ~ "Low", + county_per_poverty >0.10903 & county_per_poverty <= 0.14929 ~"Medium" + county_per_poverty > 0.14929 ~ "High" + )) + +head() +``` +```{r} +counties_schools <- left_join(nys_acs, nys_schools, by= c("year", "county_name")) +head(counties_schools) +``` + + +```{r} +counties_schools <- counties_schools %>% + group_by(year, county_name) %>% + summarize(sum(total_enroll)) + + +``` +```{r} +nys_schools <- nys_schools %>% + group_by(year)%>% + ggplot() + + geom_line(aes(x="per_free_lunch", y = "mean_ela_score",group = )) +``` + +Add a new chunk by clicking the *Insert Chunk* button on the toolbar or by pressing *Cmd+Option+I*. + +When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the *Preview* button or press *Cmd+Shift+K* to preview the HTML file). + +The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike *Knit*, *Preview* does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed. +