DFE-Digital/teaching-vacancies

Create a task that consumes boundaries data

cpjmcquillan opened this issue · 1 comments

Create a task for importing boundary data

A task needs to be created that calls out to the relevant ONS APIs in order to populate LocationPolygon records. The task needn't be run on a scheduled basis, since data is unlikely to change frequently.

The task should be configurable so that:

  • Any combination of location types can be run (regions, cities, counties, local authorities, etc)
  • Flag can be set to overwrite data for existing LocationPolygon records or not
  • Flag can be set to specify boundary resolution (and therefore which API endpoint)
  • LocationPolygon records should not be created for locations that are "out of scope"
  • Location name field should be set as a single case string

For reference:

Acceptance criteria

  • Configurable task exists that can be run on demand to import boundary data
  • Code review
  • Product sign off on default resolution
  • Product sign off on out of scope locations