Description Usage Arguments Details Value Examples
View source: R/otp_evaluate_surface.R
Evaluates an existing travel time surface. Using a pointset from a specified CSV file, the travel time to each point is obtained from the specified surface. Accessibility indicators are then generated for one or more 'opportunity' columns in the pointset. For example, you might have the number of jobs available at each location, or the number of hospital beds.
1 | otp_evaluate_surface(otpcon, surfaceId, pointset, detail = FALSE)
|
otpcon |
An OTP connection object produced by |
surfaceId |
Integer, the id number of an existing surface created using
|
pointset |
Character string, the name of a pointset known to OTP. A pointset is contained in a CSV file present in the pointset directory location passed to OTP at startup. The name of the pointset is the name of the file (without extension). |
detail |
logical, whether the travel time from the surface origin to each location in the pointset should be returned. Default is FALSE. |
This function requires OTP to have been started with the --analyst
switch and
the --pointset
parameter set to the path of a directory containing the pointset file(s).
Assuming no error, returns a list containing 4 or more elements:
errorId
Will be "OK" if no error condition.
surfaceId
The id of the surface that was evaluated.
One or more dataframes for each of the 'opportunity' columns in the pointset CSV file. Each dataframe contains four columns:
minutes. The time from the surface origin in one-minute increments.
counts. The number of the opportunity locations reached within each minute interval.
sum. The sum of the opportunities at each of the locations reached within each minute interval.
cumsums. A cumulative sum of the opportunities reached.
If detail
was set to TRUE then an additional dataframe containing
the time taken (in seconds) to reach each point in the pointset CSV file. If a
point was not reachable the time will be recorded as NA.
query
The URL that was submitted to the OTP API.
If there is an error, a list containing 3 elements is returned:
errorId
The id code of the error.
errorMessage
The error message.
query
The URL that was submitted to the OTP API.
1 2 3 4 | ## Not run:
otp_evaluate_surface(otpcon, surfaceId = 0, pointset = "jobs", detail = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.