mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Done ha32 merge funcgtion
This commit is contained in:
parent
b5e982c717
commit
d457ab46fb
6 changed files with 808 additions and 2096491 deletions
2
.idea/Model.iml
generated
2
.idea/Model.iml
generated
|
|
@ -7,7 +7,7 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/open_uprn" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/recommendations" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Python 3.10 (backend)" jdkType="Python SDK" />
|
||||
<orderEntry type="jdk" jdkName="ha_15_32_eligibility" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="PyNamespacePackagesService">
|
||||
|
|
|
|||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
|
|
@ -3,7 +3,7 @@
|
|||
<component name="Black">
|
||||
<option name="sdkName" value="Python 3.10 (backend)" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (backend)" project-jdk-type="Python SDK" />
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="ha_15_32_eligibility" project-jdk-type="Python SDK" />
|
||||
<component name="PythonCompatibilityInspectionAdvertiser">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
499
etl/eligibility/ha_15_32/HA 32 Identified addresses.csv
Normal file
499
etl/eligibility/ha_15_32/HA 32 Identified addresses.csv
Normal file
|
|
@ -0,0 +1,499 @@
|
|||
Housing Association,No.,Address,Postcode
|
||||
HA 32,1,SHERWOOD COURT,HU114DF
|
||||
HA 32,2,SHERWOOD COURT,HU114DF
|
||||
HA 32,3,SHERWOOD COURT,HU114DF
|
||||
HA 32,4,SHERWOOD COURT,HU114DF
|
||||
HA 32,5,SHERWOOD COURT,HU114DF
|
||||
HA 32,7,SHERWOOD COURT,HU114DF
|
||||
HA 32,8,SHERWOOD COURT,HU114DF
|
||||
HA 32,9,SHERWOOD COURT,HU114DF
|
||||
HA 32,10,SHERWOOD COURT,HU114DF
|
||||
HA 32,27,Seaton Grove,HU4 6HF
|
||||
HA 32,29,Seaton Grove,HU4 6HF
|
||||
HA 32,31,Seaton Grove,HU4 6HF
|
||||
HA 32,33,Seaton Grove,HU4 6HF
|
||||
HA 32,35,Seaton Grove,HU4 6HF
|
||||
HA 32,39,Seaton Grove,HU4 6HF
|
||||
HA 32,41,Seaton Grove,HU4 6HF
|
||||
HA 32,43,Seaton Grove,HU4 6HF
|
||||
HA 32,7,Norton Grove,HU4 6HG
|
||||
HA 32,9,Norton Grove,HU4 6HG
|
||||
HA 32,11,Norton Grove,HU4 6HG
|
||||
HA 32,15,Norton Grove,HU4 6HG
|
||||
HA 32,17,Norton Grove,HU4 6HG
|
||||
HA 32,19,Norton Grove,HU4 6HG
|
||||
HA 32,21,Norton Grove,HU4 6HG
|
||||
HA 32,28,Coxwold,HU4 6HH
|
||||
HA 32,30,Coxwold,HU4 6HH
|
||||
HA 32,32,Coxwold,HU4 6HH
|
||||
HA 32,34,Coxwold,HU4 6HH
|
||||
HA 32,36,Coxwold,HU4 6HH
|
||||
HA 32,38,Coxwold,HU4 6HH
|
||||
HA 32,40,Coxwold,HU4 6HH
|
||||
HA 32,42,Coxwold,HU4 6HH
|
||||
HA 32,44,Coxwold,HU4 6HH
|
||||
HA 32,971,HESSLE ROAD,HU4 6QG
|
||||
HA 32,973,HESSLE ROAD,HU4 6QG
|
||||
HA 32,975,HESSLE ROAD,HU4 6QG
|
||||
HA 32,977,HESSLE ROAD,HU4 6QG
|
||||
HA 32,981,HESSLE ROAD,HU4 6QG
|
||||
HA 32,983,HESSLE ROAD,HU4 6QG
|
||||
HA 32,1,Hessle Road,HU4 6RS
|
||||
HA 32,2,Hessle Road,HU4 6RS
|
||||
HA 32,3,Hessle Road,HU4 6RS
|
||||
HA 32,4,Hessle Road,HU4 6RS
|
||||
HA 32,5,Hessle Road,HU4 6RS
|
||||
HA 32,6,Hessle Road,HU4 6RS
|
||||
HA 32,7,Hessle Road,HU4 6RS
|
||||
HA 32,8,Hessle Road,HU4 6RS
|
||||
HA 32,9,Hessle Road,HU4 6RS
|
||||
HA 32,10,Hessle Road,HU4 6RS
|
||||
HA 32,11,Hessle Road,HU4 6RS
|
||||
HA 32,12,Hessle Road,HU4 6RS
|
||||
HA 32,14,Hessle Road,HU4 6RS
|
||||
HA 32,15,Hessle Road,HU4 6RS
|
||||
HA 32,16,Hessle Road,HU4 6RS
|
||||
HA 32,17,Hessle Road,HU4 6RS
|
||||
HA 32,18,Hessle Road,HU4 6RS
|
||||
HA 32,19,Hessle Road,HU4 6RS
|
||||
HA 32,20,Hessle Road,HU4 6RS
|
||||
HA 32,21,Hessle Road,HU4 6RS
|
||||
HA 32,22,Hessle Road,HU4 6RS
|
||||
HA 32,23,Hessle Road,HU4 6RS
|
||||
HA 32,24,Hessle Road,HU4 6RS
|
||||
HA 32,25,Hessle Road,HU4 6RS
|
||||
HA 32,26,Hessle Road,HU4 6RS
|
||||
HA 32,27,Hessle Road,HU4 6RS
|
||||
HA 32,28,Hessle Road,HU4 6RS
|
||||
HA 32,29,Hessle Road,HU4 6RS
|
||||
HA 32,30,Hessle Road,HU4 6RS
|
||||
HA 32,31,Hessle Road,HU4 6RS
|
||||
HA 32,32,Hessle Road,HU4 6RS
|
||||
HA 32,33,Hessle Road,HU4 6RS
|
||||
HA 32,34,Hessle Road,HU4 6RS
|
||||
HA 32,35,Hessle Road,HU4 6RS
|
||||
HA 32,36,Hessle Road,HU4 6RS
|
||||
HA 32,37,Hessle Road,HU4 6RS
|
||||
HA 32,46,FORESTER WAY,HU4 6SR
|
||||
HA 32,48,FORESTER WAY,HU4 6SR
|
||||
HA 32,50,FORESTER WAY,HU4 6SR
|
||||
HA 32,54,FORESTER WAY,HU4 6SR
|
||||
HA 32,56,FORESTER WAY,HU4 6SR
|
||||
HA 32,62,FORESTER WAY,HU4 6SR
|
||||
HA 32,64,FORESTER WAY,HU4 6SR
|
||||
HA 32,66,FORESTER WAY,HU4 6SR
|
||||
HA 32,68,FORESTER WAY,HU4 6SR
|
||||
HA 32,70,FORESTER WAY,HU4 6SR
|
||||
HA 32,15,SUMMERGROVES WAY,HU4 6SZ
|
||||
HA 32,1,WALNUT TREE WAY,HU4 6TG
|
||||
HA 32,2,WALNUT TREE WAY,HU4 6TG
|
||||
HA 32,3,WALNUT TREE WAY,HU4 6TG
|
||||
HA 32,4,WALNUT TREE WAY,HU4 6TG
|
||||
HA 32,7,WALNUT TREE WAY,HU4 6TG
|
||||
HA 32,8,WALNUT TREE WAY,HU4 6TG
|
||||
HA 32,9,WALNUT TREE WAY,HU4 6TG
|
||||
HA 32,291,Cottingham Road,HU5 4AT
|
||||
HA 32,293,Cottingham Road,HU5 4AT
|
||||
HA 32,295,Cottingham Road,HU5 4AT
|
||||
HA 32,297,Cottingham Road,HU5 4AT
|
||||
HA 32,299,Cottingham Road,HU5 4AT
|
||||
HA 32,301,Cottingham Road,HU5 4AT
|
||||
HA 32,303,Cottingham Road,HU5 4AT
|
||||
HA 32,305,Cottingham Road,HU5 4AT
|
||||
HA 32,307,Cottingham Road,HU5 4AT
|
||||
HA 32,309,Cottingham Road,HU5 4AT
|
||||
HA 32,1,Edith Cavell Court,HU5 4BA
|
||||
HA 32,2,Edith Cavell Court,HU5 4BA
|
||||
HA 32,3,Edith Cavell Court,HU5 4BA
|
||||
HA 32,4,Edith Cavell Court,HU5 4BA
|
||||
HA 32,5,Edith Cavell Court,HU5 4BA
|
||||
HA 32,6,Edith Cavell Court,HU5 4BA
|
||||
HA 32,7,Edith Cavell Court,HU5 4BA
|
||||
HA 32,8,Edith Cavell Court,HU5 4BA
|
||||
HA 32,9,Edith Cavell Court,HU5 4BA
|
||||
HA 32,10,Edith Cavell Court,HU5 4BA
|
||||
HA 32,11,Edith Cavell Court,HU5 4BA
|
||||
HA 32,12,Edith Cavell Court,HU5 4BA
|
||||
HA 32,106,Barringhton Avenue,HU5 4BE
|
||||
HA 32,112,Barringhton Avenue,HU5 4BE
|
||||
HA 32,114,Barringhton Avenue,HU5 4BE
|
||||
HA 32,116,Barringhton Avenue,HU5 4BE
|
||||
HA 32,118,Barringhton Avenue,HU5 4BE
|
||||
HA 32,120,Barringhton Avenue,HU5 4BE
|
||||
HA 32,122,Barringhton Avenue,HU5 4BE
|
||||
HA 32,124,Barringhton Avenue,HU5 4BE
|
||||
HA 32,126,Barringhton Avenue,HU5 4BE
|
||||
HA 32,1,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,2,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,3,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,4,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,5,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,6,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,7,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,8,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,9,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,10,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,11,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,12,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,14,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,15,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,17,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,19,Florence Nightingale Court,HU5 4BW
|
||||
HA 32,12,Green Close,HU6 8DA
|
||||
HA 32,44,Green Close,HU6 8DA
|
||||
HA 32,49,Green Close,HU6 8DA
|
||||
HA 32,50,Green Close,HU6 8DA
|
||||
HA 32,14,Ashbury Court,HU6 8DY
|
||||
HA 32,38,Westgarth Avenue,HU6 8LS
|
||||
HA 32,46,WESTGARTH AVENUE,HU6 8LS
|
||||
HA 32,48,WESTGARTH AVENUE,HU6 8LS
|
||||
HA 32,54,Westgarth Avenue,HU6 8LS
|
||||
HA 32,10,BEAUTIMAN COURT,HU6 8LX
|
||||
HA 32,1,Rosey Row,HU9 1HF
|
||||
HA 32,2,Rosey Row,HU9 1HF
|
||||
HA 32,3,Rosey Row,HU9 1HF
|
||||
HA 32,4,Rosey Row,HU9 1HF
|
||||
HA 32,5,Rosey Row,HU9 1HF
|
||||
HA 32,6,Rosey Row,HU9 1HF
|
||||
HA 32,7,Rosey Row,HU9 1HF
|
||||
HA 32,8,Rosey Row,HU9 1HF
|
||||
HA 32,9,Rosey Row,HU9 1HF
|
||||
HA 32,10,Rosey Row,HU9 1HF
|
||||
HA 32,11,Rosey Row,HU9 1HF
|
||||
HA 32,12,Rosey Row,HU9 1HF
|
||||
HA 32,14,Rosey Row,HU9 1HF
|
||||
HA 32,15,Rosey Row,HU9 1HF
|
||||
HA 32,16,Rosey Row,HU9 1HF
|
||||
HA 32,17,Rosey Row,HU9 1HF
|
||||
HA 32,18,Rosey Row,HU9 1HF
|
||||
HA 32,19,Rosey Row,HU9 1HF
|
||||
HA 32,20,Rosey Row,HU9 1HF
|
||||
HA 32,21,Rosey Row,HU9 1HF
|
||||
HA 32,24,Steynburg Street,HU9 2PF
|
||||
HA 32,26,Steynburg Street,HU9 2PF
|
||||
HA 32,28,Steynburg Street,HU9 2PF
|
||||
HA 32,30,Steynburg Street,HU9 2PF
|
||||
HA 32,36,Steynburg Street,HU9 2PF
|
||||
HA 32,38,Steynburg Street,HU9 2PF
|
||||
HA 32,40,Steynburg Street,HU9 2PF
|
||||
HA 32,42,Steynburg Street,HU9 2PF
|
||||
HA 32,19,Rustenburg,HU9 2PT
|
||||
HA 32,21,Rustenburg,HU9 2PT
|
||||
HA 32,23,Rustenburg,HU9 2PT
|
||||
HA 32,25,Rustenburg,HU9 2PT
|
||||
HA 32,27,Rustenburg,HU9 2PT
|
||||
HA 32,29,Rustenburg,HU9 2PT
|
||||
HA 32,31,Rustenburg,HU9 2PT
|
||||
HA 32,33,Rustenburg,HU9 2PT
|
||||
HA 32,35,Rustenburg,HU9 2PT
|
||||
HA 32,37,Rustenburg,HU9 2PT
|
||||
HA 32,55,Rustenburg,HU9 2PT
|
||||
HA 32,57,Rustenburg,HU9 2PT
|
||||
HA 32,59,Rustenburg,HU9 2PT
|
||||
HA 32,61,Rustenburg,HU9 2PT
|
||||
HA 32,3,The Broadway,HU9 3JH
|
||||
HA 32,5,THE BROADWAY,HU9 3JH
|
||||
HA 32,7,The Broadway,HU9 3JH
|
||||
HA 32,9,The Broadway,HU9 3JH
|
||||
HA 32,11,The Broadway,HU9 3JH
|
||||
HA 32,1,BOWLING CIRCLE,HU9 3JL
|
||||
HA 32,3,BOWLING CIRCLE,HU9 3JL
|
||||
HA 32,5,BOWLING CIRCLE,HU9 3JL
|
||||
HA 32,7,BOWLING CIRCLE,HU9 3JL
|
||||
HA 32,9,BOWLING CIRCLE,HU9 3JL
|
||||
HA 32,1,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,2,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,3,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,4,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,5,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,6,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,7,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,8,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,9,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,10,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,11,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,12,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,14,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,15,Majestic Court,HU9 3JY
|
||||
HA 32,16,MAJESTIC COURT,HU9 3JY
|
||||
HA 32,1,ROYALE COURT,HU9 3JZ
|
||||
HA 32,2,ROYALE COURT,HU9 3JZ
|
||||
HA 32,3,ROYALE COURT,HU9 3JZ
|
||||
HA 32,4,ROYALE COURT,HU9 3JZ
|
||||
HA 32,5,ROYALE COURT,HU9 3JZ
|
||||
HA 32,6,ROYALE COURT,HU9 3JZ
|
||||
HA 32,7,ROYALE COURT,HU9 3JZ
|
||||
HA 32,8,ROYALE COURT,HU9 3JZ
|
||||
HA 32,9,ROYALE COURT,HU9 3JZ
|
||||
HA 32,10,ROYALE COURT,HU9 3JZ
|
||||
HA 32,11,ROYALE COURT,HU9 3JZ
|
||||
HA 32,12,ROYALE COURT,HU9 3JZ
|
||||
HA 32,14,ROYALE COURT,HU9 3JZ
|
||||
HA 32,16,ROYALE COURT,HU9 3JZ
|
||||
HA 32,17,ROYALE COURT,HU9 3JZ
|
||||
HA 32,18,ROYALE COURT,HU9 3JZ
|
||||
HA 32,19,ROYALE COURT,HU9 3JZ
|
||||
HA 32,20,ROYALE COURT,HU9 3JZ
|
||||
HA 32,21,ROYALE COURT,HU9 3JZ
|
||||
HA 32,22,ROYALE COURT,HU9 3JZ
|
||||
HA 32,23,ROYALE COURT,HU9 3JZ
|
||||
HA 32,24,ROYALE COURT,HU9 3JZ
|
||||
HA 32,25,ROYALE COURT,HU9 3JZ
|
||||
HA 32,26,ROYALE COURT,HU9 3JZ
|
||||
HA 32,12A,ROYALE COURT,HU9 3JZ
|
||||
HA 32,79,MAYBURY ROAD,HU9 3LB
|
||||
HA 32,1,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,2,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,3,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,4,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,5,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,6,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,7,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,8,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,9,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,10,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,11,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,14,Hebrides Close,HU9 3LF
|
||||
HA 32,15,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,16,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,17,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,18,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,19,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,20,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,21,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,22,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,23,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,24,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,25,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,27,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,28,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,29,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,30,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,31,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,32,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,33,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,34,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,35,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,36,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,39,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,40,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,41,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,42,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,2,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,4,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,6,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,8,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,10,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,12,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,14,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,16,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,18,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,20,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,22,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,24,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,26,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,28,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,30,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,32,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,34,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,36,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,40,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,42,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,44,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,46,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,48,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,48,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,50,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,52,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,54,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,56,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,58,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,60,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,62,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,64,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,66,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,68,CROMARTY CLOSE,HU9 3LG
|
||||
HA 32,1,RONALDSWAY CLOSE,HU9 3LH
|
||||
HA 32,2,RONALDSWAY CLOSE,HU9 3LH
|
||||
HA 32,3,RONALDSWAY CLOSE,HU9 3LH
|
||||
HA 32,3,"MALIN LODGE, RONALDSWAY CLOSE",HU9 3LH
|
||||
HA 32,4,"MALIN LODGE, RONALDSWAY CLOSE",HU9 3LH
|
||||
HA 32,6,"MALIN LODGE, RONALDSWAY CLOSE",HU9 3LH
|
||||
HA 32,9,"MALIN LODGE, RONALDSWAY CLOSE",HU9 3LH
|
||||
HA 32,10,"MALIN LODGE, RONALDSWAY CLOSE",HU9 3LH
|
||||
HA 32,15,"MALIN LODGE, RONALDSWAY CLOSE",HU9 3LH
|
||||
HA 32,17,"MALIN LODGE, RONALDSWAY CLOSE",HU9 3LH
|
||||
HA 32,18,"MALIN LODGE, RONALDSWAY CLOSE",HU9 3LH
|
||||
HA 32,7,BROADWAY DRIVE,HU9 3PA
|
||||
HA 32,9,BROADWAY DRIVE,HU9 3PA
|
||||
HA 32,11,BROADWAY DRIVE,HU9 3PA
|
||||
HA 32,15,Broadway Drive,HU9 3PA
|
||||
HA 32,17,Broadway Drive,HU9 3PA
|
||||
HA 32,19,Broadway Drive,HU9 3PA
|
||||
HA 32,21,Broadway Drive,HU9 3PA
|
||||
HA 32,23,Broadway Drive,HU9 3PA
|
||||
HA 32,25,Broadway Drive,HU9 3PA
|
||||
HA 32,27,Broadway Drive,HU9 3PA
|
||||
HA 32,29,Broadway Drive,HU9 3PA
|
||||
HA 32,31,Broadway Drive,HU9 3PA
|
||||
HA 32,33,Broadway Drive,HU9 3PA
|
||||
HA 32,35,Broadway Drive,HU9 3PA
|
||||
HA 32,37,BROADWAY DRIVE,HU9 3PA
|
||||
HA 32,39,BROADWAY DRIVE,HU9 3PA
|
||||
HA 32,41,Broadway Drive,HU9 3PA
|
||||
HA 32,43,BROADWAY DRIVE,HU9 3PA
|
||||
HA 32,45,BROADWAY DRIVE,HU9 3PA
|
||||
HA 32,47,BROADWAY DRIVE,HU9 3PA
|
||||
HA 32,49,BROADWAY DRIVE,HU9 3PA
|
||||
HA 32,2,Broadway Drive,HU9 3PB
|
||||
HA 32,4,Broadway Drive,HU9 3PB
|
||||
HA 32,6,Broadway Drive,HU9 3PB
|
||||
HA 32,8,Broadway Drive,HU9 3PB
|
||||
HA 32,10,Broadway Drive,HU9 3PB
|
||||
HA 32,12,Broadway Drive,HU9 3PB
|
||||
HA 32,14,Broadway Drive,HU9 3PB
|
||||
HA 32,16,Broadway Drive,HU9 3PB
|
||||
HA 32,18,Broadway Drive,HU9 3PB
|
||||
HA 32,20,Broadway Drive,HU9 3PB
|
||||
HA 32,22,Broadway Drive,HU9 3PB
|
||||
HA 32,26,Broadway Drive,HU9 3PB
|
||||
HA 32,28,Broadway Drive,HU9 3PB
|
||||
HA 32,28,ADA HOLMES CIRCLE,HU9 3PB
|
||||
HA 32,30,Broadway Drive,HU9 3PB
|
||||
HA 32,32,Broadway Drive,HU9 3PB
|
||||
HA 32,34,Broadway Drive,HU9 3PB
|
||||
HA 32,36,Broadway Drive,HU9 3PB
|
||||
HA 32,38,Broadway Drive,HU9 3PB
|
||||
HA 32,40,Broadway Drive,HU9 3PB
|
||||
HA 32,42,Broadway Drive,HU9 3PB
|
||||
HA 32,44,Broadway Drive,HU9 3PB
|
||||
HA 32,46,Broadway Drive,HU9 3PB
|
||||
HA 32,48,Broadway Drive,HU9 3PB
|
||||
HA 32,52,Broadway Drive,HU9 3PB
|
||||
HA 32,56,Broadway Drive,HU9 3PB
|
||||
HA 32,58,Broadway Drive,HU9 3PB
|
||||
HA 32,60,Broadway Drive,HU9 3PB
|
||||
HA 32,55,RUTHERGLEN DRIVE,HU9 3PF
|
||||
HA 32,57,RUTHERGLEN DRIVE,HU9 3PF
|
||||
HA 32,59,RUTHERGLEN DRIVE,HU9 3PF
|
||||
HA 32,1,IMPERIAL COURT,HU9 3PG
|
||||
HA 32,3,IMPERIAL COURT,HU9 3PG
|
||||
HA 32,4,IMPERIAL COURT,HU9 3PG
|
||||
HA 32,5,IMPERIAL COURT,HU9 3PG
|
||||
HA 32,6,IMPERIAL COURT,HU9 3PG
|
||||
HA 32,7,IMPERIAL COURT,HU9 3PG
|
||||
HA 32,8,IMPERIAL COURT,HU9 3PG
|
||||
HA 32,9,IMPERIAL COURT,HU9 3PG
|
||||
HA 32,10,IMPERIAL COURT,HU9 3PG
|
||||
HA 32,10,SCHUBERT CLOSE,HU9 3PL
|
||||
HA 32,27,SCHUBERT CLOSE,HU9 3PL
|
||||
HA 32,28,SCHUBERT CLOSE,HU9 3PL
|
||||
HA 32,32,SCHUBERT CLOSE,HU9 3PL
|
||||
HA 32,1,Broadway Manor,HU9 3PN
|
||||
HA 32,1,Broadway Cottages,HU9 3PN
|
||||
HA 32,2,Broadway Manor,HU9 3PN
|
||||
HA 32,2,Broadway Cottages,HU9 3PN
|
||||
HA 32,3,Broadway Cottages,HU9 3PN
|
||||
HA 32,6,Broadway Manor,HU9 3PN
|
||||
HA 32,8,Broadway Manor,HU9 3PN
|
||||
HA 32,17,Broadway Manor,HU9 3PN
|
||||
HA 32,18,Broadway Manor,HU9 3PN
|
||||
HA 32,19,Broadway Manor,HU9 3PN
|
||||
HA 32,20,Broadway Manor,HU9 3PN
|
||||
HA 32,24,Broadway Manor,HU9 3PN
|
||||
HA 32,31,Broadway Manor,HU9 3PN
|
||||
HA 32,35,Broadway Manor,HU9 3PN
|
||||
HA 32,36,Broadway Manor,HU9 3PN
|
||||
HA 32,12A,Broadway Manor,HU9 3PN
|
||||
HA 32,1,FAROES CLOSE,HU9 4AN
|
||||
HA 32,2,Feroes Close,HU9 4AN
|
||||
HA 32,3,FAROES CLOSE,HU9 4AN
|
||||
HA 32,4,FAROES CLOSE,HU9 4AN
|
||||
HA 32,5,FAROES CLOSE,HU9 4AN
|
||||
HA 32,6,FAROES CLOSE,HU9 4AN
|
||||
HA 32,7,FAROES CLOSE,HU9 4AN
|
||||
HA 32,9,FAROES CLOSE,HU9 4AN
|
||||
HA 32,10,FAROES CLOSE,HU9 4AN
|
||||
HA 32,11,FAROES CLOSE,HU9 4AN
|
||||
HA 32,12,FAROES CLOSE,HU9 4AN
|
||||
HA 32,14,FAROES CLOSE,HU9 4AN
|
||||
HA 32,15,FAROES CLOSE,HU9 4AN
|
||||
HA 32,16,FAROES CLOSE,HU9 4AN
|
||||
HA 32,17,FAROES CLOSE,HU9 4AN
|
||||
HA 32,18,FAROES CLOSE,HU9 4AN
|
||||
HA 32,19,FAROES CLOSE,HU9 4AN
|
||||
HA 32,81,MAYBURY ROAD,HU93LB
|
||||
HA 32,1,ZIEGFELD COURT,HU93PH
|
||||
HA 32,2,ZIEGFELD COURT,HU93PH
|
||||
HA 32,3,ZIEGFELD COURT,HU93PH
|
||||
HA 32,4,ZIEGFELD COURT,HU93PH
|
||||
HA 32,5,ZIEGFELD COURT,HU93PH
|
||||
HA 32,6,ZIEGFELD COURT,HU93PH
|
||||
HA 32,7,ZIEGFELD COURT,HU93PH
|
||||
HA 32,8,ZIEGFELD COURT,HU93PH
|
||||
HA 32,9,ZIEGFELD COURT,HU93PH
|
||||
HA 32,1,GOLDEN COURT,HU93PJ
|
||||
HA 32,2,GOLDEN COURT,HU93PJ
|
||||
HA 32,3,GOLDEN COURT,HU93PJ
|
||||
HA 32,4,GOLDEN COURT,HU93PJ
|
||||
HA 32,5,GOLDEN COURT,HU93PJ
|
||||
HA 32,6,GOLDEN COURT,HU93PJ
|
||||
HA 32,7,GOLDEN COURT,HU93PJ
|
||||
HA 32,8,GOLDEN COURT,HU93PJ
|
||||
HA 32,10,GOLDEN COURT,HU93PJ
|
||||
HA 32,11,GOLDEN COURT,HU93PJ
|
||||
HA 32,12,GOLDEN COURT,HU93PJ
|
||||
HA 32,14,GOLDEN COURT,HU93PJ
|
||||
HA 32,15,GOLDEN COURT,HU93PJ
|
||||
HA 32,16,GOLDEN COURT,HU93PJ
|
||||
HA 32,17,GOLDEN COURT,HU93PJ
|
||||
HA 32,18,GOLDEN COURT,HU93PJ
|
||||
HA 32,19,GOLDEN COURT,HU93PJ
|
||||
HA 32,20,GOLDEN COURT,HU93PJ
|
||||
HA 32,22,GOLDEN COURT,HU93PJ
|
||||
HA 32,23,GOLDEN COURT,HU93PJ
|
||||
HA 32,24,GOLDEN COURT,HU93PJ
|
||||
HA 32,15,ROYALE COURT,HU9 3JZ
|
||||
HA 32,6,SHERWOOD COURT,HU114DF
|
||||
HA 32,979,HESSLE ROAD,HU4 6QG
|
||||
HA 32,985,HESSLE ROAD,HU4 6QG
|
||||
HA 32,2,BUSH CLOSE,HU4 6SP
|
||||
HA 32,11,BUSH CLOSE,HU4 6SP
|
||||
HA 32,16,BUSH CLOSE,HU4 6SP
|
||||
HA 32,52,FORESTER WAY,HU4 6SR
|
||||
HA 32,72,FORESTER WAY,HU4 6SR
|
||||
HA 32,74,FORESTER WAY,HU4 6SR
|
||||
HA 32,3,SUMMERGROVES WAY,HU4 6SZ
|
||||
HA 32,5,WALNUT TREE WAY,HU4 6TG
|
||||
HA 32,6,WALNUT TREE WAY,HU4 6TG
|
||||
HA 32,417,Endike Lane,HU6 8AG
|
||||
HA 32,5,Ashbury Court,HU6 8DA
|
||||
HA 32,9,Ashbury Court,HU6 8DA
|
||||
HA 32,12,Ashbury Court,HU6 8DA
|
||||
HA 32,28,Green Close,HU6 8DA
|
||||
HA 32,34,Green Close,HU6 8DA
|
||||
HA 32,51,Green Close,HU6 8DA
|
||||
HA 32,259,Endike Lane,HU6 8DX
|
||||
HA 32,261,Endike Lane,HU6 8DX
|
||||
HA 32,17,Ashbury Court,HU6 8DY
|
||||
HA 32,20,Ashbury Court,HU6 8DY
|
||||
HA 32,30,Westgarth Avenue,HU6 8LS
|
||||
HA 32,45,Westgarth Avenue,HU6 8LS
|
||||
HA 32,65,Westgarth Avenue,HU6 8LS
|
||||
HA 32,12,BEAUTIMAN COURT,HU6 8LX
|
||||
HA 32,1,THE BROADWAY,HU9 3JH
|
||||
HA 32,12,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,26,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,37,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,38,HEBRIDES CLOSE,HU9 3LF
|
||||
HA 32,24,Broadway Drive,HU9 3PB
|
||||
HA 32,50,Broadway Drive,HU9 3PB
|
||||
HA 32,54,Broadway Drive,HU9 3PB
|
||||
HA 32,2,IMPERIAL COURT,HU9 3PG
|
||||
HA 32,5,SCHUBERT CLOSE,HU9 3PL
|
||||
HA 32,8,SCHUBERT CLOSE,HU9 3PL
|
||||
HA 32,19,SCHUBERT CLOSE,HU9 3PL
|
||||
HA 32,34,SCHUBERT CLOSE,HU9 3PL
|
||||
HA 32,8,FAROES CLOSE,HU9 4AN
|
||||
HA 32,9,GOLDEN COURT,HU93PJ
|
||||
HA 32,21,GOLDEN COURT,HU93PJ
|
||||
|
|
|
@ -5,6 +5,10 @@ work is being done in December 2023, prior to completion of acquisition
|
|||
"""
|
||||
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
from utils.logger import setup_logger
|
||||
|
||||
logger = setup_logger()
|
||||
|
||||
|
||||
def load_data():
|
||||
|
|
@ -12,3 +16,305 @@ def load_data():
|
|||
This function loads the asset lists and identified addresses for HA32 and HA15
|
||||
:return:
|
||||
"""
|
||||
|
||||
# Load the asset list
|
||||
ha32_asset_list = pd.read_csv("etl/eligibility/ha_15_32/HA32 - ASSET LIST.csv", low_memory=False)
|
||||
ha15_asset_list = pd.read_csv("etl/eligibility/ha_15_32/HA15 - ASSET LIST.csv", low_memory=False)
|
||||
|
||||
# Load the identified addresses
|
||||
ha32_identified_addresses = pd.read_csv("etl/eligibility/ha_15_32/HA 32 Identified addresses.csv", low_memory=False)
|
||||
ha15_identified_addresses = pd.read_csv("etl/eligibility/ha_15_32/HA 15 Identified addresses.csv", low_memory=False)
|
||||
|
||||
return ha32_asset_list, ha15_asset_list, ha32_identified_addresses, ha15_identified_addresses
|
||||
|
||||
|
||||
def marge_ha_32(asset_list, identified_addresses):
|
||||
"""
|
||||
This method merges the asset list onto the list of identified addresses, forming a singular file for ha32
|
||||
"""
|
||||
|
||||
# We update how the Coxwold are listed in the identified addresses
|
||||
identified_addresses["Address"] = np.where(
|
||||
identified_addresses["Address"] == "Coxwold",
|
||||
"Coxwold Grove",
|
||||
identified_addresses["Address"]
|
||||
)
|
||||
|
||||
# Update the Barringhton Avenue with their correct spelling: Barrington Avenue
|
||||
identified_addresses["Address"] = np.where(
|
||||
identified_addresses["Address"] == "Barringhton Avenue",
|
||||
"Barrington Avenue",
|
||||
identified_addresses["Address"]
|
||||
)
|
||||
|
||||
# Update how the Rustenburn addresses are listed in the identified addresses
|
||||
identified_addresses["Address"] = np.where(
|
||||
identified_addresses["Address"] == "Rustenburg",
|
||||
"Rustenburg Street",
|
||||
identified_addresses["Address"]
|
||||
)
|
||||
|
||||
# Update how the MALIN LODGE, RONALDSWAY CLOSE addresses are listed in the identified addresses
|
||||
identified_addresses["Address"] = np.where(
|
||||
identified_addresses["Address"] == "MALIN LODGE, RONALDSWAY CLOSE",
|
||||
"Malin Lodge",
|
||||
identified_addresses["Address"]
|
||||
)
|
||||
|
||||
# Update how the Feroes Close are listed in the identified addresses
|
||||
identified_addresses["Address"] = np.where(
|
||||
identified_addresses["Address"] == "Feroes Close",
|
||||
"Faroes Close",
|
||||
identified_addresses["Address"]
|
||||
)
|
||||
|
||||
dropped_identified_merge_keys = []
|
||||
|
||||
# ha32 starts with 1418 rows
|
||||
starting_rows = len(asset_list)
|
||||
|
||||
asset_list["merge_key"] = (
|
||||
asset_list["Dwelling num"].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
asset_list["Street"].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
asset_list["Postcode"].astype(str).str.lower().str.strip().str.replace(" ", "")
|
||||
)
|
||||
|
||||
asset_list["merge_key2"] = (
|
||||
asset_list["Dwelling num"].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
asset_list["Street"].astype(str).str.lower().str.strip().str.replace(" ", "")
|
||||
)
|
||||
|
||||
identified_addresses["merge_key"] = (
|
||||
identified_addresses["No."].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
identified_addresses["Address"].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
identified_addresses["Postcode"].astype(str).str.lower().str.strip().str.replace(" ", "")
|
||||
)
|
||||
|
||||
identified_addresses["merge_key2"] = (
|
||||
identified_addresses["No."].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
identified_addresses["Address"].astype(str).str.lower().str.strip().str.replace(" ", "")
|
||||
)
|
||||
|
||||
identified_dupes = identified_addresses["merge_key"].duplicated()
|
||||
if identified_dupes.sum():
|
||||
logger.warning("We have %s duplicated identified addresses that will be dropped", identified_dupes.sum())
|
||||
dropped_identified_merge_keys.extend(identified_addresses[identified_dupes]["merge_key"].tolist())
|
||||
|
||||
identified_addresses = identified_addresses.drop_duplicates("merge_key")
|
||||
|
||||
# Check asset list for dupes
|
||||
asset_list_dupes = asset_list["merge_key"].duplicated()
|
||||
if asset_list_dupes.sum():
|
||||
logger.warning(
|
||||
"We have some duplicated asset list rows - they won't be dropped but we make sure they aren't in the "
|
||||
"identified addresses"
|
||||
)
|
||||
dupe_keys = asset_list[asset_list["merge_key"].duplicated()]["merge_key"].tolist()
|
||||
|
||||
check = identified_addresses[identified_addresses.merge_key.isin(dupe_keys)]
|
||||
if not check.empty:
|
||||
raise ValueError("We have a problem here, investigate me")
|
||||
|
||||
# Merge the asset list onto the identified addresses
|
||||
merged_data = pd.merge(
|
||||
asset_list,
|
||||
identified_addresses.drop(columns="merge_key2"),
|
||||
how="left",
|
||||
left_on="merge_key",
|
||||
right_on="merge_key",
|
||||
suffixes=("", "_identified_addresses")
|
||||
)
|
||||
|
||||
if merged_data.shape[0] != starting_rows:
|
||||
raise ValueError("Row numbers have changed")
|
||||
|
||||
merged_data = merged_data.merge(
|
||||
identified_addresses.drop(columns="merge_key"),
|
||||
how="left",
|
||||
left_on="merge_key2",
|
||||
right_on="merge_key2",
|
||||
suffixes=("", "_identified_addresses2")
|
||||
)
|
||||
|
||||
if merged_data.shape[0] != starting_rows:
|
||||
raise ValueError("Row numbers have changed")
|
||||
|
||||
merged_data["identified"] = (
|
||||
merged_data["Postcode_identified_addresses"].notnull() | merged_data["Postcode_identified_addresses2"].notnull()
|
||||
)
|
||||
|
||||
# HA 32 issues:
|
||||
# We have 36 Hesstle road addresses in the HA32 identified addresses, that are not in the original asset list
|
||||
#
|
||||
|
||||
missed = identified_addresses[
|
||||
~identified_addresses["merge_key"].isin(merged_data["merge_key"]) &
|
||||
~identified_addresses["merge_key2"].isin(merged_data["merge_key2"])
|
||||
]
|
||||
|
||||
if missed.shape[0] != 36:
|
||||
raise ValueError("We have a problem here, investigate me, missings beyond the Hessle Road addresses")
|
||||
|
||||
# TODO: Finish me
|
||||
|
||||
|
||||
def merge_ha_15(asset_list, identified_addresses, ha):
|
||||
"""
|
||||
This method merges the asset list onto the list of identified addresses, forming a singular file
|
||||
"""
|
||||
|
||||
if ha not in ["ha32", "ha15"]:
|
||||
raise ValueError("ha must be either ha32 or ha15")
|
||||
|
||||
if ha == "ha32":
|
||||
|
||||
|
||||
else:
|
||||
raise NotImplementedError("We haven't implemented HA15 yet")
|
||||
|
||||
dropped_identified_merge_keys = []
|
||||
dropped_asset_list_merge_keys = []
|
||||
|
||||
# ha32 starts with 1418 rows
|
||||
# HA15 starts with 7665 rows
|
||||
starting_rows = len(asset_list)
|
||||
|
||||
# We create a merge key on both files, based on concateneated, processed columns
|
||||
if ha == "ha32":
|
||||
asset_list["merge_key"] = (
|
||||
asset_list["Dwelling num"].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
asset_list["Street"].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
asset_list["Postcode"].astype(str).str.lower().str.strip().str.replace(" ", "")
|
||||
)
|
||||
|
||||
asset_list["merge_key2"] = (
|
||||
asset_list["Dwelling num"].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
asset_list["Street"].astype(str).str.lower().str.strip().str.replace(" ", "")
|
||||
)
|
||||
|
||||
identified_addresses["merge_key"] = (
|
||||
identified_addresses["No."].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
identified_addresses["Address"].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
identified_addresses["Postcode"].astype(str).str.lower().str.strip().str.replace(" ", "")
|
||||
)
|
||||
|
||||
identified_addresses["merge_key2"] = (
|
||||
identified_addresses["No."].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
identified_addresses["Address"].astype(str).str.lower().str.strip().str.replace(" ", "")
|
||||
)
|
||||
|
||||
else:
|
||||
asset_list["merge_key"] = (
|
||||
asset_list["Address Line 1"].astype(str).str.lower().str.strip().str.replace(" ", "") +
|
||||
asset_list["Postcode"].astype(str).str.lower().str.strip().str.replace(" ", "")
|
||||
)
|
||||
|
||||
# We check for duplicated identified addresses and in the asset list
|
||||
|
||||
identified_dupes = identified_addresses["merge_key"].duplicated()
|
||||
if identified_dupes.sum():
|
||||
logger.warning("We have %s duplicated identified addresses that will be dropped", identified_dupes.sum())
|
||||
dropped_identified_merge_keys.extend(identified_addresses[identified_dupes]["merge_key"].tolist())
|
||||
|
||||
identified_addresses = identified_addresses.drop_duplicates("merge_key")
|
||||
|
||||
# Check asset list for dupes
|
||||
asset_list_dupes = asset_list["merge_key"].duplicated()
|
||||
if asset_list_dupes.sum():
|
||||
logger.warning(
|
||||
"We have some duplicated asset list rows - they won't be dropped but we make sure they aren't in the "
|
||||
"identified addresses"
|
||||
)
|
||||
dupe_keys = asset_list[asset_list["merge_key"].duplicated()]["merge_key"].tolist()
|
||||
|
||||
check = identified_addresses[identified_addresses.merge_key.isin(dupe_keys)]
|
||||
if not check.empty:
|
||||
raise ValueError("We have a problem here, investigate me")
|
||||
|
||||
# Merge the asset list onto the identified addresses
|
||||
merged_data = pd.merge(
|
||||
asset_list,
|
||||
identified_addresses.drop(columns="merge_key2"),
|
||||
how="left",
|
||||
left_on="merge_key",
|
||||
right_on="merge_key",
|
||||
suffixes=("", "_identified_addresses")
|
||||
)
|
||||
|
||||
if merged_data.shape[0] != starting_rows:
|
||||
raise ValueError("Row numbers have changed")
|
||||
|
||||
merged_data = merged_data.merge(
|
||||
identified_addresses.drop(columns="merge_key"),
|
||||
how="left",
|
||||
left_on="merge_key2",
|
||||
right_on="merge_key2",
|
||||
suffixes=("", "_identified_addresses2")
|
||||
)
|
||||
|
||||
if merged_data.shape[0] != starting_rows:
|
||||
raise ValueError("Row numbers have changed")
|
||||
|
||||
merged_data["identified"] = (
|
||||
merged_data["Postcode_identified_addresses"].notnull() | merged_data["Postcode_identified_addresses2"].notnull()
|
||||
)
|
||||
|
||||
# HA 32 issues:
|
||||
# We have 36 Hesstle road addresses in the HA32 identified addresses, that are not in the original asset list
|
||||
#
|
||||
|
||||
missed = identified_addresses[
|
||||
~identified_addresses["merge_key"].isin(merged_data["merge_key"]) &
|
||||
~identified_addresses["merge_key2"].isin(merged_data["merge_key2"])
|
||||
]
|
||||
|
||||
if ha == "ha32":
|
||||
if missed.shape[0] != 36:
|
||||
raise ValueError("We have a problem here, investigate me, missings beyond the Hessle Road addresses")
|
||||
|
||||
missed.shape
|
||||
|
||||
m1 = missed[missed["Address"].str.contains("Hessle")]
|
||||
|
||||
m1.head()
|
||||
|
||||
[x for x in m1["merge_key"] if x in asset_list["merge_key"].tolist()]
|
||||
[x for x in m1["merge_key2"] if x in asset_list["merge_key2"].tolist()]
|
||||
|
||||
missed["Address"].unique()
|
||||
|
||||
z = merged_data[merged_data["Street"].str.contains("Hessle") & ~merged_data["identified"]]
|
||||
|
||||
identified_addresses[identified_addresses["Address"].str.contains("Barringhton")]
|
||||
asset_list[asset_list["Street"].str.contains("Hessle")]
|
||||
|
||||
identified_addresses["merge_key"].isin(merged_data["merge_key"])
|
||||
|
||||
identified_addresses["merge_key"].isin(asset_list["merge_key"]).sum()
|
||||
identified_addresses["merge_key2"].isin(asset_list["merge_key2"]).sum()
|
||||
|
||||
# Find merge keys not in the identified addresses
|
||||
|
||||
missed = identified_addresses[
|
||||
~identified_addresses["merge_key"].isin(merged_data["merge_key"])
|
||||
]
|
||||
|
||||
identified_addresses[
|
||||
(identified_addresses["Address"].str.contains("Ashbury Court"))
|
||||
]
|
||||
|
||||
asset_list[
|
||||
(asset_list["Street"].str.contains("Ashbury Court"))
|
||||
]
|
||||
|
||||
# Drop the UPRN column from the merged data
|
||||
merged_data = merged_data.drop(columns=["UPRN"])
|
||||
|
||||
return merged_data
|
||||
|
||||
|
||||
def app():
|
||||
ha32_asset_list, ha15_asset_list, ha32_identified_addresses, ha15_identified_addresses = load_data()
|
||||
|
||||
ha32 = marge_ha_32(asset_list=ha32_asset_list, identified_addresses=ha32_identified_addresses)
|
||||
ha15 = merge_ha_15(asset_list=ha15_asset_list, identified_addresses=ha15_identified_addresses, ha="ha15")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue