Skip to content

Experimental mapping project that uses open source data from the City of Seattle data portal

Notifications You must be signed in to change notification settings

lukaskucinski/development_pulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Development Pulse

Neighborhood investment momentum tracker for Seattle, WA. Aggregates building permits, business licenses, and other municipal data to create development momentum scores.

Features

  • Momentum Scoring: Combines permit activity, new business formation, and investment values into a 0-100 momentum score
  • Interactive Map: Visualize momentum scores, permits, and business licenses on a map
  • Time Slider: Animate through historical data to see how development patterns change
  • Neighborhood Rankings: See which neighborhoods have the highest development activity
  • Data Layers: Toggle between momentum heatmap, individual permits, and business licenses

Project Structure

development_pulse/
├── backend/                 # FastAPI Python backend
│   ├── api/                # API route handlers
│   ├── models/             # SQLAlchemy database models
│   ├── schemas/            # Pydantic request/response schemas
│   ├── services/           # Business logic (data ingestion, scoring)
│   ├── config.py           # Configuration management
│   ├── database.py         # Database connection
│   ├── main.py             # FastAPI application entry point
│   └── requirements.txt    # Python dependencies
│
├── frontend/               # React TypeScript frontend
│   ├── src/
│   │   ├── components/    # React components
│   │   ├── api.ts         # API client
│   │   ├── types.ts       # TypeScript types
│   │   └── App.tsx        # Main application
│   ├── package.json       # Node dependencies
│   └── vite.config.ts     # Vite configuration
│
└── README.md

Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • npm or pnpm

Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Copy the example environment file:

    cp .env.example .env
  5. Start the backend server:

    python main.py

    Or with uvicorn directly:

    uvicorn main:app --reload --host 0.0.0.0 --port 8000
  6. The API will be available at http://localhost:8000

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev
  4. Open http://localhost:3000 in your browser

Loading Data

Once both servers are running:

  1. Open the app in your browser
  2. Click the "Data" button in the top-left
  3. Click "Ingest Permits" to load Seattle permit data (takes a few minutes)
  4. Click "Ingest Licenses" to load business license data
  5. Click "Calculate Scores" to compute momentum scores

The data ingestion fetches 3 years of historical data from the Seattle Open Data Portal.

API Endpoints

Momentum

  • GET /api/momentum/current - Current momentum scores for all neighborhoods
  • GET /api/momentum/history/{neighborhood} - Historical scores for a neighborhood
  • GET /api/momentum/ranking - Neighborhoods ranked by momentum score
  • GET /api/momentum/hot-spots - High-momentum neighborhoods

Permits

  • GET /api/permits - List permits with pagination
  • GET /api/permits/geojson - Permits as GeoJSON for map display
  • GET /api/permits/clusters - Aggregated permit data by neighborhood
  • GET /api/permits/stats - Permit statistics

Licenses

  • GET /api/licenses - List business licenses with pagination
  • GET /api/licenses/geojson - Licenses as GeoJSON for map display
  • GET /api/licenses/stats - License statistics

Neighborhoods

  • GET /api/neighborhoods - List all Seattle neighborhoods
  • GET /api/neighborhoods/boundaries - Neighborhood boundaries as GeoJSON

Data Ingestion

  • POST /api/ingest/permits - Trigger permit data ingestion
  • POST /api/ingest/licenses - Trigger license data ingestion
  • POST /api/ingest/calculate-scores - Calculate momentum scores
  • GET /api/ingest/status - Current data ingestion status

Momentum Score Calculation

The momentum score (0-100) is a weighted combination of:

Component Weight Description
Permit Score 40% Based on number of building permits
Business Score 30% Based on new business licenses
Investment Score 30% Based on total permit values

Each component is normalized using logarithmic scaling to handle the wide range of values across neighborhoods.

Data Sources

Tech Stack

Backend

  • FastAPI - Modern Python web framework
  • SQLAlchemy - Database ORM
  • SQLite - Database (can swap for PostgreSQL/PostGIS)
  • Pydantic - Data validation

Frontend

  • React 18 - UI framework
  • TypeScript - Type safety
  • Vite - Build tool
  • react-map-gl - Mapbox GL JS wrapper
  • TanStack Query - Data fetching
  • Tailwind CSS - Styling
  • Recharts - Charts

Future Enhancements

  • Add historical comparison view
  • Implement noise/soundscape layer
  • Add 311 complaint data
  • Restaurant/retail trend analysis
  • Export reports as PDF
  • User accounts and saved areas
  • Email alerts for neighborhood changes

License

MIT

About

Experimental mapping project that uses open source data from the City of Seattle data portal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published