R/data.R

#' @import dplyr
#' @import sf
#' @import spdep
#' @import ArchipelagoEngine
#' @importFrom ggplot2 ggplot aes geom_line
NULL

#' Philippine RoRo Connectivity Network
#'
#' A comprehensive dataset of the Philippine Strong Republic
#' Nautical Highway (SRNH) and Missionary Routes (2024-2026).
#'
#' @format A data frame with 108 rows and 16 variables:
#' \describe{
#'   \item{from_prov}{Origin province name, GADM-standardized}
#'   \item{to_prov}{Destination province name, GADM-standardized}
#'   \item{route_name}{The official name of the ferry connection}
#'   \item{dist_nm}{Distance in nautical miles}
#'   \item{avg_time_hrs}{Average travel time in hours}
#'   \item{freq_daily}{Average daily frequency of trips (The Weight)}
#'   \item{pax_cap}{Estimated passenger capacity}
#'   \item{cargo_cap}{Estimated truck units (Logistical Flow)}
#'   \item{marina_code}{Official MARINA classification code}
#'   \item{highway_type}{Western, Central, Eastern, or Missionary}
#'   \item{from_lat}{Origin Latitude}
#'   \item{from_lon}{Origin Longitude}
#'   \item{from_region}{Luzon, Visayas, or Mindanao}
#'   \item{to_lat}{Destination Latitude}
#'   \item{to_lon}{Destination Longitude}
#'   \item{to_region}{Destination Region}
#' }
#' @source Philippine Ports Authority (PPA) and MARINA (2024-2026).
#' @examples
#' library(roroph)
#' library(dplyr)
#'
#' # Load the network data
#' data(roro_routes)
#'
#' # Example 1: Basic Analysis of Connectivity
#' # Calculate the average passenger capacity per highway system
#' roro_routes %>%
#'   group_by(highway_type) %>%
#'   summarise(mean_pax = mean(pax_cap, na.rm = TRUE))
#'
#' # Example 2: Spatial Adjacency Logic (Anselin/LeSage framework)
#' # Filter for the Western Nautical Highway (WNH) hubs
#' wnh_hubs <- roro_routes[roro_routes$highway_type == "Western", ]
#'
#' # Simple validation check of coordinates for spatial weight construction
#' if (requireNamespace("sf", quietly = TRUE)) {
#'   library(sf)
#'   # Check if coordinates are within the Philippine bounding box
#'   bbox_check <- all(wnh_hubs$from_lat > 4 & wnh_hubs$from_lat < 21)
#'   message("Coordinate validity: ", bbox_check)
#' }
"roro_routes"

Try the roroph package in your browser

Any scripts or data that you put into this service are public.

roroph documentation built on April 17, 2026, 1:07 a.m.