almartin82 / njschooldata

a simple, consistent interface for accessing NJ DOE school data in R
Other
11 stars 4 forks source link

fix enrollment 2020 data #162

Closed almartin82 closed 2 years ago

almartin82 commented 2 years ago

description of the change

how to test

you can run this test from test_enr.R. goal is to get all of those tests passing, this gets us closer.

  enr_2020 <- fetch_enr(2020, tidy = TRUE)

  expect_equal(filter(enr_2020,
                      district_id == '3570',
                      school_id == '999',
                      grade_level == "TOTAL",
                      subgroup == "total_enrollment") %>%
                 pull(n_students),
               36676)

  expect_equal(filter(enr_2020,
                      district_id == '3570',
                      school_id == '303',
                      grade_level == "01",
                      subgroup == "total_enrollment") %>%
                 pull(n_students),
               91)

  expect_equal(filter(enr_2020,
                      district_id == '3570',
                      school_id == '004',
                      program_code == "55",
                      subgroup == "migrant") %>%
                 pull(n_students),
               0)
almartin82 commented 2 years ago

@chrishaid review this third (merges into master)