Cloud Pak for Data Group

Using Precisely Address Fabric Data

By Amod Upadhye posted 25 days ago

  

Address Fabric Data is a comprehensive list of country addresses and their corresponding locations. Each record is pre-geocoded to provide the most precise latitude and longitude coordinate location, including physical locations that are not deliverable by the postal service. The data is delivered in an easy to use flat file format that can be loaded into IBM Cloud Pak for Data. 


Pre requisites : Db2 Advanced Edition add-on, Python 3.6

Deployments Steps : 

1. Extract the Address Fabric.txt file from AddressFabric.zip file.
2. Once the dataset has been extracted, convert the tab delimited file to a CSV file. This operation can be done using Python using the following code.

import csv

txt_file = r"us_address_fabric.txt"
csv_file = r"us_address_fabric.csv"

with open(txt_file, "r") as in_text:
    in_reader = csv.reader(in_text, delimiter = '\t')
    with open(csv_file, "w") as out_csv:
        out_writer = csv.writer(out_csv)
        for row in in_reader:
            out_writer.writerow(row)


3. Load the us_address_fabric.csv data in Cloud Pak for Data using the instructions here.


#Highlights
#Highlights-home
0 comments
304 views

Permalink