CoolFace
Apppublic

jmhan09/exposure

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
App README

Japan Building-Exposure Dashboard

Interactive map of Japan's building exposure that disaggregates from the national total down to individual roofs as you zoom:

ZoomLayerSourceUnit
National → prefectureH3-hex choropleth (47)e-Stat Housing & Land Survey 2018戸数 dwellings
Municipalityhexes for 21 major cities (else prefecture)e-Stat 2018戸数 dwellings
CityPLATEAU footprint hexes (ingested cities)PLATEAU (MLIT)棟数 buildings
Roofindividual building footprints + attributesPLATEAU (MLIT)棟数 buildings

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)

bash
pip install -r requirements.txt
streamlit run streamlit_app.py

Opens at http://localhost:8501 and embeds the map (it boots the Flask server on port 8000 in the background).

Option B — Flask directly

bash
pip install flask
python app.py            # then open http://localhost:8000/hex

Only 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

bash
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 tiling

Raw 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.