Difference between revisions of "Geocode.py"

From edegan.com
Jump to navigation Jump to search
Line 18: Line 18:
 
=Usage & Features=
 
=Usage & Features=
  
Input is a tab delimited ".txt" file with columns:
+
Currently the input is a tab delimited ".txt" file with columns:
  
  <Business Name> <Address>
+
  <Firm Name> <Address>
  
 
In this location on ''powershell'' from the RDP (Must be from the RDP so it can import files):
 
In this location on ''powershell'' from the RDP (Must be from the RDP so it can import files):
Line 32: Line 32:
 
The program will create an output file that looks like:
 
The program will create an output file that looks like:
  
  input.txt_coords
+
  Out.txt
  
Which you will have to open with a right click into textpad.
+
Which you will have to open with a right click into textpad. If you would like to change the input so that you can geo code while keeping a primary key with more than one column simply change the output commands on lines 22, 35, and 37 to reflect the changes. Also change line 28 to reflect the inputted file.  
  
 
==Google Key==
 
==Google Key==
Line 44: Line 44:
 
==Output==
 
==Output==
  
The output is a tab delimited with the three columns:
+
The output is currently a tab delimited with the three columns:
  
  <Business Name> <Location["lat"]> <Location["lng"]>
+
  <Firm Name> <Location["lat"]> <Location["lng"]>
  
Meaning Name, Latitude, Longitude in a tab delimited .txt file
+
Meaning Name, Latitude, Longitude in a tab delimited .txt file. This can be changed by accessing the Geocode.py file and going to the lines specified above.
  
 
=Bugs & Feedback=
 
=Bugs & Feedback=
  
 
[[admin_classification::IT Build| ]]
 
[[admin_classification::IT Build| ]]

Revision as of 11:24, 7 August 2018


McNair Project
Geocode.py
Project logo 02.png
Project Information
Project Title Geocode.py
Start Date
Deadline
Keywords Tool
Primary Billing
Notes
Has project status Complete
Copyright © 2016 edegan.com. All Rights Reserved.


Location:

E:\McNair\Software\Scripts\Geocode.py

Name

This is a python program that uses google maps to find the latitude and longitude for an address.

Synopsis

python Geocode.py <input.txt>

Usage & Features

Currently the input is a tab delimited ".txt" file with columns:

<Firm Name> <Address>

In this location on powershell from the RDP (Must be from the RDP so it can import files):

E:\McNair\Software\Scripts

Enter this code:

python Geocode.py <input.txt>

The program will create an output file that looks like:

Out.txt

Which you will have to open with a right click into textpad. If you would like to change the input so that you can geo code while keeping a primary key with more than one column simply change the output commands on lines 22, 35, and 37 to reflect the changes. Also change line 28 to reflect the inputted file.

Google Key

Use the following Google API key in this script (note that it is billed to Ed's PCard and queries over 2,500 transactions per day are charged). Use it only with permission and not for debugging:

AIzaSyCdu9TfyYg9UNubz5IlPp4XXrj9HYXTLKs

Output

The output is currently a tab delimited with the three columns:

<Firm Name> <Location["lat"]> <Location["lng"]>

Meaning Name, Latitude, Longitude in a tab delimited .txt file. This can be changed by accessing the Geocode.py file and going to the lines specified above.

Bugs & Feedback