CoolFace
Apppublic

Chunwei0518/taiwan-building-permits-api

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

Taiwan Building Permits — API

Read-only JSON API serving aggregated Taiwan building-permit data from SQLite. Frontend lives on Netlify (https://cianru-taiwan-building-permits.netlify.app/) and calls this Space for every query.

Endpoints

  • GET /api/health — DB health + schema version
  • GET /api/filters — available cities / years / permit types / districts
  • GET /api/overview?... — aggregated metrics for a filter set
  • GET /api/records?... — paginated row data, supports date_from, date_to, city, year, permit_type, district, keyword, page, page_size
  • GET /api/records/<record_id> — single record detail

DB Provisioning

The SQLite database (~1.1 GB) is fetched once on container boot from the companion GitHub Release:

https://github.com/Chunweiwu518/taiwan_building_permits/releases/download/db-latest/permits_platform.db

The URL is overridable with the PERMITS_DB_URL env var. First boot takes ~30–90 s depending on bandwidth; the DB is then cached on the Space's ephemeral disk for as long as the container stays warm.

Source

Full project (crawlers, importer, tests) lives on GitHub: Chunweiwu518/taiwan_building_permits