postsigns: Post speed limit signs to Wikispeedia.

Description Usage Arguments Value Examples

View source: R/postsigns.r

Description

Post speed limit signs to Wikispeedia.

Usage

1
2
3
4
postsigns(input = NULL, type = list("args", "list", "df"), mlat = NA,
  mlon = NA, malt_meters = NA, mmph = NA, mkph = NA, mtag = NA,
  mcog = NA, mhours = NA, memail = NA, style = "POST",
  curl = getCurlHandle())

Arguments

input

Input R object to the function to post signs: list or data.frame.

type

Type of input: a single point (args), a list containing more than one point (list), or a data.frame (df).

mlat

Latitude of the point in degree decimal.

mlon

Longitude of the point in degree decimal.

malt_meters

Altidue of the point in meters.

mmph

Speed of speed limit sign in mph.

mkph

Speed of speed limit sign in kph.

mtag

Name of the sign.

mcog

Course over ground in degrees.

mhours

Optional field, not used presently.

memail

Email address of submitter.

curl

curl handle

style

"GET" or "POST"

Value

Returns success message if post succesful.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# Post a single sign
postsigns(mlat=49.87, mlon=-145.05, malt_meters=20, mmph=60, mtag="scotttest18", mcog=0, memail="[email protected]", type = 'args')

# Post many signs
sign1 <- list(mlat=59.87, mlon=-115.05, malt_meters=20, mmph=60, mtag="testlist1", mcog=0, memail="[email protected]")
sign2 <- list(mlat=59.87, mlon=-125.05, malt_meters=20, mmph=60, mtag="testlist2", mcog=0, memail="[email protected]")
mysigns <- list(sign1, sign2)
postsigns(input = mysigns, type = 'list')

# Reading in data from spreadsheet (create your own following format of one below)
dat <- read.csv("~/github/SChamberlain/rwikispeedia/data/signs.csv")
postsigns(input = dat, type = 'df')

## End(Not run)

sckott/rwikispeedia documentation built on May 26, 2017, 3:47 a.m.