Skip to content

Constituency town export includes towns that are in the wrong county / country #49

@c6andy

Description

@c6andy

The constituency->town mapping importer (ImportConstituencyTownMappingsCommand.php) matches towns to constituencies based on names alone (i.e. no IDs):

$town = Town::where('name', $row['town_name'])->first();

This will cause some towns to be mismatched, because there are often towns with the same name in different places (e.g. there are 12 towns called “Wick” in the database).

Given we have lat-long values for towns, we could instead run the towns through one of the mappers mentioned in the README to get the constituency. I guess that hasn’t been done because some towns straddle more than one constituency, and that’s why the relationship is many-to-many?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions