Skip to content

9521 geocode petitioner addresses#9737

Draft
zacharybrown204 wants to merge 78 commits intostagingfrom
9521-geocode-petitioner-addresses
Draft

9521 geocode petitioner addresses#9737
zacharybrown204 wants to merge 78 commits intostagingfrom
9521-geocode-petitioner-addresses

Conversation

@zacharybrown204
Copy link
Contributor

@zacharybrown204 zacharybrown204 commented Feb 12, 2026

#9521 #9522

Database

Adding a new table to hold user address geocode data.

  • Table named dw_user_contact.
  • Currently it only holds PK and geocode data
  • Each record corresponds to a petitioner in the dw_case petitioners column. So our PK is a docket number and a user ID.

Geocoding

Added a script to geocode data.

  • We ended up taking an on demand approach for geocoding user addresses as we need them, then storing them in our DB for future uses. If any addresses are updated they'll be removed from the table. Like invalidating records in a cache.
  • We used an API provided by the US Census Beureu, and an NPM package to streamline the calls to this API.
      • If we want to avoid using this package then the alternative is to create CSV payloads and directly call the API ourselves.
  • During manual testing it would take between 1 to 3 minutes to geocode 10,000 records. To geocode all of the addresses since DAWSONs release it will take around 18 calls to the geocoding API.
  • Accepts parameters to geocode cases that were recieved within a date range.

Report

Added a script that can call the geocoding script, and generates a CSV report with address data compelte with geocodes.

paulo-filho-ctr and others added 30 commits January 16, 2026 11:01
…s' into 9521-geocode-petitioner-addresses

# Conflicts:
#	web-api/src/persistence/postgres/utils/migrate/migrations/2026-02-04T16_36_06Z-user-contact.ts
Adding a package to make calls to census geocode API
Adding function to upsert into user contact table
Updating backfill-user-geocodes to select data from DB and use census geocode API.
Updating it to use the updated backfill-user-geocodes and also tweaking backfill-user-geocodes.
Made some updates to export petitioner geodata so that the CSV lines up with the query data.
Refactored backfill User Geocodes to its own helper because trying to import the other script was just running the script.
alexdziarn and others added 29 commits February 26, 2026 10:23
…search smoketests to deploy and test on exp env"

This reverts commit fc45ab2.
…snt show the latest version support on website
Get distinct missing geocodes because of a data issue.
Add more logging to report script
@paulo-filho-ctr paulo-filho-ctr force-pushed the 9521-geocode-petitioner-addresses branch from b560ee4 to 5048c4e Compare February 26, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants