The supported geocoding services are shown in the table below. The
method
is used to select the geocoding service in
tidygeocoder functions such as geo()
and
reverse_geo()
. The usage rate limitations are listed for
the free tier of the service when applicable and many services have
faster rates available with paid plans.
Also note that there are many other considerations when selecting a geocoding service such as if the service uses open source data with permissive licensing, how the service uses or stores your data, and if there are restrictions on how you can use the data provided by the service. Refer to each service’s documentation for details.
Service | Method | API Key Required | Batch Geocoding | Usage Limitations | API Documentation |
---|---|---|---|---|---|
Nominatim | osm |
1 query per second | docs | ||
US Census | census |
✅ | docs | ||
ArcGIS | arcgis |
docs | |||
Geocodio | geocodio |
✅ | ✅ | 1000 queries per minute (free tier) | docs |
Location IQ | iq |
✅ | 60 queries per minute (free tier) | docs | |
google |
✅ | 50 queries per second | docs | ||
OpenCage | opencage |
✅ | 1 query per second (free tier) | docs | |
Mapbox | mapbox |
✅ | 600 queries per minute (free tier) | docs | |
HERE | here |
✅ | ✅ | 5 queries per second (free tier) | docs |
TomTom | tomtom |
✅ | ✅ | 5 queries per second (free tier) | docs |
MapQuest | mapquest |
✅ | ✅ | docs | |
Bing | bing |
✅ | ✅ | docs | |
Geoapify | geoapify |
✅ | 5 queries per second (free tier) | docs |
Highlights:
Due diligence must be exercised when geocoding sensitive data as tidygeocoder utilizes third party web services to perform geocoding. Within the context of healthcare, using patient or study subject address data with a third party geocoding service can risk violating privacy rules for International Review Boards (IRBs) and HIPAA.
Further details on possible risk are described here. Refer to the documentation on your selected geocoding service (see links above) for information on how your data will be utilized and stored.
Some options you could consider if the privacy of your data is a concern:
api_options=list(geocodio_hipaa=TRUE)
parameter.method="osm"
) can be installed
and hosted locally so that data does not leave your local network. See
the Nominatim website for
installation instructions. You can use a locally hosted Nominatim
service with tidygeocoder by specifying its address with the
api_url
parameter.See the geo() or reverse_geo() documentation pages for more documentation on the parameters mentioned above.
types
parameter to be set if
limit > 1
. See #104.limit
parameter (#106).outFields
parameter which
specifies which fields are to be returned. As of tidygeocoder v1.0.6
this is set to *
(all fields). To return only default
fields use the following parameter in your query:
custom_query = list(outFields='')
. See #177
for more details.custom_query
parameter:The api_parameter_reference
maps the API parameters for
each geocoding service to a common set of “generic” parameters. The
generic_name
below is the generic parameter name while the
api_name
is the parameter name for the specified geocoding
service (method
). Refer to
?api_parameter_reference
for more details.
API keys are retrieved from environmental variables. The name of the
environmental variable used for each service is stored in the
api_key_reference
dataset. See
?api_key_reference
.
method | env_var |
---|---|
geocodio | GEOCODIO_API_KEY |
iq | LOCATIONIQ_API_KEY |
GOOGLEGEOCODE_API_KEY | |
opencage | OPENCAGE_KEY |
mapbox | MAPBOX_API_KEY |
here | HERE_API_KEY |
tomtom | TOMTOM_API_KEY |
mapquest | MAPQUEST_API_KEY |
bing | BINGMAPS_API_KEY |
geoapify | GEOAPIFY_KEY |
The minimum time (in seconds) required per query to comply with the
usage limitations policies of each geocoding service is stored in the
min_time_reference
dataset. See
?min_time_reference
.
method | min_time | description |
---|---|---|
osm | 1.00 | 1 query per second |
geocodio | 0.06 | 1000 queries per minute (free tier) |
iq | 1.00 | 60 queries per minute (free tier) |
0.02 | 50 queries per second | |
opencage | 1.00 | 1 query per second (free tier) |
mapbox | 0.10 | 600 queries per minute (free tier) |
tomtom | 0.20 | 5 queries per second (free tier) |
here | 0.20 | 5 queries per second (free tier) |
geoapify | 0.20 | 5 queries per second (free tier) |
Links to the usage policies for each geocoding service:
The maximum number of inputs (geographic coordinates or addresses)
per batch query for each geocoding service is stored in the
batch_limit_reference
dataset. See
?batch_limit_reference
.
method | batch_limit |
---|---|
census | 10,000 |
geocodio | 10,000 |
tomtom | 10,000 |
here | 1,000,000 |
mapquest | 100 |
bing | 50 |