sd_neighbor_map {edbuildmapr}R Documentation

A function to create a map of a school district and its neighbors

Description

This function allows you to create a map of any school district with its neighbors symbolized by a selected variable.

Usage

sd_neighbor_map(data_year = "2019", school_district = NULL,
 map_var = "Student Poverty", legend= TRUE, type = "like")

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.

map_var

Variable by which to symbolize the map.

  • Student Poverty colors by student poverty rate

  • Total Revenue colors by state and local revenue per pupil

  • Local Revenue colors by local revenue per pupil

  • State Revenue colors by state revenue per pupil

  • Percent Nonwhite colors by percent nonwhite enrollment

  • Median Household Income colors by owner-occupied median household income

  • Median Property Value colors by median property value

  • FRL colors by free and reduced price lunch rate

Defaults to Student Poverty

legend

If TRUE, legend is visible. Defaults to TRUE.

type

Indicate which types of neighbors to return. Defaults to "like", returning a map of neighbors of the same district type (unified to unified, elementary to elementary and secondary to secondary). To view all neighbors use "all". This 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 with 1 unified neighbor, 16 secondary neighbors, and 32 elementary neighbors.

Value

An image of the map which can be written out with tmap::tmap_save(map, '~/Documents/map.png')

See Also

sd_map

Examples

map <- sd_neighbor_map(data_year = "2019", school_district = "2901000", "Percent Nonwhite")

[Package edbuildmapr version 0.3.1 Index]