The goal of birdseyeview is to make it easy to create the types of maps, plots, and tables used for community plans.
This package was initially designed to use the overedge package and data packages like mapbaltimore or bcpss to create reproducible maps and tables for a range of needs. The {overedge} package has since been superseded by sfext, getdata, and maplayer. maplayer incorporated most of the mapping functions creating for birdseyeview. These duplicative functions were removed from birdseyeview in Setember 2022.
You can install the development version of birdseyeview like so:
remotes::install_github("elipousson/birdseyeview")
library(birdseyeview)
library(getdata)
library(sfext)
library(maplayer)
parks <-
getdata::get_location_data(
data = "parks",
package = "mapbaltimore"
)
parks %>%
dplyr::slice_head(n = 4) %>%
dplyr:::select(name, address, park_district, acres, geometry) %>%
dplyr::group_by(park_district) %>%
gt::gt() %>%
gt_sf_rows(fill = "forestgreen", color = "lightgreen", size = 6)
park_photos <-
getdata::get_flickr_photos(
user_id = "baltimoreheritage",
tags = "druidhillpark",
img_size = "m",
sort = "date-posted",
per_page = 20
)
park_photos[1:6, ] %>%
dplyr::select(title, datetaken, image_height, image_width, image_url) %>%
tbl_photo_key(photo_col = "image_url", orientation = "landscape", number = TRUE)
library(ggplot2)
ggplot() +
maplayer::layer_location_context(
data = parks[245, ],
fill = "green",
context = parks,
context_params = list(fill = "forestgreen", color = "gray60", alpha = 1)
)
# make_group_layers has been dropped from birdseyeview but isn't available in maplayer yet
park_district_layers <-
make_group_layers(
data = parks %>% sf::st_centroid(),
mapping = aes(color = name),
groupname_col = "park_district"
)
clifton_district <-
getdata::get_location(
type = "park_districts",
package = "mapbaltimore",
name = "Clifton"
)
ggplot() +
park_district_layers[[1]] +
guides(color = "none") +
layer_show_location(
data = clifton_district
) +
theme_void()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.