total.coverage: CoverageR

Description Usage Arguments Value Author(s) Examples

View source: R/totalcoverage.R

Description

Calculates whether locations are within a defined radius.

Usage

1
total.coverage(locations, lon, lat, distance)

Arguments

locations

Data Frame of locations

lon

Longitude for point of interest eg: The starting point

lat

Latitude for point of interest eg: The starting point

distance

Value for the size of the radius in KM eg: 1.4 or 3.0

Value

Table containing coverage information.

Author(s)

Chloe Morgan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 

Example One

distances <- c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1)
walking_time <- function(i) {
 distance <- i
 print(i)
 output <- get.multi.coverage(hotel,stop_data,i)
 output <- output %>% cbind(stop_locations)
 output <- output %>% distinct
 output$distance <- distance
 return(output)
 }

 result <- map_df(distances, walking_time)



## End(Not run)

chloeanalyst/coverageR documentation built on Dec. 19, 2021, 3:58 p.m.