Kodelinesoftware engineering
Geospatial · MarTech

Built an Angular/Firebase web app for Berlin campaign planning with statistical CSV datasets, Google Maps polygons, overlap-based Zustellbezirk calculation, cost visibility, PDF/KML polygon export, and CSV handover.

References
Technical scope

Custom web app for data-driven delivery district planning

Statistical result layers, BWB/UWB/PLZ/district filters, min/max values, AND/OR polygon logic, KML delivery districts, saved selections, PDF/KML polygon export, and CSV export.

Before

Campaign areas, statistical results, delivery districts, household counts, and costs had to be compared manually across spreadsheets, maps, and KML data.

After

Postwurfmanager turns statistical filters into visible map polygons, calculates matching Zustellbezirke by overlap percentage, shows selectable cost data, and exports operational delivery-district IDs.

System context

Production platform, not a reporting demo.

Postwurfmanager helps users plan area-based distribution campaigns in Berlin without operating professional GIS software. The application combines parsed statistical datasets, Google Maps polygon rendering, BWB/UWB/PLZ/Bezirk filters, overlap-based Zustellbezirk matching, campaign cost visibility, saved selections, and PDF/KML/CSV exports in one browser workflow.

Engineering challenge

Statistical datasets had to become operational delivery districts.

The product needed to connect election and demographic CSV data with map-based polygon selection and postal delivery-district KML files. Users had to filter complex statistical results, understand the selected Berlin areas visually, calculate matching Zustellbezirke, and export delivery-district IDs for downstream campaign execution.

  • Google Maps view centered on Berlin
  • Selection panel for multiple parsed statistical result datasets
  • Region narrowing by BWB, UWB, PLZ, Bezirk, and related area types
  • Min/max value filters for individual statistical result entries
  • AND/OR logic for combining selected criteria
  • Cost visibility for maximum budget and selected households
  • PDF, KML, and CSV export for handover and documentation
Architecture

Angular and Firebase kept the map workflow fast and deployable.

The Angular frontend owns the interactive planning workflow: dataset selection, filter controls, map overlays, delivery-district review, manual polygon selection, and exports. Firebase Hosting, Firestore, and Cloud Functions provide deployment, persistence for saved selections and metadata, and backend support for processing where the workflow needs it.

  • Angular UI for map-heavy planning and fast filter iteration
  • Firestore data model for datasets, metadata, saved selections, and reusable planning state
  • Firebase Hosting deployment for a low-maintenance operational webapp
  • Cloud Functions integration for backend-side workflow support
  • Google Maps JavaScript API for polygon rendering and map interaction
Polygon logic

Overlap percentage turns visual polygons into selectable Zustellbezirke.

The system calculates delivery districts from KML polygons against the currently displayed result polygons. A configurable overlap percentage controls the strictness: at 99%, a Zustellbezirk must lie at least 99% inside the selected result polygon before it is automatically selected. Users can then manually select or deselect polygons for a better operational fit.

  • Automatic Zustellbezirk matching from KML polygon data
  • Configurable overlap threshold for stricter or broader selection
  • Manual polygon select and deselect after automatic matching
  • Per-polygon context such as bewerbbare Haushalte, net price, and Zustellstuetzpunkt
  • Final CSV export of selected Postzustell IDs
Planning workflow

From statistical CSV data to delivery-district export

Postwurfmanager connects dataset import, map selection, polygon matching, cost control, and operational CSV export in one workflow.

Dataset Selection

The home view lists parsed statistical results such as Europawahl 2024, Abgeordnetenhauswahl 2023, Bundestagswahl 2021, and other imported datasets. Users select relevant result entries and apply filters before the map updates.

  • Multiple statistical result layers at the same time
  • Per-entry min/max threshold filters
  • Maximum mailing cost and selected-household cost visibility
  • Immediate map feedback for selected Berlin areas

Map and Polygon Review

The Google Maps view renders selected BWB and UWB polygons, calculated result areas, and matched Zustellbezirke. The planning process stays visual while still producing operational delivery-district data.

  • BWB and UWB polygon rendering
  • Matched Zustellbezirke shown after calculation
  • Household and cost data in polygon context
  • Manual correction of automatically calculated selections

Data Management

The Datensaetze verwalten view lets users upload statistical CSV data so new result layers become available for filtering in the selection screen.

  • CSV upload for statistical datasets
  • Reusable dataset metadata for the planning interface
  • Saved selections for iterative campaign planning
  • PDF/KML polygon export and CSV district handover
Engineering

Technical contribution

  • Angular webapp implementation for interactive map planning
  • Firebase Hosting deployment and Firestore data modeling
  • Firebase Cloud Functions integration
  • Google Maps interaction and polygon overlay logic
  • Multi-layer statistical result selection
  • Region narrowing by BWB, UWB, PLZ, Bezirk, and related region types
  • Min/max value filtering for individual result entries
  • AND/OR polygon combination workflow
  • KML-based Zustellbezirk polygon handling
  • Overlap-percentage delivery-district calculation
  • Manual polygon selection correction
  • Cost display for selected households and campaign budget
  • Saved-result workflow
  • PDF and KML export for selected polygons
  • CSV export for selected Postzustell IDs
Impact:

Business impact

The application replaces manual spreadsheet and map comparison with an interactive planning workflow. Users can explore Berlin visually, refine target areas, calculate overlapping Zustellbezirke, control campaign costs, and export the final delivery-district IDs without direct GIS expertise.

  • Faster delivery-district selection
  • Visual validation of campaign areas on Google Maps
  • Precise filtering by statistical result layers, regions, and value ranges
  • Overlap-based delivery-district matching from KML polygon data
  • Manual correction before final district export
  • Campaign cost visibility during selection
  • PDF/KML documentation and CSV handover for downstream operations