GeoPy is a Python-based geocoding utility that processes company address data from an Excel file and converts it into latitude and longitude coordinates. This can be useful for mapping, location analysis, and data enrichment workflows.
- Reads address data from an Excel file
- Converts registered addresses into geographic coordinates
- Outputs the processed results into a new Excel file
- Simple and easy to run in a local Python environment
Before running the script, make sure you have the following installed:
- Python 3
- Visual Studio Code or any Python-compatible IDE
This project requires the following Python libraries:
pandasrequests
The following modules are included in Python by default, so no separate installation is needed:
jsontime
To install the required libraries, run:
pip install pandas requestsYour Excel file must contain the following exact column headers:
Registered_AddressCompany_name
These column names must match exactly, including capitalization and underscores.
- Set the input file name
Locate the following line in the script:
df = pd.read_excel("FILE-NAME.xlsx")Replace "FILE-NAME.xlsx" with the name of your actual Excel input file.
- Set the output file name
df.to_excel("FILE-NAME.xlsx")Open your terminal in the project folder and run:
py geo.pyThe script will generate a new Excel file containing the processed results, including the corresponding latitude and longitude values for each registered address.
Make sure the Excel file is in the same directory as the script unless you specify the full file path. Ensure the column headers are written exactly as required. File names in the code must be enclosed in double quotes. Incorrect column names may cause the script to fail during execution. Use Case
Geocoding business address data Supporting mapping and visualization projects Automating coordinate lookups from spreadsheet-based records Enriching datasets with location information
Created as a simple geocoding utility for processing address-based Excel data using Python.