parse_geohosts: Parse geohost API results

Description Usage Arguments Value See Also Examples

View source: R/geohost.R

Description

This is a wrapper of API result parsers for ipify, ipinfo and ipstack. If geohost yielded 'raw' results, you can then convert the output lists to a structured data using this function.

Usage

1
2
parse_geohosts(ghlst, output = c("country", "region", "city", "all"),
  ...)

Arguments

ghlst

a list comprising of lists of class 'ipify_geohost', 'ipinfo_geohost' or 'ipstack_geohost'.

output

character, 'country', 'region', 'city', 'all', or 'raw'. Refer to geohost.

...

other arguments to pass to the function

Value

a tibble

See Also

parse_api_data, geohost, geocode, parse_geocode; revgeocode, parse_revgeocode

Examples

1
2
3
4
5
## Not run: 
ghlst <- geohost(c('<IP1>', '<IP2>'), output='raw')  # yield a list
parse_geohosts(ghlst) 

## End(Not run)

madlogos/asesgeo documentation built on Aug. 9, 2019, 9:53 a.m.