Learn R Programming

flownet (version 0.2.1)

africa_network: Trans-African Road Transport Network

Description

A spatial dataset representing a discretized road transport network connecting major African cities and ports. The network combines existing road infrastructure (2,344 edges) with proposed new links (481 edges) identified through network efficiency analysis. Each edge contains distance, travel time, border crossing costs, terrain characteristics, and road upgrade cost estimates.

Usage

data(africa_network)

Arguments

Format

A Simple feature collection (sf object) with 2,825 LINESTRING features and 28 fields:

from

Integer. Origin node index (1 to 1,377).

to

Integer. Destination node index (2 to 1,379).

from_ctry

Character. Origin country ISO3 code (49 countries).

to_ctry

Character. Destination country ISO3 code (49 countries).

FX

Numeric. Origin node longitude.

FY

Numeric. Origin node latitude.

TX

Numeric. Destination node longitude.

TY

Numeric. Destination node latitude.

sp_distance

Numeric. Spherical (great-circle) distance in meters.

distance

Numeric. Road distance in meters from OSRM routing.

duration

Numeric. Travel duration in minutes from OSRM routing (NA for proposed links).

speed_kmh

Numeric. Average speed in km/h (distance/duration) (NA for proposed links).

passes

Numeric. Number of optimal inter-city routes passing through this edge (NA for proposed links).

gravity

Numeric. Sum of population gravity weights from routes using this edge (NA for proposed links).

gravity_rd

Numeric. Sum of road-distance-weighted gravity from routes (NA for proposed links).

border_dist

Numeric. Additional distance for border crossing in meters (0 for domestic links).

total_dist

Numeric. Total distance including border crossing penalty in meters.

border_time

Numeric. Additional time for border crossing in minutes.

total_time

Numeric. Total travel time including border crossing in minutes.

duration_100kmh

Numeric. Hypothetical travel time at 100 km/h in minutes.

total_time_100kmh

Numeric. Hypothetical total time at 100 km/h including border penalties.

rugg

Numeric. Terrain ruggedness index along the edge.

pop_wpop

Numeric. Population within corridor (WorldPop data).

pop_wpop_km2

Numeric. Population density per km2 along corridor.

cost_km

Numeric. Estimated road construction/maintenance cost per km in USD.

upgrade_cat

Character. Road upgrade category: "Nothing", "Asphalt Mix Resurfacing", "Mixed Works", "Upgrade", or NA.

ug_cost_km

Numeric. Upgrade cost per km in USD.

add

Logical. TRUE for proposed new links, FALSE for existing road network edges.

geometry

LINESTRING. Spatial geometry in WGS 84 (EPSG:4326) coordinate reference system.

Details

The network was constructed through the following process:

  1. Computing optimal routes between all city pairs within 2,000km using OSRM

  2. Filtering routes using network efficiency criteria (alpha = 45 degrees, EU-grade efficiency)

  3. Intersecting and aggregating overlapping route segments

  4. Contracting the network to reduce complexity while preserving connectivity

  5. Identifying proposed new links that would improve network route efficiency

  6. Adding border crossing costs based on country pairs

  7. Computing terrain, population, and road cost attributes

The gravity and gravity_rd fields measure edge importance based on the population gravity model: routes between larger, closer cities contribute more weight to edges they traverse.

The bounding box spans continental Africa from approximately 34S to 37N latitude and 17W to 49E longitude.

See Also

africa_cities_ports, africa_segments, africa_trade, flownet-package

Examples

Run this code
library(sf)
data(africa_network)
head(africa_network)

# Existing vs proposed links
table(africa_network$add)

# Cross-border links
cross_border <- africa_network[africa_network$from_ctry != africa_network$to_ctry, ]
nrow(cross_border)

# Upgrade categories
table(africa_network$upgrade_cat, useNA = "ifany")

# \donttest{
# Plot by gravity
plot(africa_network["gravity_rd"])

# Highlight proposed new links
plot(africa_network[africa_network$add, "geometry"], col = "red", add = TRUE)
# }

Run the code above in your browser using DataLab