Migration as System Stabilzer
Research question. How are cumulative and recurrent flood-inundation damages spatially distributed across Seoul’s administrative dongs, and how might these patterns relate to housing-market conditions and residential mobility?
This research notebook begins by preparing the flood-damage point records and visualizing them against Seoul’s administrative boundary layers. The purpose of this first section is exploratory: to inspect the annual spatial distribution of reported flood-inundation damage before constructing dong-year summaries, recurrence measures, or cluster typologies.
1. Basic visualization and data preparation
The raw flood-damage data are stored as annual point shapefiles. The seoul_EMD and seoul_SGG shapefiles are polygon boundary layers used as map context: EMD boundaries provide the finer administrative-dong geography, while SGG boundaries provide the higher-level district geography. The flood-damage attributes are read from the annual point files only.
The resulting object, flood_points, is a long-form sf point layer that combines all available annual flood-damage records. It retains the original raw flood fields, including ADM_CD, F_ZONE_NM, F_YR, F_AREA, F_SHIM, and F_AVG_HGT. The EMD and SGG polygon layers are retained separately as contextual boundary layers for visualization.
For the interactive map, the substantive time unit is the reported flood year, F_YR. Rather than using leaflet.extras2::addTimeslider(), which can behave poorly when many points share the same timestamp, this map uses a small custom JavaScript slider with one step per reported year. Moving the slider filters the displayed points directly by F_YR.