Rosalie

Interactive energy data mapping for Lancaster County

Rosalie is an interactive energy data platform that consolidates fragmented property, building, and energy data for Lancaster County, Pennsylvania into a unified mapping tool. It visualizes roughly 169,000 parcels with their building attributes, fuel types, energy burden metrics, and socioeconomic data — enabling energy program administrators to identify and prioritize homes that need efficiency improvements most, without door-to-door visits.

Technical Approach

The platform renders 169,000 parcels using vector tiles served by Martin from PostGIS, replacing an earlier prototype that loaded 193 chunked GeoJSON files client-side. This enables sub-second map renders with progressive loading and client-side filtering via MapLibre GL expressions. The frontend is built with React 19, TanStack Router, and Zustand for map state management, with Ant Design providing the filter and data display components.

The backend uses FastAPI with SQLAlchemy and GeoAlchemy2 for spatial queries against PostgreSQL with PostGIS. Three data sources are joined spatially: county property assessor records (parcels and structures), Census Bureau TIGER/Line tract boundaries, and Department of Energy LEAD data for energy affordability metrics. Rather than pre-aggregating, the system stores granular LEAD records and computes tract summaries on the fly, supporting flexible future analysis.

Key Decisions

Vector tiles via Martin over client-side GeoJSON for rendering 169,000 parcels without browser memory issues. PostGIS spatial indexing for bounding box queries and parcel-to-tract joins. A CSS filter-based dark mode that inverts the entire map container with pre-compensated overlay colors, avoiding the flicker of loading separate tile sets. Multi-layer tile warming with device-adaptive cache sizing preloads the entire county during the initial hero screen.

Renders 169,000 parcels as vector tiles with sub-second pan and zoom performance, consolidating energy data from multiple county and utility sources.