Skip to content

Conversation

@tifa365
Copy link
Contributor

@tifa365 tifa365 commented Nov 5, 2025

Replaces API-only scraping with LSN geodata integration providing 100% geolocation coverage (4,250 schools). Implements robust matching, normalization, and async downloads.

Key improvements:

  • Add shapefile integration for 4 LSN categories (ABS, Förder, BBS, SdG)
  • Implement Unicode-aware (NFKD) German character normalization
  • Add collision-safe API indexing with form-aware disambiguation
  • Use async Scrapy Requests for shapefile downloads (non-blocking)
  • Generate stable synthetic IDs (SHA-1) for shapefile-only schools
  • Add path traversal protection in ZIP extraction
  • Ensure API-only schools are fetched after shapefile processing
  • Add enhanced school form normalization with long-form variants
  • Add allowed_domains and stats tracking

Coverage: 4,250 schools with geodata (~75% API-enriched, ~25% shapefile-only)

Adds pyproj dependency for CRS transformation support.

Note: API endpoint (schulen.nibis.de) is public but may experience intermittent connectivity. Shapefile processing is fully functional and provides complete geodata coverage.

@tifa365 tifa365 force-pushed the feature/niedersachsen-geodata branch from fe9257f to ce9fd7f Compare November 5, 2025 07:44
Replaces API-only scraping with LSN geodata integration providing
100% geolocation coverage (4,250 schools). Implements robust matching,
normalization, and async downloads.

Key improvements:
- Add shapefile integration for 4 LSN categories (ABS, Förder, BBS, SdG)
- Implement Unicode-aware (NFKD) German character normalization
- Add collision-safe API indexing with form-aware disambiguation
- Use async Scrapy Requests for shapefile downloads (non-blocking)
- Generate stable synthetic IDs (SHA-1) for shapefile-only schools
- Add path traversal protection in ZIP extraction
- Ensure API-only schools are fetched after shapefile processing
- Add enhanced school form normalization with long-form variants
- Add allowed_domains and stats tracking

Coverage: 4,250 schools with geodata (~75% API-enriched, ~25% shapefile-only)

Note: API endpoint (schulen.nibis.de) is public but may experience
intermittent connectivity. Shapefile processing is fully functional
and provides complete geodata coverage.
@tifa365 tifa365 force-pushed the feature/niedersachsen-geodata branch from ce9fd7f to 6450645 Compare November 5, 2025 07:50
@k-nut
Copy link
Member

k-nut commented Nov 26, 2025

Sorry but I currently cannot review the PR in this case. None of the links actually return shapefiles and the code seems to overly complicated for what I was hoping for it to be with all of the normalization and encoding handling. Do you think we can somehow find a much simpler version do begin with (even just as a proof of concept)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants