Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complex geocoding config [MAP-706] [MAP-708] [MAP-707] [MAP-458] #166

Open
wants to merge 66 commits into
base: main
Choose a base branch
from

Conversation

janbaykara
Copy link
Member

@janbaykara janbaykara commented Dec 17, 2024

This PR adds a new, more capable geocoding option that can involve multiple fields.

  • geography_config is a new approach to geocoding. When the field is set (see test cases), it allows three new approaches to geocoding:
    1. Multi-field area geocoding. It can be a single area name, or it could be multiple columns (like council -> ward). A good example of this is the Britain Elects ward-level GE2024 results forecast.
    2. Address geocoding with per-row prefix / suffix / country configurations. A good example of this is a spreadsheet with business names and street names. Both fields are important to get precise coordinates, and adding an arbitrary suffix like "Glasgow" gives the geocoder the context it needs to make the right choices.
    3. Coordinate geocoding. You pick a latitude and longitude field, and the rest is history. This was an explicit request from Tipping Point UK.
  • There is a full test suite for these geocoding configurations, and they run on the Github CI test runner as a follow-up step.
  • As part of area geocoding, we now import inactive political boundaries from MapIt, taking the row count from 9000~ to over 20,000.
  • There are a few cases where we use a new service, findthatpostcode.uk, for backup postcode geocoding when postcodes.io fails.
  • When geography_config is set, geocoding cannot be set differently by the user in the UI. So there are some JSX changes for that.

@commonknowledge-bot commonknowledge-bot deployed to feature/map-668-hnh-ward-csv-issues - meep-database PR #166 December 17, 2024 12:32 — with Render Active
@janbaykara janbaykara changed the title Feature/map 668 hnh ward csv issues Complex geocoding config Dec 17, 2024
Copy link

sentry-io bot commented Dec 17, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: hub/management/commands/import_areas.py

Function Unhandled Issue
handle BadRequestException: Usage limit reached. utils.m...
Event Count: 1

Did you find this useful? React with a 👍 or 👎

@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-668-hnh-ward-csv-issues - meep-intelligence-hub-backend PR #166 December 17, 2024 12:33 — with Render Destroyed
@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-668-hnh-ward-csv-issues - meep-intelligence-hub-backend PR #166 December 17, 2024 12:33 — with Render Destroyed
@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-668-hnh-ward-csv-issues - meep-intelligence-hub-frontend PR #166 December 17, 2024 12:33 — with Render Destroyed
@commonknowledge-bot commonknowledge-bot deployed to feature/map-668-hnh-ward-csv-issues - meep-intelligence-hub-worker PR #166 December 17, 2024 12:33 — with Render Active
@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-668-hnh-ward-csv-issues - meep-intelligence-hub-backend PR #166 December 19, 2024 23:06 — with Render Destroyed
@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-668-hnh-ward-csv-issues - meep-intelligence-hub-worker PR #166 December 19, 2024 23:06 — with Render Destroyed
@janbaykara janbaykara requested a review from joaquimds December 19, 2024 23:38
@commonknowledge-bot commonknowledge-bot temporarily deployed to feature/map-668-hnh-ward-csv-issues - meep-intelligence-hub-frontend PR #166 December 22, 2024 02:15 — with Render Destroyed
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.

3 participants