Skip to content

codesydney/hsd-ngo

Repository files navigation

NSW Human Services Data Hub - NGO Providers Explorer

A FastAPI-based web application for exploring NGO providers and services across New South Wales, using data from the Human Services Data Hub – NGO Providers 2014‑15.

Features

  • 🔍 Search providers by name, program, or location
  • 🏥 Filter by Local Health District
  • 🏛️ Filter by Commissioning Agency
  • 📊 Browse paginated provider listings
  • 📱 Mobile-first responsive design
  • 🎨 Clean black and white Vibecamp design system

Project Structure

hsd-ngo/
├── app/
│   ├── models/          # Database models
│   ├── controllers/     # Business logic
│   ├── routes/          # API routes
│   ├── templates/       # Jinja2 templates
│   ├── static/          # Static files (CSS, images)
│   └── database.py      # Database configuration
├── scripts/
│   └── load_data.py     # CSV data loader
├── main.py              # Application entry point
├── requirements.txt     # Python dependencies
├── Dockerfile          # Container configuration
└── fly.toml            # Fly.io deployment config

Setup

1. Install Dependencies

pip install -r requirements.txt

2. Download Data

Download the CSV file from: https://data.nsw.gov.au/data/dataset/0d915408-0026-44f7-a477-5f29ad7708ea/resource/0ad7196f-f7e8-45fd-957d-79394255b0ef/download/tab-b-open-data-r020-hsdh-2014-2015.csv

3. Load Data

python scripts/load_data.py tab-b-open-data-r020-hsdh-2014-2015.csv

4. Run Application

uvicorn main:app --reload

The application will be available at http://localhost:8000

API Endpoints

Web Routes

  • GET / - Home page with search and stats
  • GET /providers - Browse providers with filters and pagination

API Routes

  • GET /api/v1/providers - List providers (JSON)
  • GET /api/v1/providers/{id} - Get provider by ID
  • GET /api/v1/filters - Get available filter values

Deployment

Fly.io

  1. Deploy:
flyctl deploy
  1. Load data (after deployment):
# SSH into the machine
flyctl ssh console -a hsd-ngo

# Download CSV and load
# Option 1: Upload CSV via SFTP, then run:
python scripts/load_data.py /path/to/data.csv

# Option 2: Download CSV directly on the machine:
curl -o data.csv "https://data.nsw.gov.au/data/dataset/0d915408-0026-44f7-a477-5f29ad7708ea/resource/0ad7196f-f7e8-45fd-957d-79394255b0ef/download/tab-b-open-data-r020-hsdh-2014-2015.csv"
python scripts/load_data.py data.csv

Data Attribution

Data sourced from Human Services Data Hub – NGO Providers 2014‑15, Government of New South Wales, licensed under Creative Commons Attribution (CC BY 3.0 AU).

License

This project is open source. The data is licensed under CC BY 3.0 AU.


A Vibecamp Creation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published