Busabase
Busabase is an open-source (MIT) database and workspace for AI agents — data, docs, skills, and apps in one place. Run it locally, self-host it inside your network, or use Busabase Cloud, and turn age
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗An interactive dashboard for exploring BBMP's 198 wards and the borewell sensors reporting inside them. Built by the Indian Institute of Science team for BWSSB.
data/*.json shipped with the site, or (b) call a Cloudflare Worker + D1 API. Switch via js/config.js.If you're brand new here, read START_HERE.md first — it walks through viewing locally, publishing to GitHub Pages, and refreshing data.
Dashboard_IISC_for_BWSSB/
index.html Dashboard entry (map + overlays). Includes Leaflet + Chart.js via CDN.
css/style.css All styles. Slate/teal palette, minimal chrome, no default sidebars.
js/ Front-end, split from the former single app.js into ordered
classic scripts that share one global scope (zero build step).
config.js Data source switch: "static" (JSON files) or "api" (Worker).
session-quality.js Pump-session quality policy (parity with backend).
state/store.js Single source of truth for mutable state + Store.set/subscribe.
config/constants.js Lens guard, trend thresholds, palette, notifyError banner.
core/api.js Data-access layer: urlOf/seriesUrlOf, resilient getJson, analytics loaders.
core/classification-helpers.js Ward style/status/colour helpers + shared utils.
core/groundwater.js Groundwater criticality (Theil-Sen + linear + Modified MK), lens logic.
core/data.js boot(), loadData, sensor-inventory merge, point-in-polygon.
ui/selection.js Pan / ward selection, choropleth palette, choroColor.
ui/metrics-query.js KPI cards, metrics, common query, presets.
ui/map-layers.js initMap, ward + sensor rendering, legend.
ui/controls.js Toolbar, overlays, search, filters.
ui/detail.js Ward + sensor detail panels.
ui/charts.js Session reconstruction + water/discharge/modal charts.
bootstrap.js fmtDate, rainfall CSV, global listeners, final boot() call (loads last).
app.js DEPRECATED placeholder (old monolith); no longer loaded.
See docs/ARCHITECTURE.md for the module map and load order.
data/ Data files served by the static site.
manifest.json Snapshot summary (KH ZIP name, dates, counts).
wards.geojson 198 ward polygons + area, population, sensor counts.
sensors.json Per-sensor metadata (uid, lat, lng, ward, HP, depth, coverage).
sensor_series/<uid>.json Per-sensor time series (water level, discharge, cumulative yield).
backend/ Python scripts that build data/ from raw sources.
prepare_data.py Reads KH ZIP + ward shapefile + population xlsx -> writes data/*.
sensors_db_extract.py Pulls sensors table from your Neon Postgres DB (adds motor HP + full UID list) -> data/sensors_db.json.
requirements.txt
worker/ Cloudflare Worker + D1 (optional, for scale).
src/index.js The Worker itself: JSON API over the D1 database.
wrangler.toml Worker + D1 binding config. Fill in your D1 database_id.
schema.sql D1 tables: wards, sensors, sensor_series, snapshots.
seed_d1.py Reads ../data/*.json and writes seed_generated/*.sql for wrangler to execute.
seed_generated/ (git-ignored) chunked SQL files produced by seed_d1.py.
README.md End-to-end D1 deploy steps.
.github/workflows/deploy.yml GitHub Actions: on push to main -> deploy static site to GitHub Pages.
.gitignore Excludes _to_delete/, .env, __pycache__, seed_generated/, etc.
start_server.bat One-click local dev server (Windows).
START_HERE.md Quickstart for viewing, publishing, refreshing data.
README.md (this file)
Two swappable data modes, one frontend:
Static mode (default)
─────────────────────
┌────────────┐ fetch ┌───────────────┐
│ Browser │────────>│ GitHub Pages │──> serves data/*.json directly
└────────────┘ └───────────────┘
API mode (Cloudflare + D1)
─────────────────────────
┌────────────┐ fetch ┌────────────────┐ SQL ┌───────┐
│ Browser │────────>│ Cloudflare Wkr │───────>│ D1 │
└────────────┘ └────────────────┘ └───────┘
(js/config.js chooses which)
The static mode has zero moving parts and is fine while total data stays under a few hundred MB. The API mode scales to years of historical data on Cloudflare's free tier (5 GB D1, 100k Worker requests/day) and is the path for when you want the dashboard to answer live queries.
borewell_water_level_200826.zip) with one .xlsx per sensor for the current reporting window (currently 15 Jul – 20 Aug 2026, 579 sensors).bbmpwards.zip shapefile (198 wards, sits in the sibling bbmp-borewell-dashboard repo).population_source.xlsx in the sibling bbmp-borewell-backend/exports/.sensors table, populated by the existing sync_kh_device_metadata.py script that scrapes KH.backend/prepare_data.py orchestrates all of the above and writes the JSON files under data/.
Sessions start at any cumulative-yield decrease or a time gap above 30 minutes. All readings and sessions are retained, including single-reading sessions and sessions with missing water-level endpoints. The four KH flags are fewer than 3 readings, no yield advance, a water-level step above 20 ft, and negative endpoint drawdown. Zero drawdown is not a net level rise. Missing water/yield readings are additional dashboard checks.
The following inclusion policy is our dashboard interpretation, not a claim that KH deletes these sessions:
Eligibility is separate from status. Volume requires at least two readings, complete yield readings and positive yield advance. Drawdown requires at least three readings, complete levels, no >20 ft jump and positive endpoint drawdown. Specific-capacity eligibility requires both. An excluded two-reading session can still have measurable volume. Eligibility is a screening decision, not calibration or proof that a sensor measurement is accurate. No automatic corrections occur.
The sensor table lists every session, reasons, observed values and eligible calculations, with pagination and CSV download. All retained sessions are shown initially; the selector can show OK only, flagged only, or excluded only in the table and charts. Counts cover the full history; chart range buttons only limit chart dates. Chart colours indicate session status. Discharge comes directly from flow_lpm, not water level or yield differences; flow accuracy is not separately validated. Yield-counter problems do not establish that discharge is zero.
backend/session_quality.py is the versioned policy shared by the build and the
JSON refresh. js/session-quality.js provides a tested equivalent fallback for
older data/API responses. Backend annotations take precedence at matching version.
Run python backend/refresh_session_quality.py to refresh the existing snapshot
without rereading the Excel ZIP. It verifies raw arrays remain unchanged and writes
data/session_quality_summary.json. Run python backend/test_session_quality.py
for policy and backend/browser parity tests.
sensors_db_extract.py has run, this includes KH's full inventory beyond the 579).Both flows are one push. Full commands in START_HERE.md.
# refresh data snapshot
cd backend && python sensors_db_extract.py && python prepare_data.py
# publish
cd ..
git add . && git commit -m "Refresh snapshot" && git push
# GitHub Actions deploys to Pages in ~1 minute
Original build: Vishwas Prabhakara (IISc), assisted by Claude Code. See individual READMEs in backend/ and worker/ for the finer details.