projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8bdf0e
)
strip address suffixes for better census coding, RT#86245
author
Ivan Kohler
<ivan@freeside.biz>
Mon, 11 Apr 2022 22:43:29 +0000
(15:43 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Mon, 11 Apr 2022 22:43:29 +0000
(15:43 -0700)
FS/FS/Misc/Geo.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Misc/Geo.pm
b/FS/FS/Misc/Geo.pm
index
e301a94
..
b3f3c68
100644
(file)
--- a/
FS/FS/Misc/Geo.pm
+++ b/
FS/FS/Misc/Geo.pm
@@
-133,8
+133,11
@@
sub get_censustract_uscensus {
my $url = 'https://geocoding.geo.census.gov/geocoder/geographies/address?';
+ my $address1 = $location->{address1};
+ $address1 =~ s/(apt|ste|suite|unit)[\s\d]\w*\s*$//i;
+
my $query_hash = {
- street => $
location->{address1}
,
+ street => $
address1
,
city => $location->{city},
state => $location->{state},
benchmark => 'Public_AR_Current',