lunches: National School Lunch Program (NSLP)

Description Usage Format Details References Examples

Description

A dataset containing information about free, reduced and full priced lunches.

Usage

1

Format

A data frame with 47 rows and 4 variables

Details

References

https://catalog.data.gov/dataset/national-school-lunch-assistance-program-participation-and-meals-served-data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 
library(tidyverse)
library(ggrepel)

lunches %>%
    gather(type, students, -year) %>%
    group_by(year) %>%
    mutate(prop = students/sum(students)) %>%
    ggplot(aes(year, prop, color = type, group = type)) +
        geom_text(
            data = lunches %>%
                gather(type, students, -year) %>%
                group_by(year) %>%
                mutate(prop = students/sum(students)) %>%                
                filter(year == 2017),
            aes(label = type),
            hjust = 0, size = 5
        ) +
        geom_line(size = 1) +
        theme_minimal() +
        theme(legend.position = 'none') +
        scale_x_continuous(limits = c(1970, 2023), breaks = seq(1970, 2010, by = 10)) +
        scale_y_continuous(labels = scales::percent)

## End(Not run)

trinker/exampledata documentation built on May 25, 2019, 8:32 p.m.