sd_map {edbuildmapr}R Documentation

A function to create a map of all school districts in a state

Description

This function allows you to create a map of all school districts, in each state in the United States, symbolized by selected variables from the EdBuild master dataset.

Usage

sd_map(data_year = "2019", state="New Jersey", county = NULL, map_var = "Student Poverty",
  level = "elem", legend= TRUE)

Arguments

data_year

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

state

The state for which you want to map school districts. Defaults to New Jersey.

county

The county for which you want to map school districts. Defaults to NULL. To view a full list of counties use sd_shapepull(year = "2019", with_data = TRUE)

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 median household income

  • Median Property Value colors by owner-occupied median property value

  • FRL colors by free and reduced price lunch rate

Defaults to Student Poverty

level

Selects which level of school districts you want displayed in the map.

  • elem displays elementary and unified districts

  • secon displays secondary and unified districts

Defaults to elem.

legend

If TRUE, legend is visible. Defaults to TRUE.

Value

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

See Also

sd_neighbor_map

Examples

map <- sd_map(state="Georgia", map_var = "Percent Nonwhite",
 level = "elem", legend= TRUE)

[Package edbuildmapr version 0.3.1 Index]