jmhan09/exposure
Japan Building-Exposure Dashboard
Interactive map of Japan's building exposure that disaggregates from the national total down to individual roofs as you zoom:
Hex size refines as you zoom (H3 res 4→7). A left-panel dropdown colours the admin hexes by attribute (construction type, storeys, floor area, year built, total). A context-aware legend and a decadal trend panel are included.
Run
Option A — Streamlit (recommended)
pip install -r requirements.txt
streamlit run streamlit_app.pyOpens at http://localhost:8501 and embeds the map (it boots the Flask server on port 8000 in the background).
Option B — Flask directly
pip install flask
python app.py # then open http://localhost:8000/hexOnly flask is needed to serve the prebuilt data in data/. The heavier geo libraries are only needed to rebuild the data (below).
Data (prebuilt, in data/)
admin_hex.json— multi-resolution H3 tiling of the MLIT N03 boundaries, tagged with prefecture/municipality codes.estat_attributes.json— e-Stat 2018 dwelling attributes per area (total, structure, storeys, floor area, year).base_buildings.geojson/building_points.json— PLATEAU footprints + points for the ingested cities (structure / year / floor area where the product carries them).districts.json,decadal_dwellings.csv,japan_prefecture_*.csv,ms_japan_hex.json.
Rebuild the data
python rebuild_all.py --city "Name=<path-to-PLATEAU-zip-or-bldg-dir>" # PLATEAU footprints
python make_points.py # hex points
python estat_extract.py build data/estat_attributes.json # e-Stat attributes
python build_admin_hex.py 4 5 6 7 # admin H3 tilingRaw source data (PLATEAU CityGML, MLIT N03 shapefile, e-Stat xlsx, Microsoft footprints) is not committed — see the build scripts for the expected inputs.
Important limits
- Units: admin layers are dwellings (戸数); PLATEAU layers are buildings (棟数) — kept distinct on purpose. The national building register is ~58.8M 棟 (固定資産概要調書).
- Municipality coverage: the bundled e-Stat national tables only break out the 21 major cities; other areas show their prefecture value.
- Replacement ¥ and peril coefficients are illustrative placeholders — calibrate before any reporting use.
Sources: PLATEAU (MLIT), 固定資産概要調書 (総務省), Housing & Land Survey (Statistics Bureau, e-Stat), MLIT N03 administrative boundaries, Microsoft GlobalML building footprints.
