geocode-csv
Geocode (Latitude and longitude) CSV files containing contact addresses using Geocoding Providers.
100K+
This repository provides a geocoding solution for CSV files containing contact addresses using multiple geocoding providers. Geocoding is the process of converting addresses into geographic coordinates (latitude and longitude), enabling businesses and data analysts to leverage location-based information in their applications and analyses.
You can use the geocoding solution by directly pulling the Docker image from Docker Hub or by building the image from the source code.
Note: Make sure you have Docker installed and running on your system before executing the docker command.
For detailed instructions on building and running the Docker image, please refer to the project documentation.
docker pull nicolasverlhiac/geocode-csv
Create a data directory and place your input CSV file in the data directory.
input.csv.sample-input.csv file as a base by duplicating it and renaming the duplicate to input.csv. This file already has the required CSV structure and serves as a template for your own data.Set the environment variables: Depending on the geocoding provider you want to use, set the corresponding API key as an environment variable. The supported environment variables are:
GOOGLE_API_KEY for Google Maps API keyMAPBOX_API_KEY for MapBox API keyOPENCAGE_API_KEY for OpenCage API keyMAPTILER_API_KEY for MapTiler API keyGEOAPIFY_API_KEY for Geoapify API keyExecute the Docker container with the selected environment variable:
docker run --rm -v "$(pwd)/data:/app/csv" -e GOOGLE_API_KEY=your_key nicolasverlhiac/geocode-csv
ouput.csv file with latitude and longitude information in the csv directory.docker build -t nicolasverlhiac/geocode-csv .
This command builds the Docker image using the Dockerfile in the current directory. The -t flag allows you to specify a tag or name for the image. In this example, the image is tagged as nicolasverlhiac/geocode-csv.
By building the image locally, you have more control over the image and can make modifications if needed. Additionally, building the image locally ensures that you have the latest version of the code and dependencies.
input.csv CSV example)Example of a CSV file to be placed in the data/input.csv folder before executing the Docker command.
You can use the provided sample-input.csv file located in /data as a base by duplicating it and renaming the duplicate to input.csv. This file already has the required CSV structure and serves as a template for your own data.
| name | address | postcode | state | city | country | latitude | longitude |
|---|---|---|---|---|---|---|---|
| CAVE ARDONEO | 768 Avenue du Président JFK | 40280 | SAINT PIERRE DU MONT | France | |||
| LA CAVE | 87 Route de Montpellier | 34110 | FRONTIGNAN | France | |||
| ETS BRIAU | 94 Rue David Johnston | 33000 | BORDEAUX | France |
This geocoding solution supports the following architectures:
Whether you're running on a traditional x86 architecture or ARM-based devices, you can leverage this geocoding solution for your CSV files.
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License .
This geocoding solution is built upon the geocoding providers API. Special thanks to the contributors of the Geopy library.
Geocode CSV is free, open source software made possible by this wonderful sponsor.
Content type
Image
Digest
sha256:9ddedb5af…
Size
64.8 MB
Last updated
over 2 years ago
docker pull nicolasverlhiac/geocode-csv:2.4