# Malawi Health Facility Accessibility Dashboard
A **Databricks Data App** built with Dash and Folium that visualises the location and population accessibility of health facilities across Malawi. It allows users to simulate the addition of up to 30 optimally-placed new facilities and instantly see the projected improvement in population coverage.
---
World Bank Data Analytics:
Malawi Geospatial Hub:
## Table of Contents
- Overview
- Features
- Project Structure
- Architecture
- Data Sources
- Prerequisites
- Local Setup
- Environment Variables
- Running the App
- Deploying to Databricks Apps
- How the Optimisation Logic Works
- Troubleshooting
---
## Overview
This dashboard is part of the **GoAT (Geospatial Optimisation and Accessibility Tool)** initiative. It connects to Unity Catalog tables in Databricks to visualise:
- All **existing** health facilities in Malawi (~1,258 sites)
- **Proposed new** facility locations ranked by optimisation score
- **Population accessibility** percentage before and after simulated additions
The optimisation is pre-computed using an Integer Linear Programming (ILP) model (Gurobi) and stored in a results table. The app reads and visualises those results interactively.
---
## Features
- **Interactive Folium map** — dark-themed, with layer controls and hover tooltips
- **Orange markers** — existing health facilities
- **White markers (sky-blue ring)** — proposed new facilities
- **KPI scorecards** — existing count, new count, accessibility %, total facilities
- **Slider (0–30)** — simulate adding 1 to 30 new facilities in real time
- **In-memory TTL cache** — Databricks is queried once per session; subsequent interactions are instant
- **OAuth M2M authentication** — service principal credentials for secure production access
---
## Project Structure
```
your-app/
│
├── app.py # Dash application — layout, callbacks, UI
├── queries.py # QueryService singleton — Databricks SQL + cache
├── utils.py …