项目作者: KhamliukElena

项目描述 :
This script is designed to match an address with its voting district.
高级语言: JavaScript
项目地址: git://github.com/KhamliukElena/district.git
创建时间: 2020-10-07T16:24:06Z
项目社区:https://github.com/KhamliukElena/district

开源协议:

下载


district

This script matches an address with a voting district.
Input: exel file with two sheets. Sheet 1 contains addresses for matching (column 1) as strings and their districts to be inserted (column 2). Sheet 2 contains distribution of addresses between districts.
The idea of the solution is to parse an address to get a street name and a building number. Sheet 2 forms an array of objects with which streets and buildings are compared. If number of building is not specified and the street belongs to several districts, then the district is undefined. The same happens if only city is specified.