Skip to contents

Summarizes average annual daily traffic meters (aadtm) traveled on F1 and F2 roadways within buffer distance of each s2 cell as totals per vehicle class (trucks_buses, tractor_trailer, and passenger); dates are not used to link to traffic data.

Usage

get_traffic_summary(x, buffer = 400, ...)

Arguments

x

a s2_cell_dates vector (see ?s2cd)

buffer

distance from s2 cell (in meters) to summarize data

...

passed to stow::stow(). The package and subdir arguments are fixed by geomarker.

Value

data frame with one row per input location and numeric traffic summaries aadtm_trucks_buses, aadtm_tractor_trailer, and aadtm_passenger

Details

Traffic data are derived from the final 2024 Highway Performance Monitoring System (HPMS) File Geodatabase published by the Bureau of Transportation Statistics. Only roads with F_SYSTEM classification of 1 ("interstate") or 2 ("principal arterial - other freeways and expressways") are used. Passenger vehicles (FHWA 1-3) are calculated as the total minus FHWA class 4-7 (single unit) and 8-13 (combination). FHWA documents substantial missing portions of the 2024 data for North Dakota and New Jersey. In addition, 55 retained roadway sections report single-unit plus combination AADT greater than total AADT; the documented passenger-vehicle subtraction is preserved for those source records rather than silently modifying them.

The processed traffic data are distributed separately from the R package as a GeoPackage asset attached to a versioned geomarker data release. The file is saved as a durable managed local copy in the get_traffic_summary directory the first time it is required and reused on subsequent calls.

Examples

local({
  withr::local_envvar(
    R_USER_DATA_DIR = fs::path_package("geomarker", "gmrkr--8841"),
    R_GEOMARKER_NO_DOWNLOAD = "true"
  )
  print(get_traffic_summary(s2cd_example_cincy(), buffer = 1500))
})
#> Using managed local copy: /home/runner/work/_temp/Library/geomarker/gmrkr--8841/R/geomarker/stow/get_traffic_summary/09ca5f3bbcbd7e24--hpms_2024_f12_aadt.gpkg
#> Summarizing HPMS 2024 traffic for 100 unique locations in 1 region...
#>   ...processed 7,122 regional roadway candidates
#>     aadtm_trucks_buses aadtm_tractor_trailer aadtm_passenger
#> 1                    0                     0               0
#> 2                    0                     0               0
#> 3                    0                     0               0
#> 4              4961110              16846526        81547376
#> 5                    0                     0               0
#> 6                    0                     0               0
#> 7                    0                     0               0
#> 8                    0                     0               0
#> 9                    0                     0               0
#> 10                   0                     0               0
#> 11                   0                     0               0
#> 12                   0                     0               0
#> 13                   0                     0               0
#> 14                   0                     0               0
#> 15                   0                     0               0
#> 16                   0                     0               0
#> 17             5538972              29764457        70803702
#> 18                   0                     0               0
#> 19                   0                     0               0
#> 20                   0                     0               0
#> 21                   0                     0               0
#> 22                   0                     0               0
#> 23                   0                     0               0
#> 24                   0                     0               0
#> 25                   0                     0               0
#> 26                   0                     0               0
#> 27             2415859               3221145        48018589
#> 28             8824664              21698611       139230241
#> 29             7320889              28395602       167692070
#> 30                   0                     0               0
#> 31                   0                     0               0
#> 32                   0                     0               0
#> 33                   0                     0               0
#> 34             9293870              11787979       205604585
#> 35                   0                     0               0
#> 36                   0                     0               0
#> 37                   0                     0               0
#> 38                   0                     0               0
#> 39                   0                     0               0
#> 40                   0                     0               0
#> 41                   0                     0               0
#> 42                   0                     0               0
#> 43                   0                     0               0
#> 44                   0                     0               0
#> 45                   0                     0               0
#> 46                   0                     0               0
#> 47                   0                     0               0
#> 48                   0                     0               0
#> 49                   0                     0               0
#> 50                   0                     0               0
#> 51             3753537              46166611        75752179
#> 52                   0                     0               0
#> 53                   0                     0               0
#> 54                   0                     0               0
#> 55                   0                     0               0
#> 56                   0                     0               0
#> 57                   0                     0               0
#> 58                   0                     0               0
#> 59                   0                     0               0
#> 60                   0                     0               0
#> 61                   0                     0               0
#> 62                   0                     0               0
#> 63                   0                     0               0
#> 64                   0                     0               0
#> 65                   0                     0               0
#> 66                   0                     0               0
#> 67                   0                     0               0
#> 68                   0                     0               0
#> 69                   0                     0               0
#> 70                   0                     0               0
#> 71             8327928              13004000       155939003
#> 72                   0                     0               0
#> 73                   0                     0               0
#> 74                   0                     0               0
#> 75                   0                     0               0
#> 76                   0                     0               0
#> 77                   0                     0               0
#> 78                   0                     0               0
#> 79                   0                     0               0
#> 80                   0                     0               0
#> 81                   0                     0               0
#> 82                   0                     0               0
#> 83                   0                     0               0
#> 84            17111835              19809391       297113747
#> 85             1075430               5097908        25614502
#> 86                   0                     0               0
#> 87                   0                     0               0
#> 88                   0                     0               0
#> 89                   0                     0               0
#> 90                   0                     0               0
#> 91                   0                     0               0
#> 92                   0                     0               0
#> 93                   0                     0               0
#> 94                   0                     0               0
#> 95                   0                     0               0
#> 96                   0                     0               0
#> 97             1923088               1125878        49969807
#> 98                   0                     0               0
#> 99                   0                     0               0
#> 100                  0                     0               0