speed_moves return an object of average speed bins as defined by US EPA MOVES. The input must be speed as miles/h (mph)

moves_speed(x, net)

Arguments

x

Object with class, "sf", "data.frame", "matrix" or "numeric" with speeds in miles/h (mph)

net

optional spatial dataframe of class "sf". it is transformed to "sf".

Examples

{
data(net)
net$mph <- units::set_units(net$ps, "miles/h")
net$speed_bins <- moves_speed(net$mph)
head(net)
moves_speed(net["ps"])
}
#> old-style crs object detected; please recreate object with a recent sf::st_crs()
#> old-style crs object detected; please recreate object with a recent sf::st_crs()
#> Simple feature collection with 1505 features and 1 field
#> Geometry type: LINESTRING
#> Dimension:     XY
#> Bounding box:  xmin: -46.8066 ymin: -23.62 xmax: -46.696 ymax: -23.5287
#> old-style crs object detected; please recreate object with a recent sf::st_crs()
#> Geodetic CRS:  WGS 84
#> First 10 features:
#> old-style crs object detected; please recreate object with a recent sf::st_crs()
#> old-style crs object detected; please recreate object with a recent sf::st_crs()
#>    ps                       geometry
#> 1   2 LINESTRING (-46.74635 -23.6...
#> 2   6 LINESTRING (-46.73996 -23.5...
#> 3   5 LINESTRING (-46.7061 -23.61...
#> 4  10 LINESTRING (-46.74296 -23.6...
#> 5   8 LINESTRING (-46.77355 -23.5...
#> 6  15 LINESTRING (-46.70467 -23.5...
#> 7   7 LINESTRING (-46.7264 -23.61...
#> 8   7 LINESTRING (-46.7264 -23.61...
#> 9   5 LINESTRING (-46.69874 -23.5...
#> 10  5 LINESTRING (-46.74664 -23.6...