Skip to content

Instantly share code, notes, and snippets.

@laurajanegraham
Created November 8, 2018 16:20
Show Gist options
  • Save laurajanegraham/9eb2b4c3bf58e67060724fba5ae9cdb3 to your computer and use it in GitHub Desktop.
Save laurajanegraham/9eb2b4c3bf58e67060724fba5ae9cdb3 to your computer and use it in GitHub Desktop.
Count of turbines in wind farms for Seb
library(sf)
library(tidyverse)
load("wind_test.rda")
buffer <- wind.test %>% select(ID) %>%
st_buffer(dist=1000) %>%
st_union() %>%
st_cast("POLYGON") %>%
st_sf() %>%
mutate(turbines = st_intersects(buffer, wind.test) %>% map_int(length))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment