How dbstkdgh/cpt4 works
This repository contains Streamlit dashboards for mapping anomalous-motive crime locations and regional risk. The user selects an all-time, yearly, daily, or prediction view; the app loads crime, indicator, prediction, and province-boundary data, then renders a map and (in some versions) regional risk summaries. The four scripts are standalone variants rather than a shared package. The excerpts show their loading, map, and risk behavior, but the README gives no implementation detail; only the visible calls and data paths are represented.
Main entry points: real.py Deployed map variant · app2.py Dashboard variant · lab5.py Alert map variant · 15~25년도 이상동기(도단위추가)_with_coords_openai.csv Crime locations
Components 15
Dashboard variants
- Dashboard app
app.py - Dashboard variant
app2.py - Alert map variant
lab5.py - Deployed map variant
real.py
Data inputs
- Crime locations
data/15~25년도 이상동기(도단위추가)_with_coords_openai.csv - Risk indicators
data/지표데이터(4대범죄추가계산).csv - Prediction data
data/predict.csv - Prediction data path
- Province boundaries
Mapping and risk
- Load and prepare data
real.py - Regional risk scoring
real.py - Interactive map
real.py - Regional risk table
real.py
Other components
- Dashboard user
- GeoJSON source
Connections 21
- Dashboard user → Deployed map variant: selects view
real.py - Deployed map variant → Load and prepare data: loads data
real.py - Load and prepare data → Crime locations: reads locations
real.py - Load and prepare data → Risk indicators: reads indicators
real.py - Load and prepare data → Prediction data: reads predictions
real.py - Deployed map variant → GeoJSON source: fetches boundaries
real.py - GeoJSON source → Province boundaries: returns GeoJSON
- Deployed map variant → Interactive map: creates map
real.py - Deployed map variant → Regional risk table: builds summary
real.py - Interactive map → Regional risk scoring: calculates scores
real.py - Interactive map → Province boundaries: renders regions
real.py - Dashboard user → Dashboard app: selects view
app.py - Dashboard app → Prediction data path: uses prediction path
app.py - Dashboard user → Dashboard variant: selects view
app2.py - Dashboard variant → Crime locations: loads locations
app2.py - Dashboard variant → Risk indicators: loads indicators
app2.py - Dashboard variant → Prediction data path: uses prediction path
app2.py - Dashboard user → Alert map variant: selects view
lab5.py - Alert map variant → Crime locations: loads locations
lab5.py - Alert map variant → Risk indicators: loads indicators
lab5.py - Alert map variant → Prediction data path: uses prediction path
lab5.py