wiki_geometry: Get Lat/Long Coordinates from Wikipedia Page

Description Usage Arguments Value Examples

View source: R/wiki_geometry.R

Description

A helper function to parse Wikipedia-style geographic coordinates.

Usage

1
wiki_geometry(data, delete_coords = T, coordinates)

Arguments

data

A data frame that contains a column of coordinates from Wikipedia.

delete_coords

Boolean value that indicates whether to remove the original coordinates column.

coordinates

A character object that contains the name of the column that contains the coordiantes to parse. If missing, the function will look for columns named coords or coordinates.

Value

Returns a the dataframe passed in the argument data, with columns lat and lon appended. By default, the original coordinates column is deleted.

Examples

1
wiki_table("List_of_metro_systems") %>% wiki_names()

niedermansam/wikiScraper documentation built on Nov. 4, 2019, 10:06 p.m.