Package: trafficCAR 0.1.1

Madison Ell

trafficCAR: Bayesian CAR Models for Road-Segment Traffic

Tools for simulating and modeling traffic flow on road networks using spatial conditional autoregressive (CAR) models. The package represents road systems as graphs derived from 'OpenStreetMap' data <https://www.openstreetmap.org/> and supports network-based spatial dependence, basic preprocessing, and visualization for spatial traffic analysis.

Authors:Madison Ell [aut, cre]

trafficCAR_0.1.1.tar.gz
trafficCAR_0.1.1.tar.gz(r-4.6-any)trafficCAR_0.1.1.tar.gz(r-4.5-any)
trafficCAR_0.1.1.tgz(r-4.5-emscripten)
trafficCAR.pdf |trafficCAR.html
trafficCAR/json (API)

# Install 'trafficCAR' in R:
install.packages('trafficCAR', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))
Datasets:

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

3.90 score 23 exports 46 dependencies

Last updated from:a7809875d4. Checks:4 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK186
source / vignettesOK216
linux-release-x86_64OK189
wasm-releaseOK151

Exports:augment_roadsbuild_adjacencybuild_networkcar_precisionfetch_osm_roadsfit_carfit_trafficicar_sum_to_zerointrinsic_car_precisionmap_roads_interactivemap_roads_interactive_layersmoran_residualsplot_mcmc_diagnosticsplot_observed_fittedplot_predictedplot_relative_congestionplot_roads_staticplot_traffic_mapppc_summaryroads_to_segmentssample_proper_carsimplify_networkweights_from_adjacency

Dependencies:abindbackportscheckmateclassclassIntclicpp11DBIdistributionale1071farvergenericsggplot2gluegtableigraphisobandKernSmoothlabelinglatticelifecyclemagrittrMASSMatrixmatrixStatsnumDerivpillarpkgconfigposteriorproxyR6RColorBrewerRcpprlangs2S7scalessftensorAtibbleunitsutf8vctrsviridisLitewithrwk

CAR-models

Rendered fromCAR-models.Rmdusingknitr::rmarkdownon Mar 30 2026.

Last update: 2026-01-27
Started: 2026-01-27

Creating Custom Road Datasets with trafficCAR

Rendered fromcreating-custom-road-datasets.Rmdusingknitr::rmarkdownon Mar 30 2026.

Last update: 2026-01-27
Started: 2026-01-27

Fetching OSM roads

Rendered fromfetch-osm-roads.Rmdusingknitr::rmarkdownon Mar 30 2026.

Last update: 2026-01-27
Started: 2026-01-27

Plotting model fit, diagnostics, and spatial patterns

Rendered fromplot-model-fit-diagnostics-spatial.Rmdusingknitr::rmarkdownon Mar 30 2026.

Last update: 2026-01-27
Started: 2026-01-27

Sampling from Gaussian CAR and ICAR Models

Rendered fromsampling.Rmdusingknitr::rmarkdownon Mar 30 2026.

Last update: 2026-01-27
Started: 2026-01-27

traffic-flow

Rendered fromtraffic-flow.Rmdusingknitr::rmarkdownon Mar 30 2026.

Last update: 2026-01-27
Started: 2026-01-27

trafficCAR Model Diagnostics and Checking

Rendered frommodel_diagnostics_and_checking.Rmdusingknitr::rmarkdownon Mar 30 2026.

Last update: 2026-01-27
Started: 2026-01-27

trafficCAR-intro

Rendered fromtrafficCAR-intro.Rmdusingknitr::rmarkdownon Mar 30 2026.

Last update: 2026-01-27
Started: 2026-01-27

Readme and manuals

Help Manual

Help pageTopics
Augment roads with predicted traffic quantitiesaugment_roads
Build segment adjacency from segment geometriesbuild_adjacency
Build a road network graph from sf LINESTRING databuild_network
CAR precision matrix from an adjacency matrixcar_precision
Fetch road geometries from OpenStreetMapfetch_osm_roads
Fit Gaussian CAR / ICAR regression via Gibbs samplingfit_car
Fit a Gaussian CAR traffic model (speed or travel time)fit_traffic
Apply sum-to-zero constraint to ICAR precisionicar_sum_to_zero
Intrinsic CAR (ICAR) precision matrixintrinsic_car_precision
Interactive map of road-segment traffic measuresmap_roads_interactive
Interactive map with multiple standard traffic layersmap_roads_interactive_layers
Moran's I for trafficCAR residualsmoran_residuals
MCMC diagnostic plotsplot_mcmc_diagnostics
Plot observed vs predicted traffic valuesplot_observed_fitted
Plot predicted traffic outcome on road networkplot_predicted
Plot relative congestion on road networkplot_relative_congestion
Static map of road-segment traffic measuresplot_roads_static
Quick map helper for augmented roadsplot_traffic_map
Posterior predictive checks for trafficCAR fitsppc_summary
Residuals for trafficCAR fitsresiduals.traffic_fit
Example road network datasetsroads_cstat roads_datasets roads_small
Convert road geometries to modeling segmentsroads_to_segments
Gibbs sampler for a proper CAR latent Gaussian modelsample_proper_car
Simplify a built network object by removing parallel edges (and loops)simplify_network
Construct spatial weights matrixweights_from_adjacency