PullOutcomes<-function(Metric,Year){
library(tidyverse)
dat<-read.csv('C:\\Users\\lance.sisco\\Documents\\R\\R\\R-3.3.1\\etc\\SourceData.csv')
datasources<-dat %>%
filter(School.Year==Year)
if(nrow(datasources)==0){print(paste(Year," not found in source Data. Please use ",
paste(dat %>% select(School.Year) %>% distinct(),collapse=','),
sep=''))}
datasources<-datasources %>%
filter(Measure==Metric)
if(nrow(datasources)==0){print(paste(Metric," not found in source Data in the specific year. Please use ",
paste(dat %>% select(Measure) %>% distinct(),collapse=','),
sep=''))}
location<-datasources %>%
select(Table.or.File.Location)
if(Metric=='Grad'){
dat<-GradRateStudentLevel(location$Table.or.File.Location)
}
if(Metric=='Proficiency'){
dat<-annualAssessmentData(location$Table.or.File.Location)
}
if(Metric=='Growth'){
dat<-pullSGP(location$Table.or.File.Location)
}
return(dat)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.