Package 'digitransit'

Title: A client for digitransit API services
Description: Geocode and reverse geocode addresses and poinst in Finland.
Authors: Markus Kainu
Maintainer: Markus Kainu <[email protected]>
License: MIT + file LICENSE
Version: 0.1.1
Built: 2025-01-30 11:22:41 UTC
Source: https://github.com/rOpenGov/digitransit

Help Index


Geocode a place name or an address

Description

Geocode a place name or an address

Usage

geocode(
  string = "helsinki",
  hits = 1,
  host = "https://api.digitransit.fi/geocoding"
)

Arguments

string

plane name or an address

hits

Number of hits returned

host

Define host, for instance http://localhost:3100 if running docker container locally

Value

Data frame with latitude and longitude of the place

Examples

geocode(string = "Eduskuntatalo", hits = 1)

Reverse geocode a geographical location

Description

Reverse geocode a geographical location

Usage

reverse_geocode(
  lon = "24.95126",
  lat = "60.15948",
  hits = 1,
  host = "https://api.digitransit.fi/geocoding"
)

Arguments

lon

longitute

lat

A latitude

hits

Number of hits returned

host

Define host, for instance http://localhost:3100 if running docker container locally

Value

Data frame with information about the point

Examples

reverse_geocode(lon = "24.95126", lat = "60.15948", hits = 1)