From 3bd9080f671a13bc6e258ccd750189da0717d0a0 Mon Sep 17 00:00:00 2001 From: Ben Varick Date: Thu, 31 Oct 2024 14:04:15 -0500 Subject: [PATCH] adjusted WI_schools data source --- R/route_analysis.Rmd | 7 +++++-- other/school_FILL0_wght400_GRAD0_opsz24.png | Bin 1042 -> 0 bytes 2 files changed, 5 insertions(+), 2 deletions(-) delete mode 100644 other/school_FILL0_wght400_GRAD0_opsz24.png diff --git a/R/route_analysis.Rmd b/R/route_analysis.Rmd index f391e28..c894b6a 100644 --- a/R/route_analysis.Rmd +++ b/R/route_analysis.Rmd @@ -33,7 +33,8 @@ school_focus <- data.frame(name = c("East High School"), NCES_CODE = c("55085200 walk_boundary_m <- 1.5 * 1609 ## load school locations -WI_schools <- st_read(dsn = "../data/Schools/WI_schools.gpkg") +WI_schools <- st_transform(st_read(dsn = "../data/Schools/Wisconsin_Public_Schools_-5986231931870160084.gpkg"), crs = 4326) +WI_schools <- WI_schools %>% mutate(geom = SHAPE) ## load addresses addresses <- read_csv(file="../data/addresses/Addresses_Students_EastHS_2024_GeocodeResults.csv") %>% @@ -77,6 +78,8 @@ for(i in addresses_near$number) { routes <- bind_rows(routes) ## combine routes +# Count the routes that intersect or overlap with each segment of the bike_tls network. +# The intersections have a buffer of 20m bike_lts_buffer <- st_buffer(st_intersection(bike_lts, walk_boundary_poly), 20) bike_lts_buffer["student_use"] <- unlist(lapply(st_intersects(bike_lts_buffer, routes), length)) @@ -89,7 +92,7 @@ logo <- image_read(path = "../other/BFW_Logo_180_x_200_transparent_background.pn school_symbol <- image_read_svg(path = "../other/school_FILL0_wght400_GRAD0_opsz24.svg") -bbox <- st_bbox(st_transform(st_buffer(addresses_near, dist = 500), crs = 4326)) +bbox <- st_bbox(st_transform(st_buffer(walk_boundary_poly, dist = 500), crs = 4326)) bbox <- c(left = as.double(bbox[1]), bottom = as.double(bbox[2]), right = as.double(bbox[3]), diff --git a/other/school_FILL0_wght400_GRAD0_opsz24.png b/other/school_FILL0_wght400_GRAD0_opsz24.png deleted file mode 100644 index 950373e13852a9008a64a1b30b0c5ffd1882ba34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1042 zcmV+t1nv8YP)PzXf1c)}^i4P#? z-N25T1p(FqcN_pge*kQ#84zFr&;g93fT;Q?a204CHxQr^I13Cp0__5}n|C>$8#1lN zF#`dn0!M()j==ue*bxaJ=wE@8!1U5UiVDOx5TDWvL?IvvGSQIjli4W-W~M>^aOft^ zaB-c*Wug(=tc!B&wfQy(za9O=X1FNv1;9nTtP&-D8(5PSAf(UbHYlzvcY}xw7ZjUi z)BV#SRspsY1rP$X9=Px5|Ci0+oKO&8FEHQ`_y+6(q$~(uEMk3qbHpz zI~sQ--F!Jg+JMI~%S?d}k$VJ~mvHlKECHZ}bjO@%5TEF3;Fd#V6u1s7D*#}bX}OZi zEnt6YkQCEAY%@4F13)8Qa&aAVo>iAKusJh`3Dnt$xu$s#I04K^pf|&w9gNYu4%GSD zMS>){>ZSQRr~q(uM{WMYS3?qKIHY| zm3k(Zt@Dp=hNE|bb>g}f_gS$1ldIs>#d;j=2Jy~mu_x%)`mWyrFdl=*X_>bw}F+p%Ly526#5yj;#`0xosUTx%|IK^$36NT|36NT|KNdP|mAzu6SpWb4 M07*qoM6N<$f^NsuN&o-=