knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

addAadtData

R-CMD-check

The goal of addAadtData is to add Average Annual Daily Traffic (AADT) data from the U.S. Department of Transportation Federal Highway Administration to geocoded data.

Input data should have columns called lat and lon that contain geographic coordinates. addAadtData estimates the exposure to traffic within a user-specified radius (defaults to 400 m) around the input coordinates. Specifically, the length of roads (in meters), the average daily number of vehicles multiplied by the length of the roads (vehicle_meters), and the average daily number of trucks multiplied by the length of the roads (truck_meters) are calculated.

Each of these variables is broken down by traffic type, as defined below:

| traffic type | types of roads | FHA F_System Classification | |--------------------|-------------------|-------------------| | moving | interstates, expressways, and freeways | Interstate and Principal Arterial - Other Freeways and Expressways | | stop_go | arterial roads (frequent stops lights, etc) | Principal Arterial - Other and Minor Arterial |

Installation

Because this package contains all the aadt data, it takes a few minutes to install.

# adjust options to allow for longer download
options(timeout = 300)

# install.packages("remotes")
devtools::install_github("geomarker-io/addAadtData")

Example

library(addAadtData) 

d <- tibble::tribble(
  ~id,       ~lat,        ~lon,
  55001310120,         NA,          NA,
  55000100280,   39.19674,  -84.582601,
  55000100281,   39.28765,  -84.510173,
  55000100282,  39.158521,  -84.417572,
  55000100283,  39.158521,  -84.417572,
  55000100284, 39.2747872, -84.8203868,
  55000100285, 39.2810336, -84.8564059,
)

add_aadt(d)


geomarker-io/addAadtData documentation built on April 14, 2022, 7:41 p.m.