Open bmschmidt opened 2 years ago
sketch of code:
streets |>
mutate(number = list(lef_minimum:left_maximum)) |>
unnest(number)
Consider also using street_data |> st_centroid()
to turn each block into a point.
stnumbered <- street_shapes |>
select("OBJECTID","StreetModern", "y1880NameStreet", "y1880Left_Low", "y1880Left_High", "y1880Right_High", "y1880Right_Low")
stnumbered <- stnumbered |>
mutate(y1880Left_Low = as.numeric(y1880Left_Low)) |>
mutate(y1880Left_High = as.numeric(y1880Left_High)) |>
mutate(y1880Right_Low = as.numeric(y1880Right_Low)) |>
mutate(y1880Right_High = as.numeric(y1880Right_High))
stnumbered <- stnumbered |>
mutate(low = pmin(y1880Left_Low, y1880Right_Low, na.rm=TRUE)) |>
mutate(high = pmax(y1880Left_High, y1880Right_High, na.rm = TRUE))|>
head(10)
#Creating a pared down df that only has essential info
streetsnumbered <- stnumbered |>
select("y1880NameStreet", "low", "high", "OBJECTID")
streetsnumbered |>
head(20)
attempt1 <- streetsnumbered |>
mutate(numbers = list(low:high)) |>
unnest(numbers) |>
head(10)
#I'm getting a warning "Problem while computing numbers=list(low:high), numerical expression has 36788 elements: only the first used"
@Sppangu, @hpblood , and @bmschmidt talked through a strategy of:
Although every point will the same at a first pass, this will make it possible down the line to locate each point exactly where it goes on the block, too.