Commit Graph
72 Commits
Author SHA1 Message Date
robbertjanssen85andClaude Opus 4.7 e775f7d931 Show parcel point opening hours in webapp popups
Carrier hours are now normalised in the Python pipeline (DHL, DPD, GLS,
PostNL, ViaTim, InPost — covering 75% of all points), written into the
per-municipality GeoJSON, and rendered as a weekly table (or single line
where the source only exposes a free-text window) in both the simple and
detailed marker popups. Regenerated data for all 342 municipalities.

Also: drop the legacy Folium HTML viewer from main.py (Next.js webapp is
the only supported frontend), and capture GLS openingHours/vacations in
the upstream cache.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 07:13:40 +02:00
GitHub Actions Bot 84570683ae 🤖 Update pakketpunten data - 2026-05-18 06:41 UTC 2026-05-18 06:41:40 +00:00
GitHub Actions Bot 3d376f3193 🤖 Update pakketpunten data - 2026-05-11 06:29 UTC 2026-05-11 06:29:04 +00:00
GitHub Actions Bot 07fcb2d694 🤖 Update pakketpunten data - 2026-05-04 06:04 UTC 2026-05-04 06:04:03 +00:00
GitHub Actions Bot 162ebe1c0b 🤖 Update pakketpunten data - 2026-04-27 05:36 UTC 2026-04-27 05:36:44 +00:00
GitHub Actions Bot ee011aaeac 🤖 Update pakketpunten data - 2026-04-20 05:28 UTC 2026-04-20 05:28:23 +00:00
GitHub Actions Bot 3d9db849e2 🤖 Update pakketpunten data - 2026-04-13 05:29 UTC (* Budbee used previous cache) 2026-04-13 05:29:07 +00:00
GitHub Actions Bot 34ceb4272a 🤖 Update pakketpunten data - 2026-04-06 10:57 UTC 2026-04-06 10:57:33 +00:00
GitHub Actions Bot e1725b129f 🤖 Update pakketpunten data - 2026-04-06 05:14 UTC 2026-04-06 05:14:48 +00:00
GitHub Actions Bot 41cd8396c6 🤖 Update pakketpunten data - 2026-03-30 05:13 UTC 2026-03-30 05:13:57 +00:00
GitHub Actions Bot 169d2d7615 🤖 Update pakketpunten data - 2026-03-23 20:22 UTC 2026-03-23 20:22:18 +00:00
GitHub Actions Bot c30856acb2 🤖 Update pakketpunten data - 2026-03-23 13:34 UTC 2026-03-23 13:34:34 +00:00
robbertjanssen85andClaude Opus 4.6 8e09a96141 Add ViaTim, InPost, and Budbee as new parcel point providers
- ViaTim: 393 NL service points via public REST API (no auth)
- InPost: 934 operating PUDO/locker locations via EasyPack API (no auth)
- Budbee: 281 parcel lockers from DPD cache + OpenStreetMap

Backend:
- Add fetch scripts: viatim_fetch_all.py, inpost_fetch_all.py, budbee_fetch_all.py
- Add get_data_viatim(), get_data_inpost(), get_data_budbee() to api_client.py
- Wire into get_data_pakketpunten() pipeline

Frontend:
- Add provider colors, logos, and filter entries across all components
- Real brand logos: ViaTim (magenta VA monogram), InPost (yellow burst),
  Budbee (green wordmark)
- Update type definitions, AboutModal data sources

CI/CD:
- Add fetch steps for ViaTim, InPost, Budbee to weekly update workflow
- Include new cache files in git commit step

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:53:10 +01:00
GitHub Actions Bot e486c3a6ca 🤖 Update pakketpunten data - 2026-03-23 04:54 UTC 2026-03-23 04:54:29 +00:00
GitHub Actions Bot 94db5c7598 🤖 Update pakketpunten data - 2026-03-16 05:09 UTC 2026-03-16 05:09:46 +00:00
GitHub Actions Bot ac34c85299 🤖 Update pakketpunten data - 2026-03-09 04:42 UTC 2026-03-09 04:42:56 +00:00
GitHub Actions Bot 99cec5e159 🤖 Update pakketpunten data - 2026-03-02 15:49 UTC 2026-03-02 15:49:37 +00:00
GitHub Actions Bot a4efac3d24 🤖 Update pakketpunten data - 2026-03-02 04:40 UTC 2026-03-02 04:40:56 +00:00
GitHub Actions Bot dcda77b424 🤖 Update pakketpunten data - 2026-02-23 04:49 UTC 2026-02-23 04:49:01 +00:00
GitHub Actions Bot 0219b6abf8 🤖 Update pakketpunten data - 2026-02-16 04:53 UTC 2026-02-16 04:53:12 +00:00
GitHub Actions Bot 7814ae32fd 🤖 Update pakketpunten data - 2026-02-09 21:57 UTC 2026-02-09 21:57:36 +00:00
GitHub Actions Bot f3b11a00bb 🤖 Update pakketpunten data - 2026-02-09 04:51 UTC 2026-02-09 04:51:16 +00:00
GitHub Actions Bot d039a317da 🤖 Update pakketpunten data - 2026-02-02 04:53 UTC 2026-02-02 04:53:35 +00:00
GitHub Actions Bot 8de96634ca 🤖 Update pakketpunten data - 2026-01-26 04:24 UTC 2026-01-26 04:24:49 +00:00
GitHub Actions Bot b3710daf00 🤖 Update pakketpunten data - 2026-01-19 04:08 UTC 2026-01-19 04:08:53 +00:00
GitHub Actions Bot 90cf14b7a2 🤖 Update pakketpunten data - 2026-01-12 04:06 UTC 2026-01-12 04:06:07 +00:00
robbertjanssen85andClaude Opus 4.5 fdaa241798 Add GLS and FedEx carriers with pickup/dropoff service info
- Add GLS and FedEx data fetching scripts (Playwright-based)
- Add GLS and FedEx cache files for nationwide data
- Update api_client.py with GLS and FedEx support
- Add canPickup/canDropoff fields to all carriers
- Update webapp with service filters (Ophalen/Verzenden)
- Add visual indicators for pickup-only/dropoff-only locations
- Update GitHub workflow to fetch GLS/FedEx data
- Add GLS logo

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 12:34:04 +01:00
GitHub Actions Bot 66e8d0b242 🤖 Update pakketpunten data - 2026-01-09 22:23 UTC 2026-01-09 22:23:52 +00:00
robbertjanssen85andClaude Opus 4.5 0f8898fccc Add Amazon Hub data source and improve polygon caching
- Add Amazon Hub Lockers & Counters data (1,217 locations)
  - Browser automation via Playwright to scrape amazon.nl/ulp
  - Search by municipality name with autocomplete selection
  - Cached in data/amazon_all_locations.json

- Implement persistent municipality polygon cache
  - Cache stored in data/municipality_polygon_cache.json
  - Time-based expiry: refreshes last week of June/December
  - Eliminates Overpass API timeouts during batch processing
  - All 342 municipalities pre-cached

- Update webapp About modal
  - Add Amazon as data source
  - Add academic paper link (CO2 impact of pickup points)
  - Update carrier status to include Amazon

- Improve municipality selector
  - Nederland now sticky at bottom of dropdown
  - Always visible regardless of search filter
  - Keyboard navigation includes Nederland option

- Regenerate all municipality GeoJSON files with Amazon data

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 22:34:30 +01:00
GitHub Actions Bot e1f22ac57f 🤖 Update pakketpunten data - 2026-01-05 05:01 UTC 2026-01-05 05:01:22 +00:00
robbertjanssen85andClaude Opus 4.5 136da4a511 Sync Nederland municipality history from snapshots
The update script was skipping nederland.geojson to avoid double-counting,
but this meant the Nederland row in the data matrix only had 2 weeks of
history. Now the script syncs the nederland municipality entry from the
snapshot totals on every run.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 09:54:44 +01:00
GitHub Actions Bot 897372ddae 🤖 Update pakketpunten data - 2025-12-29 04:28 UTC 2025-12-29 04:28:36 +00:00
robbertjanssen85andClaude Opus 4.5 64a685ce5a Backfill totals history from W47 onwards
- Added backfill script to extract historical data from git commits
- Populated 6 weeks of history (W47-W52)
- Fixed W52 data to match actual commit values
- Set minimum week to W47 (API improvements were made before this)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 10:28:49 +01:00
robbertjanssen85andClaude Opus 4.5 a14e7a5fd0 Add append-only totals history for weekly statistics
Replace git-based history extraction with a simpler append-only approach:
- New update_totals_history.py script appends weekly snapshots
- totals_history.json grows incrementally over time
- No more git history parsing needed for historical data
- Seeded with existing 2 weeks of data + current week

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 10:17:11 +01:00
GitHub Actions Bot 1205c4dfa1 🤖 Update pakketpunten data - 2025-12-22 04:22 UTC 2025-12-22 04:22:17 +00:00
robbertjanssen85andClaude Opus 4.5 b3f98f771b Replace Clearbit API logos with local logo files
- Add local SVG/PNG logos for all carriers (DHL, PostNL, DPD, Amazon, FedEx, VintedGo, De Buren)
- Update Map.tsx to use local logo paths instead of Clearbit API URLs
- Fixes 403 errors from Clearbit API blocking requests
- Update CLAUDE.md documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 09:14:20 +01:00
GitHub Actions Bot c265d28201 🤖 Update pakketpunten data - 2025-12-15 04:11 UTC 2025-12-15 04:11:34 +00:00
GitHub Actions Bot 1b99b73989 🤖 Update pakketpunten data - 2025-12-08 04:03 UTC 2025-12-08 04:03:05 +00:00
robbertjanssen85andClaude 3085b2dd16 Add historical trends to data matrix page
- Add scripts/generate_history.py to extract historical data from git commits
- Generate history.json with weekly snapshots (from W47 onwards)
- Add trend indicators (visible on hover) to overview stats
- Add clickable municipality rows with history modal showing:
  - Summary stats (current total, change since start)
  - Interactive line chart with recharts
  - Weekly data table with date ranges and differences
- Update GitHub Actions to generate history.json after data updates
- Fix AboutModal mobile clipping issue (reduce max-height)
- Mobile-responsive design for all new components

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 13:52:38 +01:00
GitHub Actions Bot 48c9289b08 🤖 Update pakketpunten data - 2025-12-01 08:52 UTC 2025-12-01 08:52:20 +00:00
GitHub Actions Bot 4592265f35 🤖 Update pakketpunten data - 2025-11-24 04:06 UTC 2025-11-24 04:06:48 +00:00
GitHub Actions Bot c1fe06268b 🤖 Update pakketpunten data - 2025-11-17 03:56 UTC 2025-11-17 03:56:56 +00:00
GitHub Actions Bot b0936e0d4c 🤖 Update pakketpunten data - 2025-11-10 12:22 UTC 2025-11-10 12:22:32 +00:00
robbertjanssen85andClaude 67735a986c Fix Rotterdam GeoJSON structure - add missing metadata
The previous commit used the wrong output format (from main.py instead of
batch_generate.py), which was missing the metadata object that the webapp
requires.

Fixed by regenerating with batch_generate.py which includes:
- metadata.providers (required by webapp)
- metadata.total_points
- metadata.bounds
- All 433 pakketpunten including 145 DHL locations with city center coverage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 11:08:10 +01:00
robbertjanssen85andClaude 30b59e5326 Update all municipality data with improved DHL cache (4,247 locations)
All municipalities regenerated with the complete DHL cache that includes:
- 132 additional DHL locations nationwide (+3.2%)
- Proper coverage of dense city centers (Amsterdam, Rotterdam, Utrecht, etc.)
- Fixed grid subdivision capturing locations down to 100m radius

Affected municipalities include:
- Rotterdam: 87 → 145 DHL locations (+67%)
- Amsterdam: Updated with new city center locations
- Plus 15 other municipalities with refined DHL coverage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 11:03:15 +01:00
robbertjanssen85andClaude 96d920548c Fix critical DHL grid fetch bugs and restore missing city center locations
## Problem
Rotterdam (and other cities) were missing 59+ DHL locations in city centers
(Beursplein, Coolsingel, Blaak, Markthal, Lijnbaan, etc.)

## Root Causes Fixed

1. **GitHub Actions workflow bug** (.github/workflows/update-data.yml)
   - Weekly workflow regenerated DHL cache but didn't commit it
   - Next week's run used stale October 26 cache
   - FIX: Added cache files to git commit step

2. **Grid subdivision minimum radius too large** (scripts/dhl_grid_fetch.py)
   - Was 2km minimum, too large for dense city centers
   - Dense areas hit 50-result API limit even at 2-5km radius
   - FIX: Changed minimum to 100m for deeper subdivision

3. **CRITICAL: Subdivision coordinate bug** (scripts/dhl_grid_fetch.py)
   - offset_km calculation treated meters as kilometers (5000m → 5000km!)
   - Generated coordinates in Antarctica/Arctic (lat 82°, lon -44°)
   - Subdivided cells were never processed properly
   - FIX: Added division by 1000 to convert meters → km

## Results

- DHL cache: 4,115 → **4,247 locations** (+132, +3.2%)
- Rotterdam: 87 → **145 DHL locations** (+58, +67%)
- **All city center locations restored** ✓

## Technical Details

- Grid fetch now subdivides: 10km → 5km → 2.5km → 1.25km → 625m → 312m → 156m
- Stops at 100m minimum or when results < 50
- 814 total API calls (590 initial + 224 subdivisions)
- Cache size: 18.6 MB (4,247 locations)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 10:55:32 +01:00
GitHub Actions Bot 164303c109 🤖 Update pakketpunten data - 2025-11-10 04:03 UTC 2025-11-10 04:03:40 +00:00
robbertjanssen85andClaude 3a8f616f90 Add den-bosch slug variation and reduce rate limit to 15/hour
Changes:
1. Added "den-bosch" as accepted slug variation for 's-Hertogenbosch
   - Now supports: den-bosch, den bosch, Den Bosch, 's-Hertogenbosch, etc.
   - Makes URL-style requests more intuitive (/api/v1/municipality/den-bosch)

2. Reduced rate limit from 100/15min to 15/hour
   - More conservative limit to prevent abuse
   - Still allows reasonable usage for legitimate users
   - Updated error messages and documentation

Technical Details:
- Rate limit: 15 requests per hour per IP address
- Rate limit window: 3600000ms (1 hour)
- Headers: X-RateLimit-Limit shows "15"
- Error message: "Maximum 15 requests per hour"

Files Modified:
- webapp/app/api/v1/municipality/[identifier]/route.ts
  - RATE_LIMIT: 100 → 15
  - RATE_LIMIT_WINDOW: 15min → 1hour
  - Added "den-bosch" to MUNICIPALITY_ALIAS_MAPPING
  - Updated error message text
- webapp/public/openapi.yaml
  - Updated rate limit documentation (3 locations)
  - Changed from "100 requests per 15 minutes" to "15 requests per hour"

Testing:
✅ curl /api/v1/municipality/den-bosch returns 's-Hertogenbosch
✅ X-RateLimit-Limit header shows "15"
✅ Production build successful

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 14:47:04 +01:00
robbertjanssen85andClaude 0653d746b2 Add comprehensive Dutch municipality name handling to REST API
Enhanced the REST API to accept 80+ alternative names and spellings for Dutch municipalities,
making it much more user-friendly for international and Dutch users alike.

Key Features:
- Alias mapping for common name variations (Den Haag, Den Bosch, The Hague, etc.)
- Support for official CBS names with apostrophes ('s-Gravenhage, 's-Hertogenbosch)
- Regional identifier variations (Bergen Noord-Holland, Hengelo (O), etc.)
- Fuzzy matching for typos and formatting differences
- 4-level matching strategy: slug → alias → CBS code → fuzzy

Supported Municipality Variations:

1. Den Haag / 's-Gravenhage (7 variations):
   - 's-Gravenhage, s-Gravenhage, sgravenhage, Den Haag, Haag, The Hague
   - Slug: den-haag | CBS: GM0518

2. 's-Hertogenbosch / Den Bosch (6 variations):
   - 's-Hertogenbosch, shertogenbosch, Den Bosch, Bosch
   - Slug: s-hertogenbosch | CBS: GM0796

3. Bergen (14 variations across 2 municipalities):
   - Bergen (NH.): Bergen Noord-Holland, Bergen (NH), Bergen NH, etc.
   - Bergen (L.): Bergen Limburg, Bergen (L), Bergen L, etc.

4. Regional Identifier Municipalities (36 variations):
   - Hengelo: Hengelo (O), Hengelo Overijssel, Hengelo (Gld), Hengelo Gelderland
   - Beek, Laren, Middelburg, Rijswijk, Stein (with/without region identifiers)

5. Special Cases (6 variations):
   - Valkenburg aan de Geul: Valkenburg, Valkenburg (L)
   - Nuenen: Nuenen Gerwen en Nederwetten
   - Groningen/Utrecht: with/without "(gemeente)" suffix

Testing:
- All 23 test cases passed ✅
- Tested Den Haag, Den Bosch, Bergen variations, regional identifiers
- Verified CBS codes, slugs, fuzzy matching, English names

Updated OpenAPI Documentation:
- Added comprehensive examples for all variation types
- Documented fuzzy matching capabilities
- Added 8 example requests showing different identifier formats

Impact:
- API now accepts requests like: Den Bosch, 's-Gravenhage, The Hague, Bergen Limburg
- Reduces API errors from municipality name confusion
- Better international accessibility (English names supported)
- Handles common typos and formatting differences automatically

Files Modified:
- webapp/app/api/v1/municipality/[identifier]/route.ts
  - Added MUNICIPALITY_ALIAS_MAPPING with 80+ aliases
  - Enhanced findMunicipalityByIdentifier with 4-level matching
  - Added fuzzy matching for special character variations
- webapp/public/openapi.yaml
  - Expanded endpoint documentation with variation examples
  - Added 8 request examples (was 3)
  - Documented all supported name formats

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 14:38:22 +01:00
robbertjanssen85andClaude f61990332f Add REST API and address search features with Dutch municipality name handling
This commit adds two major features to the pakketpunten webapp:

1. REST API (OpenAPI 3.0.3 compatible):
   - Endpoint: GET /api/v1/municipality/{identifier}
   - Supports 3 identifier types: municipality name, slug, CBS code
   - Rate limiting: 100 requests per 15 minutes
   - CORS enabled for public access
   - Interactive Redocly documentation at /api/v1/docs
   - CBS codes merged into municipalities.json (342 municipalities)

2. Address Search with Autocomplete:
   - Real-time address search using PDOK Locatieserver API
   - Autocomplete suggestions with 300ms debounce
   - Keyboard navigation support (arrows, Enter, Escape)
   - Automatic municipality switching and map zoom to address
   - Comprehensive Dutch municipality name mapping for edge cases

Dutch Municipality Name Handling:
   - Apostrophe cases: 's-Gravenhage → Den Haag, 's-Hertogenbosch → s-Hertogenbosch
   - Bergen disambiguation: Bergen (NH) → Bergen (NH.), Bergen (L) → Bergen (L.)
   - Regional identifiers: Hengelo (O), Beek (L), Laren (NH), Middelburg (Z), Rijswijk (ZH), Stein (L) mapped to simplified names
   - Handles all 13 known Dutch places starting with 's-

Bug Fixes:
   - Fixed font size inconsistency between municipality selector and address search
   - Fixed map zoom behavior - now stays at searched address instead of zooming back out
   - Fixed TypeScript build error with Redoc custom element

Files Added:
   - webapp/app/api/v1/municipality/[identifier]/route.ts - REST API endpoint
   - webapp/app/api/v1/docs/page.tsx - Redocly documentation page
   - webapp/app/api/geocode/route.ts - PDOK proxy API for address search
   - webapp/components/AddressSearchInput.tsx - Address search component
   - webapp/public/openapi.yaml - OpenAPI 3.0.3 specification
   - webapp/types/redoc.d.ts - TypeScript declarations for Redoc
   - scripts/merge_cbs_codes.py - Script to merge CBS codes
   - data/cbs_municipality_areas.json - CBS municipality data
   - docs/NEW_FEATURES.md - Comprehensive documentation

Files Modified:
   - webapp/app/page.tsx - Integrated address search with coordinate handling
   - webapp/components/Map.tsx - Enhanced zoom behavior for address search
   - webapp/next.config.ts - Added CSP rules for Redocly CDN
   - webapp/public/municipalities.json - Added CBS codes to all 342 municipalities
   - webapp/components/AboutModal.tsx - Minor updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 14:12:36 +01:00