Package 'whatthreewords'

Title: Work with the 'what3words' API for Easy Location Referencing
Description: Use the 'what3words' API <https://developer.what3words.com/public-api> to return three words which uniquely identify every 3m x 3m square on Earth. It is also possible to return coordinates from any valid three words location. Supports multiple languages.
Authors: David Smith [aut, cre, cph]
Maintainer: David Smith <[email protected]>
License: MIT + file LICENSE
Version: 0.1.3
Built: 2024-08-28 03:18:22 UTC
Source: https://github.com/davidasmith/whatthreewords

Help Index


Returns the coordinates for a given what3words address

Description

Returns the coordinates for a given what3words address

Usage

coords_from_words(words, full_details = FALSE)

Arguments

words

A what3words location

full_details

FALSE (default) to return only the coordinates. TRUE for full details.

Value

If full_details == FALSE (the default) a matrix of WGS84 coordinates. Otherwise a list of full details for each what3words location.

Examples

coords_from_words("hotdog.jumping.frog")

Gets the value of the WTW_API_KEY environment variable

Description

Gets the value of the WTW_API_KEY environment variable

Usage

get_api_key()

Value

The value of the WTW_API_KEY environment variable.

Examples

## Not run: get_api_key()

Gets available languages for use in the what3words API

Description

Gets available languages for use in the what3words API

Usage

get_available_languages()

Value

A dataframe of available languages.

Examples

get_available_languages()

Get what3words address from coordinates

Description

Get what3words address from coordinates

Usage

words_from_coords(lat, lon, language = "en", full_details = FALSE)

Arguments

lat

Latitude

lon

Longitude

language

Code for the language of the returned words.

full_details

Whether to return the full details from the API, or only the what3words address for the coordinates.

Value

If full_details is FALSE (the default), returns a character vector of the what3words for the submitted coordinates. Otherwise returns a list of the full details returned by the API.

Examples

words_from_coords(lat = 51.5095, lon = -0.1266)