...
This Python 3.x script was written as a function to geocode delimited text files of parsed or un-parsed US addresses using the US Census Geocoder API. It relies on the external censusgeocode module which must be downloaded and installed in advance, as well as several internal Python modules. For best results, input text files should be encoded as UTF-8. After loading the function, it can be called to process a file with the following parameters:
...
Parameters | Example 1 | Example 2 |
---|---|---|
census_geocode(datafile,delim,header,start,addcol)
| census_geocode('my_addresses.txt','\t','n',0,[2,3,4,5]) | census_geocode('C:\data\addresses.csv', ',', 'y',0,[3]) |
(str,str,str,int,list[int]) -> files | File is: stored in same directory as the script, is tab-delimited, has no header, start reading at the beginning, address, city, state, and ZIP are stored in columns 2 through 5. | File is: stored in an absolute location, is comma-delimited, has a header, start reading at the beginning, un-parsed address is stored in the 3rd column. |
Download
Date | Name | Description |
---|---|---|
May 20152016 | geocode_census_funct.zip | Python 3.x script with documentation for batch geocoding text files of US addresses |
...