Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Python 2/3 - Mapbox Batch Geocoder

mapbox_batch.py reads queries from an input text file, one per line, and constructs parallelized batch queries.

Results are stored in an output directory as JSON files.

Requirements

Installation

pip install -r requirements.txt

Usage

Command line:

MapboxAccessToken=YOUR_ACCESS_TOKEN python mapbox_batch.py input_file.txt /path/to/output/directory

Programmatic:

from mapbox_batch import MapboxBatchGeocoder

mapbox = MapboxBatchGeocoder('YOUR_ACCESS_TOKEN')
with open('/path/to/input_file.txt') as input_file:
    mapbox.geocode(input_file, '/path/to/output/directory/')