neigh_diff: A function to find the difference between school district...

Description Usage Arguments Value See Also Examples

View source: R/neigh_diff.R

Description

This function allows you to find the difference between each pair of school district neighbors and calculate the national rank from largest to smallest.

Usage

1
2
neigh_diff(data_year= "2019",
 diff_var="Percentage Point Difference in Poverty Rate", type= "like")

Arguments

data_year

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

diff_var

Character string on which to rank the difference between school district neighbors. Use diff_var = “options” to print a list of the variables. Defaults to Percentage Point Difference in Poverty Rate.

type

Character string to indicate which types of neighbors to return. Defaults to "like" which returns a list of neighbors that are the same district type (that is, unified to unified, elementary to elementary and secondary to secondary). To view all neighbors use "all". This selection becomes important for districts like Chicago which have upwards of 50 neighboring school districts, but only 1 type-like neighbor. Chicago is a unified district and it has 1 neighbor that is also unified, 16 neighbors that are secondary districts, and 32 neighbors that are elementary districts.

Value

A dataframe where each observation is a pair of neighboring school districts.

See Also

masterpull, master_codebook, sd_neighbor_xlsx

Examples

1
2
3
4
tr_diff <- neigh_diff(
           data_year = "2019",
           diff_var = "Difference in Total Revenue Per Pupil"
           )

edbuildr documentation built on June 2, 2021, 5:07 p.m.