Learn R Programming

edbuildr (version 0.3.0)

sd_neighbor_xlsx: A function to create a table of a school district and all its neighbors

Description

This function allows you to write out a table of any school district and its neighbors with selected data from EdBuild's master datafile, ready to export as a formatted excel file.

Usage

sd_neighbor_xlsx(data_year = "2019", school_district = NULL,
  table_vars = c('Name', 'Enrollment', 'Poverty Rate', 'Percent Nonwhite',
  'Local Revenue PP', 'State Revenue PP', 'Type'))

Arguments

data_year

Four digit year of master data to pull in. Options include 2013- 2019. Defaults to 2019.

school_district

Seven digit NCESID of the school district. Default is NULL. To find the NCESID for any school district, use masterpull to search for your district.

table_vars

Variable or list of variables to include in the table. Use tables_vars = <U+201C>options<U+201D> to print a list of the variables. Defaults to: Name; Enrollment; Poverty Rate; Percent Nonwhite; Local Revenue, per Pupil; State Revenue, per Pupil; Type

Value

An excel workbook which can be written out with openxlsx::saveWorkbook(my_table, file = '~/Documents/neighbor_table.xlsx', overwrite = TRUE)

See Also

sd_table_xlsx, master_codebook, masterpull neigh_diff

Examples

Run this code
# NOT RUN {
table <- sd_neighbor_xlsx(
         data_year = "2019",
         school_district = "0622710",
         table_vars = c("Name",
                       "Percent Nonwhite",
                       "Median Household Income",
                        "State Revenue PP")
        )
# }

Run the code above in your browser using DataLab