ward-wise / data-analysis

Data analysis on Chicago infrastructure and infrastructure spending
MIT License
3 stars 7 forks source link

Improving street resurfacing data calculation #31

Open smacmullan opened 6 months ago

smacmullan commented 6 months ago

The current street resurfacing scripts find the last time a street segment (section of street between intersections) was resurfaced. However, sometimes only a portion of a street segment is resurfaced at a time, which means we might be missing old sections of street because they're part of the same segment as a recently resurfaced section of street.

Changes to make:

  1. Write a function that takes a street address, interpolates the distance along a street segment, and splits that street segment into two street segments.
  2. Update street resurfacing script so, for a given resurfacing row, the street segments that the resurfacing starts or ends in are split using the function from step 1 (segments contained in the middle of the resurfacing can be kept whole). We should add a buffer so if resurfacing starts/ends within a few addresses of the start/end of a street segment, we just use the whole street segment (otherwise we'll end up with a bunch of tiny geometry data).