Get Frequency Table

osm.getFrequency(indf, inword = "shop", removeNA = T)

Arguments

indf

The vec

inword

Boole

removeNA

Ad

Value

A nice histogram of a single variable with an additional Cumulative Density curve.

Author

Dimitris Kavroudakis dimitris123@gmail.com

Examples

library(goal)
sh = osm.getPOI(inPerioxi = "Mytilene Municipal Unit", inkey = "shop")
#> Issuing query to Overpass API ...
#> Announced endpoint: none
#> Query complete!
#> converting OSM data to sf format
shops = osm.combineShops(sh)
#> Warning: st_centroid assumes attributes are constant over geometries
#> Warning: GDAL Error 1: PROJ: proj_as_wkt: DatumEnsemble can only be exported to WKT2:2019
#> Warning: GDAL Error 1: PROJ: proj_as_wkt: DatumEnsemble can only be exported to WKT2:2019
#> Warning: st_centroid assumes attributes are constant over geometries
#> Warning: GDAL Error 1: PROJ: proj_as_wkt: DatumEnsemble can only be exported to WKT2:2019
freq2 = osm.getFrequency(shops, inword = "shop", removeNA = F)
freq2
#> # A tibble: 94 × 3
#>    shop            n  freq
#>  * <chr>       <int> <dbl>
#>  1 NA            500 41.5 
#>  2 clothes        93  7.72
#>  3 convenience    60  4.98
#>  4 hairdresser    41  3.41
#>  5 bakery         26  2.16
#>  6 jewelry        26  2.16
#>  7 supermarket    25  2.08
#>  8 kiosk          23  1.91
#>  9 butcher        21  1.74
#> 10 shoes          21  1.74
#> # ℹ 84 more rows