sr_plot_total_enrollment_by_year: Plot total enrollment by year

sr_plot_total_enrollment_by_yearR Documentation

Plot total enrollment by year

Description

Create a highcharts line plot that shows total enrollment in all schools by year. This function has little use outside the Rmarkdown file as it relies on the specific data in the Rmarkdown file.

Usage

sr_plot_total_enrollment_by_year(.data, school_names, grade_span)

Arguments

.data

Data frame containing enrollment data. This data frames comes from sr_ccd_enrollment and is then filtered to only contain total enrollment.

school_names

A string containing the school name(s)

grade_span

A string containing which grades are included (example: "10-12"). This information is used in the plot title.

Value

A highcharts line plot.

Examples

## Not run: 
total_enrollment <- sr_ccd_enrollment("schools", "050306000073", 2017:2020, 10:12) |>
   dplyr::filter(race == 'Total')

sr_plot_total_enrollment_by_year(total_enrollment, "Bentonville High School", "10-12")

## End(Not run)


shanejorr/schoolreportr documentation built on Aug. 7, 2023, 12:25 p.m.