diff --git a/R/create_config.R b/R/create_config.R index dcd9e50..97e5934 100644 --- a/R/create_config.R +++ b/R/create_config.R @@ -86,13 +86,11 @@ get_config_path <- function(){ } if(dir.exists(tmp_folder)){ tmp_file = paste(tmp_folder, config_name, sep = "") - if(file.exists(tmp_file)) { - return(tmp_file) + if(!file.exists(tmp_file)) { + create_config() + message("Creation of a default config file in the temp directory, please use create_config() to overwrite.") + tmp_file = paste(tmp_folder, config_name, sep = "") } - } else { - create_config() - message("Creation of a default config file in the temp directory, please use create_config() to overwrite.") - tmp_file = paste(tmp_folder, config_name, sep = "") return(tmp_file) } } diff --git a/R/data_import.R b/R/data_import.R index 602e116..e2297ee 100644 --- a/R/data_import.R +++ b/R/data_import.R @@ -37,7 +37,7 @@ import_sensor <- function(list_sensor){ } data <- map_dfr(list_sensor, ~ { - file <- paste0('folder_path', .x, '.RData') + file <- paste0(folder_path, .x, '.RData') if (file.exists(file)) { # we select the data that we don't consider null (arbitrary choice) import <- load(file) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 4e883b8..58a27e5 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: data-details: data-details.html data-visualization: data-visualization.html -last_built: 2024-05-26T11:35Z +last_built: 2024-05-26T12:44Z urls: reference: https://ketsiaguichard.github.io/telraamStats/reference article: https://ketsiaguichard.github.io/telraamStats/articles diff --git a/docs/reference/import_sensor.html b/docs/reference/import_sensor.html index abbae70..077cf76 100644 --- a/docs/reference/import_sensor.html +++ b/docs/reference/import_sensor.html @@ -86,9 +86,9 @@

Exampleswrite_update_data('ParisArcEnCiel-05', period[1], period[2]) #> Error in eval(expr, envir, enclos): object 'period' not found import_sensor(c('RteVitre-06', 'ParisArcEnCiel-05')) -#> No data stored for RteVitre-06 -#> No data stored for ParisArcEnCiel-05 -#> # A tibble: 0 × 0 +#> # A tibble: 0 × 2 +#> # ℹ 2 variables: car_speed_hist_0to70plus <list>, +#> # car_speed_hist_0to120plus <list> diff --git a/docs/search.json b/docs/search.json index 7ff1471..1a0766b 100644 --- a/docs/search.json +++ b/docs/search.json @@ -1 +1 @@ -[{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Gathering data","text":"vignette describes traffic data Telraam sensors get access specific data. go , ’ll attach packages use.","code":"library(telraamStats)"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"telraam","dir":"Articles","previous_headings":"Introduction","what":"Telraam","title":"Gathering data","text":"Telraam Belgian company develops sensors monitoring collecting multi-modal traffic data. sensors equipped cameras count road users using various mode transport, including pedestrian, cyclists, cars heavy vehicles. diverse range stakeholders (individuals, community groups, local authoritieds, researchers…) can purchase install Telraam sensor buildings. map sensors available Telraam website. Everyone can access data web interface (example) API.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"available-data","dir":"Articles","previous_headings":"Introduction > Telraam","what":"Available data","title":"Gathering data","text":"Telraam API provides information road segments sensors locations, parameters, importantly, offers traffic data. Every hour, sensor sends information traffic counts, transportation mode road direction, along confidence metric. addition traffic counts, estimated car speed car speed histogram also available. details data provided vignette.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"included-dataset","dir":"Articles","previous_headings":"Introduction","what":"Included dataset","title":"Gathering data","text":"’re interested discovering Telraam data playing real traffic data, dataset two road segments city Châteaubourg (FR) included package. Châteaubourg municipality Brittany, northwestern France. population around 7,500 inhabitants area less 30km\\(^2\\). France, city largest number Telraam sensors 2023 far highest density sensors. two road segments offer hourly data January 1, 2022, December 31, 2022. data directly extracted API may contain missing extreme values.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"load-included-dataset","dir":"Articles","previous_headings":"Introduction > Included dataset","what":"Load included dataset","title":"Gathering data","text":"Included dataset lazily loaded telraamStats package. already called library(telraamStats), dataset already attached can call directly : Otherwise, don’t want load entire package, can also access dataset using telraamStats::traffic.","code":"head(traffic)"},{"path":[]},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"obtain-a-telraam-token","dir":"Articles","previous_headings":"Introduction > Retrieve data from a specific road segment or set of segments","what":"1. Obtain a Telraam token","title":"Gathering data","text":"work data one sensor - -, must first create Telraam (free) account obtain API token. API token serves unique identifier accessing Telraam API service, used package. can generate personal dashboard Telraam website. information Telraam API, refer Telraam Q&website.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"specify-your-token-in-configuration","dir":"Articles","previous_headings":"Introduction > Retrieve data from a specific road segment or set of segments","what":"2. Specify your token in configuration","title":"Gathering data","text":"strongly recommended directly embed token code, especially code shared versioned using system like Git. two options specify Telraam token : Edit .Renviron file. .Renviron useful defining sensitive information R environment variables: contains list environment variables set. easy way edit file add Telraam token using usethis package. Run following command (either every time change API Token) : .Renviron file open RStudio can add new line form token='YourTelraamAPIToken'. comfortable previous step, can use built-function telraamStats package. However, keep mind need run function every time want retrieve data: want verify token correctly set, can use following command :","code":"if (!require(\"usethis\")) install.packages(\"usethis\") #if you haven't installed 'usethis' already usethis::edit_r_environ() set_telraam_token(token = 'YourTelraamAPIToken') get_telraam_token()"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"specify-road-segment-ids-in-configuration-file","dir":"Articles","previous_headings":"Introduction > Retrieve data from a specific road segment or set of segments","what":"3. Specify road segment IDs in configuration file","title":"Gathering data","text":"road segment unique ID, can found Telraam location URL. instance, URL one Châteaubourg’s segments https://telraam.net/home/location/9000005665, ID located last part URL (9000005665). gathered IDs segments, can specify editing inst\\config.yml file. file can created using create_config() function. executed, find config.yml file inst\\ folder work directory. file already contains following template, can modify (directly yml file) add segments, adhering format template, , segment name (without quotes), followed colon, segment number within quotes : segmentName: '9000000000'. can specify many segments want personalize segment’s names. don’t want create folder project directory, another option use temporary folder specify segments names IDs directly create_config() function, re-run command session.","code":"create_config(create_directory = TRUE) default: url: https://telraam-api.net/v1 segments: segment-01: '9000000000' segment-02: '9000000000' default: url: https://telraam-api.net/v1 segments: MyFirstSegment: '9000000000' My-second-segment: '9000000000' My_3rd_segment: '9000000000' list_of_segments = list(\"Burel\"= \"9000002156\", \"Vitre\" = \"9000001844\") create_config(segments = list_of_segments, create_directory = FALSE)"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"get-data-for-your-road-segments","dir":"Articles","previous_headings":"Introduction > Retrieve data from a specific road segment or set of segments","what":"4. Get data for your road segments","title":"Gathering data","text":"specified names IDs road segments, can use retrieve_sensor() function gather data segment Telraam API. function takes, arguments, name segment, first last day period interest. must use names specified configuration files dates must date type. want store data, can directly use write_update_data(), performs task also writes updates sensor data temporary folder data/ directory .Rdata format. arguments previous function: retrieve data already stored, can use import_sensor(). function imports data associated given list sensor names .RData files contained data/ directory. , also use names specified configuration files. available periods imported.","code":"retrieve_sensor(segment_name = \"segment-01\", start_date = as.Date('2023-09-01'), end_date = as.Date('2023-09-30')) write_update_data(segment_name = \"segment-01\", start_date = as.Date('2023-09-01'), end_date = as.Date('2023-09-30'), create_directory = FALSE) #TRUE if you want to save the data in a permanent folder import_sensor(list_sensor = c(\"segment-01\",\"segment-02\"))"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"data-details","dir":"Articles","previous_headings":"Introduction","what":"Data details","title":"Gathering data","text":"importing data road segments (following previous steps) using included dataset, obtain Telraam data columns. Among columns, important ones : segment_id : Telraam ID road segment ; date : date UTC time reporting interval (beginning interval) ; interval : can “hourly” “daily” hourly daily aggregate data ; uptime : 0 1, represents portion reporting interval actively spent counting traffic. information uptime parameter, can refer Telraam article ; heavy, heavy_lft, heavy_rgt : number heavy vehicles, total directions. also columns transportation mode (car, bike, pedestrian) ; car_speed_hist_0to70plus, car_speed_hist_0to120plus : estimated car speed distribution 10 km/h bins 0 70+ km/h 120+ km/h (percentage) ; v85 : estimated car speed limit km/h 85% cars respect. Complete data description can found data documentation package, can refer Telraam API website details.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Visualize and analyse traffic","text":"vignette illustrates potential visualizations (ensuing analysis) traffic data Telraam sensors provided package. go , ’ll attach packages use. also load data: , use dataset attached package, can certainly replicate visualizations analyses using data sensors. information data retrieval, can refer dedicated vignette (vignette(\"data-details\")). Included dataset lazily loaded telraamStats package. already called library(telraamStats), dataset already attached can call directly :","code":"library(telraamStats) head(traffic)"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"period-availability-for-your-segments","dir":"Articles","previous_headings":"","what":"Period availability for your segments","title":"Visualize and analyse traffic","text":"Road segment-specific sensors operate continuously; limited daylight duration may also face external issues (unplugged, falling, software problems, etc.). data collected period may continuous interruptions ranging hour several days. visualize traffic, important aware operating periods sensors analyzed, well quality data. data reliability provided uptime indicator. Uptime, ranging 0 1, corresponds percentage time camera actively counting passages. Following Telraam’s recommendations, uptime lower 0.5 considered associated poor-quality data. graphical representation , obtained using gg_availability() function, provides overview data availability quality different sensors entire period. indicator calculated daytime hours (5 .m. 8 p.m.) Telraam sensor operational. represents average uptime hours. illustrates daily average uptime evolution: higher value, better data quality sensor respective day. purpose assist selecting study periods. graph, example, can observe black time slots camera segment ‘ParisArcEnCiel-05’ report data end June 2022 end year 2022. can also notice average uptime higher summer period. illustrates fact duration daylight, therefore possible filming period, longer summer. graphs generated functions presented based data filtered according uptime parameter: hours uptime > 0.5 retained. filter editable moment ensures data considered sufficient level reliability.","code":"plot( gg_availability(traffic) )"},{"path":[]},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"traffic-evolution","dir":"Articles","previous_headings":"Traffic","what":"Traffic evolution","title":"Visualize and analyse traffic","text":"identified specific period want analyze, may want observe evolution traffic trends time. gg_traffic_evolution() enables representation traffic particular period, aggregated segments, specific direction, aggregated , aggregated transportation modes selected ones. Without specifying options, can view traffic evolution cars heavy vehicles segments entire period. default, smoothing curve (based GAM model cubic spline) used represent trend. can specify date range, one segments, different transportation modes directions choose whether want smoothing curve . default, aggregation done day, can obtain precise information setting agg_day parameter FALSE aggregate hour. example possible filters parameters :","code":"plot( gg_traffic_evolution(traffic) ) plot( gg_traffic_evolution(traffic, date_range = c('2022-01-01','2022-03-01'), segment = 'RteVitre-06', mode = c('car','pedestrian'), direction = 'lft', smoothed = FALSE, agg_day = FALSE) )"},{"path":[]},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"average-traffic-per-weekday","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per weekday","title":"Visualize and analyse traffic","text":"traffic varies according days week, can serve analytical window understand territorial mobility. gg_traffic_avg() function allows examine average behavior per day week. can used globally specifically (specific period, segment set segments, specific direction, particular transportation mode). default, function provides average traffic per day week : , instance, one can observe several different traffic dynamics, weekdays exhibiting similar patterns weekends displaying different ones (shifted morning peak smoother traffic throughout day). , ’s possible select specific period, specific segment, mode transportation, direction, day week according needs study. representation, instance, allows us see traffic one direction segment much heavier evening morning, even Fridays compared Mondays.","code":"plot( gg_traffic_avg(traffic) ) plot( gg_traffic_avg(traffic, date_range = c('2022-07-01','2022-09-01'), segment = 'RteVitre-06', mode = 'car', direction = 'rgt', weekday = c('monday','friday') ) )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"average-traffic-per-segment","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per segment","title":"Visualize and analyse traffic","text":"function gg_traffic_avg() can used calculate average traffic per segment compare segments . , simply use parameter 'aggregated_by' replace default value ('weekday') 'segment_name', shown example . function plot average traffic according time day, time road segment. representation allows us realize differences traffic, terms volumes dynamics. Similarly , possible specify period, direction travel, mode transportation, day week.","code":"plot( gg_traffic_avg(traffic, aggregated_by = \"segment_name\") ) plot( gg_traffic_avg(traffic, aggregated_by = 'segment_name', weekday = 'sunday', mode = 'car', direction = 'rgt') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"average-traffic-per-direction","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per direction","title":"Visualize and analyse traffic","text":"function gg_traffic_avg() can also used compare directions travel, using parameter aggregated_by = \"direction\" shown example . can particularly useful within road segment observe commuter traffic. , still possible filter modes transportation, days week, segments. example typical route significant commuter traffic, heavy traffic one direction morning direction evening.","code":"plot( gg_traffic_avg(traffic, aggregated_by = 'direction', weekday = 'monday', mode = 'car', segments = 'RteVitre-06' ) )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"average-traffic-per-mode","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per mode","title":"Visualize and analyse traffic","text":"Finally, function gg_traffic_avg() allows comparing modes transportation , particularly observe differences volumes dynamics, using parameter aggregated_by = \"direction\" shown example . , ’s possible filter directions, days week, segments, hours, course, select modes transportation","code":"plot( gg_traffic_avg(traffic, aggregated_by = 'mode', mode = c('heavy','car'), segment = 'RteVitre-06') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"car-speed","dir":"Articles","previous_headings":"","what":"Car speed","title":"Visualize and analyse traffic","text":"Telraam sensors offer speed estimation cars two levels : estimated car speed distribution (ranging 0 120+ km/h), 10 5 km/h bins ; v85, estimated car speed limit km/h 85% cars respect. 15% drivers drive faster v85 indicator. Telraam specifies speed-related measurements biases: accuracy likely better +/- 10%. Moreover, measurements pertain exclusively cars include modes transportation.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"car-speed-distribution","dir":"Articles","previous_headings":"Car speed","what":"Car speed distribution","title":"Visualize and analyse traffic","text":"car’s speed distribution can plotted globally filters (specific period, weekdays segments) function gg_car_speed_histogram(). Refer documentation information filters. function gg_car_speed_histogram() enables compare speed histograms different segments weekdays. example distinction road segment. example, can observe difference two segments: first segment (ParisArcEnCiel-05), speed distribution spread characterized peak low speeds. second segment (RteVitre-06) peak distribution 35-40 km/h class, values concentrated around range. period, 25% cars driving 35 40 km/h segment. example weekday available filters. shift less significant distinguishing sensors, one can still notice difference speed weekdays, likely attributable traffic dynamics differences observed earlier.","code":"plot( gg_car_speed_histogram(traffic) ) plot( gg_car_speed_histogram(traffic, aggregated_by = 'segment_name') ) plot( gg_car_speed_histogram(traffic, weekday = c('monday','sunday'), segments = 'RteVitre-06', hours = 17:20, aggregated_by = \"weekday\") )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"v85","dir":"Articles","previous_headings":"Car speed","what":"v85","title":"Visualize and analyse traffic","text":"v85 estimated car speed limit km/h 85% cars respect. 15% drivers drive faster v85. function gg_car_speed_v85() allows plotting evolution average indicator according time day. can particularly interesting link traffic, observe possible congestion phenomena , possible view indicator segment (aggregated_by = 'segment_name') day week (aggregated_by = 'weekday'). ’s example segment. Finally, still possible filter specific period particular segment.","code":"plot( gg_car_speed_v85(traffic) ) plot( gg_car_speed_v85(traffic, aggregated_by = 'segment_name') ) plot( gg_car_speed_v85(traffic, aggregated_by = 'weekday', date_range = c('2022-01-01','2022-03-01'), segments = 'RteVitre-06') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Visualize and analyse traffic","text":"vignette illustrates potential visualizations (ensuing analysis) traffic data Telraam sensors provided package. go , ’ll attach packages use. also load data: , use dataset attached package, can certainly replicate visualizations analyses using data sensors. information data retrieval, can refer dedicated vignette (vignette(\"data-details\")). Included dataset lazily loaded telraamStats package. already called library(telraamStats), dataset already attached can call directly :","code":"library(telraamStats) head(traffic)"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"period-availability-for-your-segments","dir":"Articles","previous_headings":"","what":"Period availability for your segments","title":"Visualize and analyse traffic","text":"Road segment-specific sensors operate continuously; limited daylight duration may also face external issues (unplugged, falling, software problems, etc.). data collected period may continuous interruptions ranging hour several days. visualize traffic, important aware operating periods sensors analyzed, well quality data. data reliability provided uptime indicator. Uptime, ranging 0 1, corresponds percentage time camera actively counting passages. Following Telraam’s recommendations, uptime lower 0.5 considered associated poor-quality data. graphical representation , obtained using gg_availability() function, provides overview data availability quality different sensors entire period. indicator calculated daytime hours (5 .m. 8 p.m.) Telraam sensor operational. represents average uptime hours. illustrates daily average uptime evolution: higher value, better data quality sensor respective day. purpose assist selecting study periods. graph, example, can observe black time slots camera segment ‘ParisArcEnCiel-05’ report data end June 2022 end year 2022. can also notice average uptime higher summer period. illustrates fact duration daylight, therefore possible filming period, longer summer. graphs generated functions presented based data filtered according uptime parameter: hours uptime > 0.5 retained. filter editable moment ensures data considered sufficient level reliability.","code":"plot( gg_availability(traffic) )"},{"path":[]},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"traffic-evolution","dir":"Articles","previous_headings":"Traffic","what":"Traffic evolution","title":"Visualize and analyse traffic","text":"identified specific period want analyze, may want observe evolution traffic trends time. gg_traffic_evolution() enables representation traffic particular period, aggregated segments, specific direction, aggregated , aggregated transportation modes selected ones. Without specifying options, can view traffic evolution cars heavy vehicles segments entire period. default, smoothing curve (based GAM model cubic spline) used represent trend. can specify date range, one segments, different transportation modes directions choose whether want smoothing curve . default, aggregation done day, can obtain precise information setting agg_day parameter FALSE aggregate hour. example possible filters parameters :","code":"plot( gg_traffic_evolution(traffic) ) plot( gg_traffic_evolution(traffic, date_range = c('2022-01-01','2022-03-01'), segment = 'RteVitre-06', mode = c('car','pedestrian'), direction = 'lft', smoothed = FALSE, agg_day = FALSE) )"},{"path":[]},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"average-traffic-per-weekday","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per weekday","title":"Visualize and analyse traffic","text":"traffic varies according days week, can serve analytical window understand territorial mobility. gg_traffic_avg() function allows examine average behavior per day week. can used globally specifically (specific period, segment set segments, specific direction, particular transportation mode). default, function provides average traffic per day week : , instance, one can observe several different traffic dynamics, weekdays exhibiting similar patterns weekends displaying different ones (shifted morning peak smoother traffic throughout day). , ’s possible select specific period, specific segment, mode transportation, direction, day week according needs study. representation, instance, allows us see traffic one direction segment much heavier evening morning, even Fridays compared Mondays.","code":"plot( gg_traffic_avg(traffic) ) plot( gg_traffic_avg(traffic, date_range = c('2022-07-01','2022-09-01'), segment = 'RteVitre-06', mode = 'car', direction = 'rgt', weekday = c('monday','friday') ) )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"average-traffic-per-segment","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per segment","title":"Visualize and analyse traffic","text":"function gg_traffic_avg() can used calculate average traffic per segment compare segments . , simply use parameter 'aggregated_by' replace default value ('weekday') 'segment_name', shown example . function plot average traffic according time day, time road segment. representation allows us realize differences traffic, terms volumes dynamics. Similarly , possible specify period, direction travel, mode transportation, day week.","code":"plot( gg_traffic_avg(traffic, aggregated_by = \"segment_name\") ) plot( gg_traffic_avg(traffic, aggregated_by = 'segment_name', weekday = 'sunday', mode = 'car', direction = 'rgt') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"average-traffic-per-direction","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per direction","title":"Visualize and analyse traffic","text":"function gg_traffic_avg() can also used compare directions travel, using parameter aggregated_by = \"direction\" shown example . can particularly useful within road segment observe commuter traffic. , still possible filter modes transportation, days week, segments. example typical route significant commuter traffic, heavy traffic one direction morning direction evening.","code":"plot( gg_traffic_avg(traffic, aggregated_by = 'direction', weekday = 'monday', mode = 'car', segments = 'RteVitre-06' ) )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"average-traffic-per-mode","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per mode","title":"Visualize and analyse traffic","text":"Finally, function gg_traffic_avg() allows comparing modes transportation , particularly observe differences volumes dynamics, using parameter aggregated_by = \"direction\" shown example . , ’s possible filter directions, days week, segments, hours, course, select modes transportation","code":"plot( gg_traffic_avg(traffic, aggregated_by = 'mode', mode = c('heavy','car'), segment = 'RteVitre-06') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"car-speed","dir":"Articles","previous_headings":"","what":"Car speed","title":"Visualize and analyse traffic","text":"Telraam sensors offer speed estimation cars two levels : estimated car speed distribution (ranging 0 120+ km/h), 10 5 km/h bins ; v85, estimated car speed limit km/h 85% cars respect. 15% drivers drive faster v85 indicator. Telraam specifies speed-related measurements biases: accuracy likely better +/- 10%. Moreover, measurements pertain exclusively cars include modes transportation.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"car-speed-distribution","dir":"Articles","previous_headings":"Car speed","what":"Car speed distribution","title":"Visualize and analyse traffic","text":"car’s speed distribution can plotted globally filters (specific period, weekdays segments) function gg_car_speed_histogram(). Refer documentation information filters. function gg_car_speed_histogram() enables compare speed histograms different segments weekdays. example distinction road segment. example, can observe difference two segments: first segment (ParisArcEnCiel-05), speed distribution spread characterized peak low speeds. second segment (RteVitre-06) peak distribution 35-40 km/h class, values concentrated around range. period, 25% cars driving 35 40 km/h segment. example weekday available filters. shift less significant distinguishing sensors, one can still notice difference speed weekdays, likely attributable traffic dynamics differences observed earlier.","code":"plot( gg_car_speed_histogram(traffic) ) plot( gg_car_speed_histogram(traffic, aggregated_by = 'segment_name') ) plot( gg_car_speed_histogram(traffic, weekday = c('monday','sunday'), segments = 'RteVitre-06', hours = 17:20, aggregated_by = \"weekday\") )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"v85","dir":"Articles","previous_headings":"Car speed","what":"v85","title":"Visualize and analyse traffic","text":"v85 estimated car speed limit km/h 85% cars respect. 15% drivers drive faster v85. function gg_car_speed_v85() allows plotting evolution average indicator according time day. can particularly interesting link traffic, observe possible congestion phenomena , possible view indicator segment (aggregated_by = 'segment_name') day week (aggregated_by = 'weekday'). ’s example segment. Finally, still possible filter specific period particular segment.","code":"plot( gg_car_speed_v85(traffic) ) plot( gg_car_speed_v85(traffic, aggregated_by = 'segment_name') ) plot( gg_car_speed_v85(traffic, aggregated_by = 'weekday', date_range = c('2022-01-01','2022-03-01'), segments = 'RteVitre-06') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Lilou Augeray. Author. Ulysse Caromel. Author. Ketsia Guichard. Maintainer. Pascal Irz. Author. Mijin Park. Author. Tanguy Richard. Author. Agis-ta-terre. Copyright holder, funder.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Augeray L, Caromel U, Irz P, Park M, Richard T (2024). telraamStats: Retrieval Visualization Mobility Data 'Telraam' Sensors. R package version 1.1.0, https://annuaire.agistaterre.org/telraamStats/.","code":"@Manual{, title = {telraamStats: Retrieval and Visualization of Mobility Data from 'Telraam' Sensors}, author = {Lilou Augeray and Ulysse Caromel and Pascal Irz and Mijin Park and Tanguy Richard}, year = {2024}, note = {R package version 1.1.0}, url = {https://annuaire.agistaterre.org/telraamStats/}, }"},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"telraamstats","dir":"","previous_headings":"","what":"Retrieval and Visualization of Mobility Data from Telraam Sensors","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"aim package grant user tools data visualisation data analysis mobility data Telraam sensors. example using package can seen application, although also utilizes advanced representations. Link Github repository","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"telraam-sensors","dir":"","previous_headings":"","what":"Telraam Sensors","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"Telraam Belgian company offers citizen-powered solution gathering diverse traffic data using affordable device. sensor continuously monitors street activity citizen’s window, capturing data various transportation modes like cars, heavy vehicles, cyclists, pedestrians. data crucial informing traffic planning engaging local communities dialogue authorities. sensors employs advanced AI proprietary algorithms detect, classify count road users, providing anonymous, aggregate data 15-minute resolution. device operates autonomously installed upper-floor window unobstructed view street. Data collected Telraam devices can shared Open Data. information view map currently available sensors, can visit Telraam website.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"specific-terms","dir":"","previous_headings":"","what":"Specific Terms","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"Telraam data includes specific terms essential use package : segment abbreviated term road segment. road segment part road, defined set geographical coordinate pairs Telraam id. segments defined typically two corners street, longer street likely consist multiple road segments ; sensor device measures traffic specific segment. Multiple sensors can associated road segment, unique sensor linked multiple segments. Sensors also defined configuration, primarily version (either V1 S2, S2 advanced version Telraam devices) ; uptime: Telraam V1 sensors don’t count trafic 100% time. portion time used calculations preprocessing. uptime percentage time counter actively counting. Data provided Telraam API already corrected uptime Telraam recommends keeping eye uptime values. high uptime, typically 0.7-0.8, indicates good data. first last daylight hour day consistently lower uptimes due aforementioned reasons, uptimes day 0.5, usually indicates potential issue instance. Uptime Telraam S2 units almost always 1.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"licence","dir":"","previous_headings":"","what":"Licence","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"work licensed Creative Commons Attribution-ShareAlike 4.0 International License.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"install-package","dir":"","previous_headings":"","what":"Install Package","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"","code":"install.packages('telraamStats') library(telraamStats)"},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"vignettes","dir":"","previous_headings":"","what":"Vignettes","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"Two vignettes currently available: one explaining retrieval Telraam data describing data included package (vignette(\"data-details\")) second detailing available graphical representations (vignette(\"data-visualization\")).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"future-developments","dir":"","previous_headings":"","what":"Future Developments","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"Future developments focus data quality topics: descriptive statistics visualizations data quality, well imputation methods data low update frequencies (indicating low quality).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/api_state.html","id":null,"dir":"Reference","previous_headings":"","what":"Check API State — api_state","title":"Check API State — api_state","text":"Return state Telraam API. Determine updates can made.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/api_state.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check API State — api_state","text":"","code":"api_state(key = get_telraam_token())"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/api_state.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check API State — api_state","text":"key api key (set set_telraam_token function)","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/api_state.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check API State — api_state","text":"TRUE API responds well, FALSE otherwise","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/car_speed_preprocessing.html","id":null,"dir":"Reference","previous_headings":"","what":"Preprocessing mandatory for car speed graphs functions — car_speed_preprocessing","title":"Preprocessing mandatory for car speed graphs functions — car_speed_preprocessing","text":"Preprocessing mandatory car speed graphs functions","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/car_speed_preprocessing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Preprocessing mandatory for car speed graphs functions — car_speed_preprocessing","text":"","code":"car_speed_preprocessing( enriched_data, date_range, segments, weekday, hours, aggregated_by )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/car_speed_preprocessing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Preprocessing mandatory for car speed graphs functions — car_speed_preprocessing","text":"enriched_data enriched data.frame containing data sensors date_range Date vector. example: c('2021-01-01','2022-01-01'). Full period NULL (default). segments Character vector. Selected road segment, NULL (default). weekday Character vector. Weekday choosen. Default week. hours Integer vector. Hours choosen, default day. aggregated_by Character. Enables comparison segments weekdays. Options : 'segment_name', 'weekday', NULL (comparison, default).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/car_speed_preprocessing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Preprocessing mandatory for car speed graphs functions — car_speed_preprocessing","text":"list parameters data preprocessed.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/check_options_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if options are available in the options list, replace by a default otherwise. — check_options_graph","title":"Check if options are available in the options list, replace by a default otherwise. — check_options_graph","text":"Check options available options list, replace default otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/check_options_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if options are available in the options list, replace by a default otherwise. — check_options_graph","text":"","code":"check_options_graph(options_selected, options_available, default)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/check_options_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if options are available in the options list, replace by a default otherwise. — check_options_graph","text":"options_selected List characters. Selected options. options_available List characters. Valid options. default List characters. Default options.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/check_options_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if options are available in the options list, replace by a default otherwise. — check_options_graph","text":"Options consistent possibilities","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/check_options_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check if options are available in the options list, replace by a default otherwise. — check_options_graph","text":"","code":"check_options_graph(c('car','pedestrian'), c('car','pedestrian','bike','heavy'),c('car','heavy')) #> [1] \"car\" \"pedestrian\" check_options_graph(c('coucou','salut'), c('car','pedestrian','bike','heavy'),c('car','heavy')) #> [1] \"car\" \"heavy\" check_options_graph(NULL, c('car','pedestrian','bike','heavy'),c('car','heavy')) #> [1] \"car\" \"heavy\""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/convert_string_to_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a character string into a numeric vector — convert_string_to_list","title":"Convert a character string into a numeric vector — convert_string_to_list","text":"Convert character string numeric vector","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/convert_string_to_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a character string into a numeric vector — convert_string_to_list","text":"","code":"convert_string_to_list(vector)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/convert_string_to_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a character string into a numeric vector — convert_string_to_list","text":"vector Something shape \"10,20,30\"","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/convert_string_to_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a character string into a numeric vector — convert_string_to_list","text":"Numeric vector. Something shape c(10,20,30)","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/convert_string_to_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a character string into a numeric vector — convert_string_to_list","text":"","code":"convert_string_to_list(\"10,20,30\") #> [[1]] #> [1] 10 20 30 #>"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/create_config.html","id":null,"dir":"Reference","previous_headings":"","what":"Create config file if needed. — create_config","title":"Create config file if needed. — create_config","text":"want specify IDs sensors, function create local configuration template file \\inst directory, edit specific information. default, function create file project directory temp directory. want permanent configuration, please use .","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/create_config.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create config file if needed. — create_config","text":"","code":"create_config( segments = list(`segment-01` = \"9000000000\", `segment-02` = \"9000000000\"), create_directory = FALSE, overwrite = FALSE )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/create_config.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create config file if needed. — create_config","text":"segments Named List segments (\"name1\" = \"9000000000\", ...). Default example version. create_directory Boolean: file need created project directory? Default FALSE. overwrite Boolean: file exist, overwriten? Default FALSE.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/create_config.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create config file if needed. — create_config","text":"Boolean: TRUE file created, FALSE overwise (config already exists example).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/create_config.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create config file if needed. — create_config","text":"use temporary options, please fill directly name number sensors \"segments\" argument.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/create_config.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create config file if needed. — create_config","text":"","code":"create_config(create_directory=FALSE) #> [1] TRUE list_of_segments = list(\"Burel\"= \"9000002156\", \"Vitre\" = \"9000001844\") create_config(segments = list_of_segments, create_directory = FALSE, overwrite = TRUE) # the file already exists #> [1] TRUE"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/custom_colors_palette.html","id":null,"dir":"Reference","previous_headings":"","what":"Colors palettes for each option — custom_colors_palette","title":"Colors palettes for each option — custom_colors_palette","text":"Colors palettes option","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/custom_colors_palette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Colors palettes for each option — custom_colors_palette","text":"","code":"custom_colors_palette(segments)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/custom_colors_palette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Colors palettes for each option — custom_colors_palette","text":"segments List characters. Segments name dataframe.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/custom_colors_palette.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Colors palettes for each option — custom_colors_palette","text":"list color palettes (named vector) option","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/decompose_2_fct.html","id":null,"dir":"Reference","previous_headings":"","what":"Decompose data from two sensors — decompose_2_fct","title":"Decompose data from two sensors — decompose_2_fct","text":"Decompose data two sensors","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/decompose_2_fct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decompose data from two sensors — decompose_2_fct","text":"","code":"decompose_2_fct( data, sensor1, sensor2, hour_x, direction1, direction2, mobility, norm, vacations = NULL, public_holidays = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/decompose_2_fct.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decompose data from two sensors — decompose_2_fct","text":"data Data frame containing data sensor1 segment ID sensor 1 sensor2 segment ID sensor 2 hour_x hour filter direction1 direction sensor 1 direction2 direction sensor 2 mobility character vector indicating mobility types include filter norm character indicating whether normalize results vacations vacations period filtering function public_holidays public holidays period filtering function","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/decompose_2_fct.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decompose data from two sensors — decompose_2_fct","text":"list containing decomposed data, seasonal data, peaks, correlation","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_dates.html","id":null,"dir":"Reference","previous_headings":"","what":"Enrich traffic data with date informations. — enrich_dates","title":"Enrich traffic data with date informations. — enrich_dates","text":"Enrich traffic data date informations.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_dates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enrich traffic data with date informations. — enrich_dates","text":"","code":"enrich_dates(data)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_dates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enrich traffic data with date informations. — enrich_dates","text":"data Data frame containing date character column containing date + hour + timezone.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_dates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enrich traffic data with date informations. — enrich_dates","text":"dataframe 3 additionnal columns : day, weekday hour.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_dates.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enrich traffic data with date informations. — enrich_dates","text":"","code":"df <- data.frame('date' = c(\"2022-02-18 08:00:00 CET\",\"2022-02-18 09:00:00 CET\"), stringsAsFactors = FALSE) enrich_dates(df) #> date day hour weekday #> 1 2022-02-18 08:00:00 CET 2022-02-18 8 friday #> 2 2022-02-18 09:00:00 CET 2022-02-18 9 friday"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Enrich traffic data with segment name — enrich_name","title":"Enrich traffic data with segment name — enrich_name","text":"segment_fullname also added : combination segment's id name. segment_id configuration file.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enrich traffic data with segment name — enrich_name","text":"","code":"enrich_name(data)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enrich traffic data with segment name — enrich_name","text":"data Data frame containing segment_id column","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enrich traffic data with segment name — enrich_name","text":"dataframe two additionnal columns : segment_name segment_fullname","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_name.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enrich traffic data with segment name — enrich_name","text":"","code":"df <- data.frame('segment_id' = c(9000002156, 9000001906)) enrich_name(df) #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> segment_fullname segment_id segment_name #> 1 9000002156 - NULL 9000002156 NULL #> 2 9000001906 - NULL 9000001906 NULL"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_special_days.html","id":null,"dir":"Reference","previous_headings":"","what":"Enrich traffic data with french vacation and public holidays — enrich_special_days","title":"Enrich traffic data with french vacation and public holidays — enrich_special_days","text":"Enrich traffic data french vacation public holidays","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_special_days.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enrich traffic data with french vacation and public holidays — enrich_special_days","text":"","code":"enrich_special_days(data, vacations = NULL, public_holidays = NULL)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_special_days.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enrich traffic data with french vacation and public holidays — enrich_special_days","text":"data Data frame containing day date(day + hour + timezone) column vacations Data frame containing vacation dates public_holidays Data frame containing public holidays dates","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_special_days.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enrich traffic data with french vacation and public holidays — enrich_special_days","text":"dataframe two additionnal columns : holiday, boolean: TRUE day corresponds public holiday, FALSE otherwise vacation, indicating french vacation, \"vacation\" otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_special_days.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enrich traffic data with french vacation and public holidays — enrich_special_days","text":"","code":"df <- data.frame('day' = as.Date(c(\"2022-02-18\",\"2022-01-01\")), 'date' = c('2022-02-18 12:00:00 CET','2022-01-01 12:00:00 CET')) enrich_special_days(df) #> day date holiday vacation #> 1 2022-02-18 2022-02-18 12:00:00 CET FALSE Vacances d'Hiver #> 2 2022-01-01 2022-01-01 12:00:00 CET TRUE Vacances de Noël"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_traffic.html","id":null,"dir":"Reference","previous_headings":"","what":"Enrich traffic data with date features, names and uptime filters. — enrich_traffic","title":"Enrich traffic data with date features, names and uptime filters. — enrich_traffic","text":"function add day, weekday, hour, segment_name full_name uptime quality boolean. function already used data retrievement process.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_traffic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enrich traffic data with date features, names and uptime filters. — enrich_traffic","text":"","code":"enrich_traffic(data)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_traffic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enrich traffic data with date features, names and uptime filters. — enrich_traffic","text":"data Raw data frame Telraam API, imported package.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_traffic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enrich traffic data with date features, names and uptime filters. — enrich_traffic","text":"dataframe additionnal informations : day, hour, weekday, holiday, vacation, segment_name, uptime_quality","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_traffic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enrich traffic data with date features, names and uptime filters. — enrich_traffic","text":"","code":"enriched_traffic <- enrich_traffic(traffic[0:10,]) #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. setdiff(colnames(enriched_traffic[0:10,]), colnames(traffic[0:10,])) #> character(0)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_uptime.html","id":null,"dir":"Reference","previous_headings":"","what":"Enrich traffic data with uptime quality indication — enrich_uptime","title":"Enrich traffic data with uptime quality indication — enrich_uptime","text":"uptime lower 0.5, uptime_quality FALSE, else TRUE","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_uptime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enrich traffic data with uptime quality indication — enrich_uptime","text":"","code":"enrich_uptime(data)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_uptime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enrich traffic data with uptime quality indication — enrich_uptime","text":"data Data frame containing uptime column","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_uptime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enrich traffic data with uptime quality indication — enrich_uptime","text":"dataframe additionnal column indicating uptime greater (TRUE) lower (FALSE) 0.5.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_uptime.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enrich traffic data with uptime quality indication — enrich_uptime","text":"","code":"df <- data.frame('uptime' = c(0.05, 0.95)) enrich_uptime(df) #> uptime uptime_quality #> 1 0.05 FALSE #> 2 0.95 TRUE"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_agg.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter by selected criteria and aggregating traffics. — filter_agg","title":"Filter by selected criteria and aggregating traffics. — filter_agg","text":"criteria need filled . Unfilled criteria set default filtering performed.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_agg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter by selected criteria and aggregating traffics. — filter_agg","text":"","code":"filter_agg( data, date_range = NULL, segments = NULL, direction = NULL, modes = NULL, weekdays = NULL, hours = NULL, uptime_quality = TRUE )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_agg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter by selected criteria and aggregating traffics. — filter_agg","text":"data Traffic Data Frame date_range Date vector, c(\"aaaa-mm-jj\",\"aaaa-mm-jj\") segments Vector character. Ids desired segments. direction Vector character. Direction street (lft, right, ). modes Vector character. Type(s) mobility: c(\"car\",\"heavy\",\"pedestrian\",\"bike\") weekdays Vector character. Weekday(s) choosen. hours Integer vector. Hours choosen, default day.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_agg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter by selected criteria and aggregating traffics. — filter_agg","text":"filtered data, molten mode direction, new columns : mode, mode, one row per different transportation mode + date/hour + direction direction, direction, one row per different transportation mode + date/hour + direction traffic_sum, traffic mode/direction specific date/hour","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_agg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Filter by selected criteria and aggregating traffics. — filter_agg","text":"","code":"date_range = as.Date(c('2022-01-01','2022-01-08')) filter_agg(traffic, date_range = date_range, segments = 'RteVitre-06', direction = 'lft', modes = 'pedestrian', weekdays = 'saturday', hours = 12:14, uptime_quality = TRUE ) #> $data #> date day hour weekday holiday vacation #> 1 2022-01-01 12:00:00 2022-01-01 12 saturday TRUE Vacances de Noël #> 2 2022-01-01 13:00:00 2022-01-01 13 saturday TRUE Vacances de Noël #> 3 2022-01-08 12:00:00 2022-01-08 12 saturday FALSE No vacation #> 4 2022-01-08 13:00:00 2022-01-08 13 saturday FALSE No vacation #> 5 2022-01-08 14:00:00 2022-01-08 14 saturday FALSE No vacation #> segment_name v85 #> 1 RteVitre-06 6.5 #> 2 RteVitre-06 40.0 #> 3 RteVitre-06 43.0 #> 4 RteVitre-06 44.5 #> 5 RteVitre-06 44.0 #> car_speed_hist_0to70plus #> 1 100, 0, 0, 0, 0, 0, 0, 0 #> 2 0.000000, 2.222222, 11.111111, 63.333333, 22.222222, 0.000000, 0.000000, 1.111111 #> 3 6.3333333, 3.6666667, 3.6666667, 41.3333333, 38.6666667, 6.0000000, 0.0000000, 0.3333333 #> 4 1.7667845, 3.1802120, 3.5335689, 41.6961131, 45.2296820, 4.2402827, 0.3533569, 0.0000000 #> 5 0.9740260, 0.3246753, 2.9220779, 48.7012987, 40.9090909, 5.8441558, 0.0000000, 0.3246753 #> car_speed_hist_0to120plus #> 1 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 2 0.000000, 0.000000, 0.000000, 2.222222, 3.333333, 7.777778, 22.222222, 41.111111, 16.666667, 5.555556, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.111111, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 #> 3 3.6666667, 2.6666667, 1.6666667, 2.0000000, 1.0000000, 2.6666667, 14.0000000, 27.3333333, 29.0000000, 9.6666667, 5.3333333, 0.6666667, 0.0000000, 0.0000000, 0.3333333, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 4 1.0600707, 0.7067138, 1.4134276, 1.7667845, 0.7067138, 2.8268551, 13.7809187, 27.9151943, 28.9752650, 16.2544170, 3.5335689, 0.7067138, 0.0000000, 0.3533569, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 5 0.9740260, 0.0000000, 0.3246753, 0.0000000, 0.9740260, 1.9480519, 14.2857143, 34.4155844, 28.8961039, 12.0129870, 4.8701299, 0.9740260, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.3246753, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> uptime uptime_quality mode direction traffic_sum #> 1 0.7875000 TRUE pedestrian lft 16.507937 #> 2 0.7277778 TRUE pedestrian lft 10.992366 #> 3 0.7808333 TRUE pedestrian lft 0.000000 #> 4 0.7922222 TRUE pedestrian lft 1.262272 #> 5 0.7922222 TRUE pedestrian lft 1.262272 #> #> $segment #> [1] \"RteVitre-06\" #> #> $mode #> [1] \"pedestrian\" #> #> $direction #> [1] \"lft\" #> #> $weekday #> [1] \"saturday\" #> #> $hour #> [1] 12 13 14 #>"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_date.html","id":null,"dir":"Reference","previous_headings":"","what":"Select data within a specified date range — filter_date","title":"Select data within a specified date range — filter_date","text":"Select data within specified date range","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_date.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select data within a specified date range — filter_date","text":"","code":"filter_date(data, date_range)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_date.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select data within a specified date range — filter_date","text":"data Data frame containing date column date_range vector two dates specifying range","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_date.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select data within a specified date range — filter_date","text":"Subset input data frame within specified date range","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_public_holidays.html","id":null,"dir":"Reference","previous_headings":"","what":"Select data based on public holiday criteria — filter_public_holidays","title":"Select data based on public holiday criteria — filter_public_holidays","text":"Select data based public holiday criteria","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_public_holidays.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select data based on public holiday criteria — filter_public_holidays","text":"","code":"filter_public_holidays(data, JF)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_public_holidays.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select data based on public holiday criteria — filter_public_holidays","text":"data Data frame containing date column JF character indicating public holiday selection criteria","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_public_holidays.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select data based on public holiday criteria — filter_public_holidays","text":"Subset input data frame based public holiday criteria","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_vacation.html","id":null,"dir":"Reference","previous_headings":"","what":"Select data based on vacation criteria — filter_vacation","title":"Select data based on vacation criteria — filter_vacation","text":"Select data based vacation criteria","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_vacation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select data based on vacation criteria — filter_vacation","text":"","code":"filter_vacation(data, vacation)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_vacation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select data based on vacation criteria — filter_vacation","text":"data Data frame containing date column vacation character indicating vacation selection criteria","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_vacation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select data based on vacation criteria — filter_vacation","text":"Subset input data frame based vacation criteria","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter by selected criteria. — filtering","title":"Filter by selected criteria. — filtering","text":"criteria need filled . Unfilled criteria set default filtering performed.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter by selected criteria. — filtering","text":"","code":"filtering( data = NULL, sensor = NULL, direction = \" \", mobility = c(\"car\", \"heavy\", \"pedestrian\", \"bike\"), date_range = NULL, vac = NULL, p_h = NULL, wkd = NULL, vacations = NULL, public_holidays = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter by selected criteria. — filtering","text":"data dat.frame. See \"importation\" function '2-import.R' file sensor character. Id desired sensor quotations direction character. Direction street: \" \" \"_lft\" \"_rgt\" mobility character. Type mobility: c(\"car\",\"heavy\",\"pedestrian\",\"bike\") date_range Date vector, c(\"aaaa-mm-jj\",\"aaaa-mm-jj\") vac character. , without, vacation: \"YES\" \"\" \"\" p_h character. , without, public holiday: \"YES\" \"\" \"\" wkd character vector. Selected days week: c(\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\") starting one Monday. Make sure use options(lubridate.week.start = 1) function perform correctly. vacations data.frame, containing 3 columns : desctiption, start_date end_date description column contains character vectors name every vacations studying starting_date ending_date Date-Time vectors(POSIXct) format \"year-month-day hour:minute:second\", obtainable example using ymd_hms lubridate package public_holidays date vector, containing public holidays dates \"Year-month-day\" format.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter by selected criteria. — filtering","text":"filtered data","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering_agg.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter by selected criteria and aggregating traffics. — filtering_agg","title":"Filter by selected criteria and aggregating traffics. — filtering_agg","text":"criteria need filled . Unfilled criteria set default filtering performed.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering_agg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter by selected criteria and aggregating traffics. — filtering_agg","text":"","code":"filtering_agg( data, date_range = NULL, segments = NULL, direction = NULL, modes = NULL, weekdays = NULL, hours = NULL, uptime_quality = TRUE )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering_agg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter by selected criteria and aggregating traffics. — filtering_agg","text":"data Traffic Data Frame date_range Date vector, c(\"aaaa-mm-jj\",\"aaaa-mm-jj\") direction Vector character. Direction street (lft, right, ). modes Vector character. Type(s) mobility: c(\"car\",\"heavy\",\"pedestrian\",\"bike\") hours Integer vector. Hours choosen, default day. segment Vector character. Ids desired segments. weekday Vector character. Weekday(s) choosen.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering_agg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter by selected criteria and aggregating traffics. — filtering_agg","text":"filtered data new column \"traffic\" aggregated data specified direction/modes","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_api_state.html","id":null,"dir":"Reference","previous_headings":"","what":"Check API state — get_api_state","title":"Check API state — get_api_state","text":"Return state 'Telraam' API. Determine updates can made.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_api_state.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check API state — get_api_state","text":"","code":"get_api_state(key = get_telraam_token())"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_api_state.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check API state — get_api_state","text":"key API key (set set_telraam_token function - default -, directly filled).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_api_state.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check API state — get_api_state","text":"Boolean: TRUE API responds well, FALSE otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_api_state.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check API state — get_api_state","text":"","code":"my_token <- 'ThisIsNotAValidToken' get_api_state(my_token) #> [1] FALSE"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_config_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the path of configuration file. — get_config_path","title":"Get the path of configuration file. — get_config_path","text":"configuration file inst directory, temporary directory, according create_directory option create_config() function. configuration file exist, function create file temporary directory send message user.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_config_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the path of configuration file. — get_config_path","text":"","code":"get_config_path()"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_config_path.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the path of configuration file. — get_config_path","text":"Character: path configuration file, needed lot functions.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_config_path.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the path of configuration file. — get_config_path","text":"","code":"create_config(create_directory=FALSE) #> Warning: A configuration file already exists in the directory #> [1] FALSE get_config_path() #> [1] \"inst/config.yml\""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_custom_palette.html","id":null,"dir":"Reference","previous_headings":"","what":"Colors palettes for each option (mode, direction, segment_name, weekday, hour) — get_custom_palette","title":"Colors palettes for each option (mode, direction, segment_name, weekday, hour) — get_custom_palette","text":"Colors palettes option (mode, direction, segment_name, weekday, hour)","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_custom_palette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Colors palettes for each option (mode, direction, segment_name, weekday, hour) — get_custom_palette","text":"","code":"get_custom_palette(segments)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_custom_palette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Colors palettes for each option (mode, direction, segment_name, weekday, hour) — get_custom_palette","text":"segments Character vectors. Segments name dataframe.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_custom_palette.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Colors palettes for each option (mode, direction, segment_name, weekday, hour) — get_custom_palette","text":"list color palettes (named vector) option (mode, direction, segment_name, weekday, hour)","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_custom_palette.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Colors palettes for each option (mode, direction, segment_name, weekday, hour) — get_custom_palette","text":"","code":"segments <- c('Route1', 'Route2') get_custom_palette(segments) #> $mode #> car pedestrian bike heavy #> \"#F95335\" \"#FCAF38\" \"#50A3A4\" \"#674A40\" #> #> $direction #> both lft rgt #> \"#6d676e\" \"#ff595e\" \"#8ac926\" #> #> $segment_name #> #> #7E1900FF #1A3399FF #> #> $weekday #> #> #009392FF #39B185FF #9CCB86FF #E9E29CFF #EEB479FF #E88471FF #CF597EFF #> #> $hour #> 1 2 3 4 5 6 #> \"#FEFBE9FF\" \"#FCF7D5FF\" \"#F5F3C1FF\" \"#EAF0B5FF\" \"#DDECBFFF\" \"#D0E7CAFF\" #> 7 8 9 10 11 12 #> \"#C2E3D2FF\" \"#B5DDD8FF\" \"#A8D8DCFF\" \"#9BD2E1FF\" \"#8DCBE4FF\" \"#81C4E7FF\" #> 13 14 15 16 17 18 #> \"#7BBCE7FF\" \"#7EB2E4FF\" \"#88A5DDFF\" \"#9398D2FF\" \"#9B8AC4FF\" \"#9D7DB2FF\" #> 19 20 21 22 23 #> \"#9A709EFF\" \"#906388FF\" \"#805770FF\" \"#684957FF\" \"#46353AFF\" \"grey\" #>"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_graph_subtitles.html","id":null,"dir":"Reference","previous_headings":"","what":"Create subtitles for graphics. — get_graph_subtitles","title":"Create subtitles for graphics. — get_graph_subtitles","text":"Create subtitles graphics.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_graph_subtitles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create subtitles for graphics. — get_graph_subtitles","text":"","code":"get_graph_subtitles( segments = NULL, modes = NULL, directions = NULL, weekdays = NULL, hours = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_graph_subtitles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create subtitles for graphics. — get_graph_subtitles","text":"segments Character vector. Selected road segment text, precision NULL (default). modes Character vector. Different modes transportation selected (heavy, car, bike, pedestrian). Default: NULL directions Character vector. Directions traffic (lft, rgt, ) choosen. Default NULL. weekdays Character vector. Weekdays choosen. Default NULL. hours Numeric vector. Hours choosen. Default NULL.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_graph_subtitles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create subtitles for graphics. — get_graph_subtitles","text":"Character, description parameters filled, usable subtitle graphs.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_graph_subtitles.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create subtitles for graphics. — get_graph_subtitles","text":"","code":"get_graph_subtitles(segments = c(\"Route1\"), mode = \"car\", direction = \"lft\", weekdays = \"monday\", hours = 12:14) #> [1] \"Modes: car\\nDirections: lft\\nWeekdays: monday\\nSegments: Route1\\nHours: 12, 13, 14\""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segment_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the name of a segment giving its id — get_segment_name","title":"Get the name of a segment giving its id — get_segment_name","text":"Get name segment giving id","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segment_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the name of a segment giving its id — get_segment_name","text":"","code":"get_segment_name(segment_id)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segment_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the name of a segment giving its id — get_segment_name","text":"segment_id ID segment, present inst/config.yml","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segment_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the name of a segment giving its id — get_segment_name","text":"Name segment, specified configuration file, NULL otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segment_name.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the name of a segment giving its id — get_segment_name","text":"","code":"if (FALSE) #run if you want to create a inst/ directory containing config file create_config() get_segment_name(9000000000) #> This ID is unknown. Please update configuration file. #> NULL"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segments.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Telraam segments into a named vector — get_segments","title":"Get Telraam segments into a named vector — get_segments","text":"Get Telraam segments info yml file transform named vector","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Telraam segments into a named vector — get_segments","text":"","code":"get_segments()"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Telraam segments into a named vector — get_segments","text":"Named vector names segment IDs, NULL configuration file","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segments.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Telraam segments into a named vector — get_segments","text":"","code":"create_config(create_directory = FALSE) #> Warning: A configuration file already exists in the directory #> [1] FALSE get_segments() #> $`segment-01` #> [1] \"9000000000\" #> #> $`segment-02` #> [1] \"9000000000\" #>"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_telraam_token.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the current authentication token for the 'Telraam' API — get_telraam_token","title":"Get the current authentication token for the 'Telraam' API — get_telraam_token","text":"Get current authentication token 'Telraam' API","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_telraam_token.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the current authentication token for the 'Telraam' API — get_telraam_token","text":"","code":"get_telraam_token()"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_telraam_token.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the current authentication token for the 'Telraam' API — get_telraam_token","text":"Token currently used, set set_telraam_token()","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_telraam_token.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the current authentication token for the 'Telraam' API — get_telraam_token","text":"","code":"my_token <- \"MyTelraamToken\" set_telraam_token(my_token) get_telraam_token() #> [1] \"MyTelraamToken\""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_availability.html","id":null,"dir":"Reference","previous_headings":"","what":"Availability and quality of sensors during a period through a heatmap. — gg_availability","title":"Availability and quality of sensors during a period through a heatmap. — gg_availability","text":"Higher uptime average, higher quality data. null uptime means sensor available period.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_availability.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Availability and quality of sensors during a period through a heatmap. — gg_availability","text":"","code":"gg_availability(enriched_data, date_range = NULL)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_availability.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Availability and quality of sensors during a period through a heatmap. — gg_availability","text":"enriched_data enriched data.frame containing data sensors date_range Date vector. Example: c('2021-01-01','2022-01-01'). Full period NULL.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_availability.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Availability and quality of sensors during a period through a heatmap. — gg_availability","text":"Graph showing availability quality sensors selected date range.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_availability.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Availability and quality of sensors during a period through a heatmap. — gg_availability","text":"","code":"gg_availability(traffic)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_histogram.html","id":null,"dir":"Reference","previous_headings":"","what":"Histogram of car speed over a period, for a segment or a subset of segment. — gg_car_speed_histogram","title":"Histogram of car speed over a period, for a segment or a subset of segment. — gg_car_speed_histogram","text":"Histogram car speed period, segment subset segment.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_histogram.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Histogram of car speed over a period, for a segment or a subset of segment. — gg_car_speed_histogram","text":"","code":"gg_car_speed_histogram( enriched_data, date_range = NULL, segments = NULL, weekday = NULL, hours = NULL, aggregated_by = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_histogram.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Histogram of car speed over a period, for a segment or a subset of segment. — gg_car_speed_histogram","text":"enriched_data enriched data.frame containing data sensors date_range Date vector. Example: c('2021-01-01','2022-01-01'). Full period NULL (default). segments Character vector. Selected road segment, NULL (default). weekday Character vector. Weekday choosen. Default week. hours Integer vector. Hours choosen, default day. aggregated_by Character. Enables comparison segments weekdays. Options : 'segment_name', 'weekday', NULL (comparison, default).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_histogram.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Histogram of car speed over a period, for a segment or a subset of segment. — gg_car_speed_histogram","text":"Graph showing histogram car speed period.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_histogram.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Histogram of car speed over a period, for a segment or a subset of segment. — gg_car_speed_histogram","text":"","code":"library(dplyr) #> #> Attaching package: ‘dplyr’ #> The following objects are masked from ‘package:stats’: #> #> filter, lag #> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union subset_traffic <- traffic %>% filter(day < '2022-02-01', hour > 9) gg_car_speed_histogram(subset_traffic) gg_car_speed_histogram(subset_traffic, aggregated_by = 'segment_name') gg_car_speed_histogram(subset_traffic, weekday = c('monday','sunday'), segments = 'RteVitre-06', hours = 17:20, aggregated_by = \"weekday\")"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_v85.html","id":null,"dir":"Reference","previous_headings":"","what":"Average of v85 car speed per hour over a period, for a segment or a subset of segment. — gg_car_speed_v85","title":"Average of v85 car speed per hour over a period, for a segment or a subset of segment. — gg_car_speed_v85","text":"v85 estimated car speed limit km/h 85% cars respect. 15% drivers drive faster v85 indicator.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_v85.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average of v85 car speed per hour over a period, for a segment or a subset of segment. — gg_car_speed_v85","text":"","code":"gg_car_speed_v85( enriched_data, date_range = NULL, segments = NULL, weekday = NULL, hours = NULL, aggregated_by = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_v85.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average of v85 car speed per hour over a period, for a segment or a subset of segment. — gg_car_speed_v85","text":"enriched_data enriched data.frame containing data sensors date_range Date vector. Example: c('2021-01-01','2022-01-01'). Full period NULL (default). segments Character vector. Selected road segment, NULL (default). weekday Character vector. Weekday choosen. Default week. hours Integer vector. Hours choosen, default day. aggregated_by Character. Enables comparison segments weekdays. Options : 'segment_name', 'weekday', NULL (comparison, default).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_v85.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average of v85 car speed per hour over a period, for a segment or a subset of segment. — gg_car_speed_v85","text":"Graph showing average v85 speed per hour.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_v85.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Average of v85 car speed per hour over a period, for a segment or a subset of segment. — gg_car_speed_v85","text":"","code":"library(dplyr) subset_traffic <- traffic %>% filter(day < '2022-02-01', hour > 9) gg_car_speed_histogram(subset_traffic[0:100,]) gg_car_speed_histogram(subset_traffic, aggregated_by = 'segment_name') gg_car_speed_histogram(subset_traffic, weekday = c('monday','sunday'), segments = 'RteVitre-06', hours = 17:20, aggregated_by = \"weekday\")"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_dist.html","id":null,"dir":"Reference","previous_headings":"","what":"gg_na_dist\nThe function gives a graphical representation of NA's distribution (monthly) during a selected period for one sensor. — gg_na_dist","title":"gg_na_dist\nThe function gives a graphical representation of NA's distribution (monthly) during a selected period for one sensor. — gg_na_dist","text":"gg_na_dist function gives graphical representation NA's distribution (monthly) selected period one sensor.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_dist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"gg_na_dist\nThe function gives a graphical representation of NA's distribution (monthly) during a selected period for one sensor. — gg_na_dist","text":"","code":"gg_na_dist( data, sensor, start = NULL, end = NULL, hours = \"ALL\", list_weekday = \"ALL\", pub_holidays = \"YES\", holidays = \"YES\" )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_dist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"gg_na_dist\nThe function gives a graphical representation of NA's distribution (monthly) during a selected period for one sensor. — gg_na_dist","text":"data Data.Frame. data frame containing road traffic data. sensor Numeric. sensor ID want see representation. start Character. start period format \"yyyy-mm-dd\". end Character. end period format \"yyyy-mm-dd\". hours Vector. vector containing hours want see representation, e.g., c(\"05h\", \"18h\"). list_weekday Vector. vector containing weekdays French, e.g., c(\"Monday\", \"Sunday\"). pub_holidays Character. \"YES\" want see results public holidays included; \"\" want exclude representation; \"\" want see result. holidays Character. \"YES\" want see results including holidays; \"\" want exclude representation; \"\" want see result.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_dist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"gg_na_dist\nThe function gives a graphical representation of NA's distribution (monthly) during a selected period for one sensor. — gg_na_dist","text":"ggplot graph.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_heatmap.html","id":null,"dir":"Reference","previous_headings":"","what":"gg_na_heatmap\nThis function generates a heatmap representation of the proportion of missing values (NA) for different sensors over monthly periods during a selected time frame. — gg_na_heatmap","title":"gg_na_heatmap\nThis function generates a heatmap representation of the proportion of missing values (NA) for different sensors over monthly periods during a selected time frame. — gg_na_heatmap","text":"gg_na_heatmap function generates heatmap representation proportion missing values (NA) different sensors monthly periods selected time frame.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_heatmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"gg_na_heatmap\nThis function generates a heatmap representation of the proportion of missing values (NA) for different sensors over monthly periods during a selected time frame. — gg_na_heatmap","text":"","code":"gg_na_heatmap( data, start = NULL, end = NULL, hours = \"ALL\", list_weekday = \"ALL\", pub_holidays = \"YES\", holidays = \"YES\" )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_heatmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"gg_na_heatmap\nThis function generates a heatmap representation of the proportion of missing values (NA) for different sensors over monthly periods during a selected time frame. — gg_na_heatmap","text":"data Data frame. data frame containing road traffic data. start Character. start date format \"yyyy-mm-dd\". end Character. end date format \"yyyy-mm-dd\". hours Vector. vector containing hours want see representation, e.g., c(\"05h\", \"18h\"). list_weekday Vector. vector containing weekdays French, e.g., c(\"Monday\", \"Sunday\"). pub_holidays Character. \"YES\" want see results public holidays included; \"\" want exclude representation; \"\" want see result. holidays Character. \"YES\" want see results including holidays; \"\" want exclude representation; \"\" want see result.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_heatmap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"gg_na_heatmap\nThis function generates a heatmap representation of the proportion of missing values (NA) for different sensors over monthly periods during a selected time frame. — gg_na_heatmap","text":"ggplot graph representing heatmap NA proportions different sensors monthly periods.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_avg.html","id":null,"dir":"Reference","previous_headings":"","what":"Average of traffic during a week. — gg_traffic_avg","title":"Average of traffic during a week. — gg_traffic_avg","text":"short description... Average traffic week, period segment subset segment, transportation mode , direction .","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_avg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average of traffic during a week. — gg_traffic_avg","text":"","code":"gg_traffic_avg( enriched_data, date_range = NULL, segments = NULL, modes = c(\"heavy\", \"car\"), direction = \"both\", weekday = NULL, aggregated_by = \"weekday\" )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_avg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average of traffic during a week. — gg_traffic_avg","text":"enriched_data enriched data.frame containing data sensors date_range Date vector. example: c('2021-01-01','2022-01-01'). Full period NULL (default). segments Character vector. Selected road segment, NULL (default). modes Character vector. Different modes transportation aggregated (heavy, car, bike, pedestrian) . Default: heavy & car direction Character. Direction traffic (lft, rgt, ). Default . weekday Character vector. Weekday choosen. Default week. aggregated_by Character. Options : 'segment_name', 'weekday', 'direction', 'mode'. Default: 'weekday'.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_avg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average of traffic during a week. — gg_traffic_avg","text":"Graph showing weekly average evolution traffic (specified parameters) specified period.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_avg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Average of traffic during a week. — gg_traffic_avg","text":"","code":"gg_traffic_avg(traffic) gg_traffic_avg(traffic, date_range = c('2022-07-01','2022-09-01'), segment = 'RteVitre-06', mode = 'car', direction = 'rgt', weekday = c('monday','friday') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_evolution.html","id":null,"dir":"Reference","previous_headings":"","what":"Evolution of traffic and smoothed traffic. — gg_traffic_evolution","title":"Evolution of traffic and smoothed traffic. — gg_traffic_evolution","text":"Evolution traffic (global, per mode ou per direction), smoothed traffic period.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_evolution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evolution of traffic and smoothed traffic. — gg_traffic_evolution","text":"","code":"gg_traffic_evolution( enriched_data, date_range = NULL, segments = NULL, modes = c(\"heavy\", \"car\"), direction = \"both\", smoothed = TRUE, agg_day = TRUE )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_evolution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evolution of traffic and smoothed traffic. — gg_traffic_evolution","text":"enriched_data enriched data.frame containing data sensors date_range Date vector. Example: c('2021-01-01','2022-01-01'). Full period NULL (default). segments Character vector. Selected road segment name, NULL (default). modes Character vector. Different modes transportation aggregated (heavy, car, bike, pedestrian) . Default: heavy & car direction Character. Direction traffic (lft, rgt, ). Default . smoothed Boolean. smoothed traffic plotted ? Default: True agg_day Boolean. data aggregated per day ? Default : True","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_evolution.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evolution of traffic and smoothed traffic. — gg_traffic_evolution","text":"Graph showing evolution traffic (specified parameters) specified period.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_evolution.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Evolution of traffic and smoothed traffic. — gg_traffic_evolution","text":"","code":"gg_traffic_evolution(traffic) gg_traffic_evolution(traffic, date_range = c('2022-01-01','2022-03-01'), segment = 'RteVitre-06', mode = c('car','pedestrian'), direction = 'lft', smoothed = FALSE, agg_day = FALSE)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_working_sensor.html","id":null,"dir":"Reference","previous_headings":"","what":"gg_working_sensor\nthe function gives a graphical representation of the sensors operation during a selected period,\nthe representation can be grouped or individual — gg_working_sensor","title":"gg_working_sensor\nthe function gives a graphical representation of the sensors operation during a selected period,\nthe representation can be grouped or individual — gg_working_sensor","text":"gg_working_sensor function gives graphical representation sensors operation selected period, representation can grouped individual","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_working_sensor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"gg_working_sensor\nthe function gives a graphical representation of the sensors operation during a selected period,\nthe representation can be grouped or individual — gg_working_sensor","text":"","code":"gg_working_sensor( list_sensor = \"ALL\", data, start, end, hours = \"ALL\", aggregate = TRUE, list_weekday = \"ALL\", pub_holyday = \"YES\", holydays = \"YES\" )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_working_sensor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"gg_working_sensor\nthe function gives a graphical representation of the sensors operation during a selected period,\nthe representation can be grouped or individual — gg_working_sensor","text":"list_sensor vector containing sensor IDs, ex : c(\"9000001906\", \"9000003090) data data frame containing road traffic data start start period format \"yyyy-mm-dd\" end start period format \"yyyy-mm-dd\" hours vector containing hours want see representation, ex : c(\"05h\", \"18h\") aggregate aggregate = TRUE, see information sensors together. aggregate = FALSe, information show sensor sensor list_weekday vector containing weekdays french, ex : c(\"lundi\", \"jeudi\") pub_holyday \"YES\" : want see results public holydays inclue; \"\" want exclude representation; \"\" want see result holydays \"YES\" : want see results including holydays; \"\" want exclude representation; \"\" want see result","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_working_sensor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"gg_working_sensor\nthe function gives a graphical representation of the sensors operation during a selected period,\nthe representation can be grouped or individual — gg_working_sensor","text":"ggplot graph","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/graph_subtitles.html","id":null,"dir":"Reference","previous_headings":"","what":"Create subtitles for graphics. — graph_subtitles","title":"Create subtitles for graphics. — graph_subtitles","text":"Create subtitles graphics.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/graph_subtitles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create subtitles for graphics. — graph_subtitles","text":"","code":"graph_subtitles( segments = NULL, modes = NULL, directions = NULL, weekdays = NULL, hours = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/graph_subtitles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create subtitles for graphics. — graph_subtitles","text":"segments Character vector. Selected road segment, NULL (default). modes Character vector. Different modes transportation aggregated (heavy, car, bike, pedestrian) . Default: heavy & car directions Character vector. Direction traffic (lft, rgt, ). Default . weekdays Character vector. Weekday choosen. Default week.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/graph_subtitles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create subtitles for graphics. — graph_subtitles","text":"DataFrame one row per hour/segment/transportation mode/direction","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/imp_na.html","id":null,"dir":"Reference","previous_headings":"","what":"Impute Missing Data using Linear Interpolation — imp_na","title":"Impute Missing Data using Linear Interpolation — imp_na","text":"function uses linear interpolation method fill missing data road traffic data. interpolation done day 4 hours data row missing, days (grouped day week) 4 consecutive weeks missing.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/imp_na.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Impute Missing Data using Linear Interpolation — imp_na","text":"","code":"imp_na(data, period = \"open days\")"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/imp_na.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Impute Missing Data using Linear Interpolation — imp_na","text":"data Data frame. data frame containing road traffic data. period Character. period impute data : \"open days\" open days, \"public holidays\" public holidays, \"holidays\" holidays.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/imp_na.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Impute Missing Data using Linear Interpolation — imp_na","text":"data frame imputed data new column named \"imputation\" indicating whether data point original (0), imputed (1), NA (2).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor.html","id":null,"dir":"Reference","previous_headings":"","what":"Imports data associated with a list of sensors — import_sensor","title":"Imports data associated with a list of sensors — import_sensor","text":"Imports data associated given list sensor names .RData files contained data directory. main purpose function load data saved write update data.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imports data associated with a list of sensors — import_sensor","text":"","code":"import_sensor(list_sensor)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imports data associated with a list of sensors — import_sensor","text":"list_sensor character vector specifying names sensors import data .","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imports data associated with a list of sensors — import_sensor","text":"dataframe containing imported data.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imports data associated with a list of sensors — import_sensor","text":"","code":"if (FALSE) # This example requires a valid API key period <- as.Date(c('2022-01-01', '2022-12-31')) write_update_data('RteVitre-06', period[1], period[2]) #> Error in eval(expr, envir, enclos): object 'period' not found write_update_data('ParisArcEnCiel-05', period[1], period[2]) #> Error in eval(expr, envir, enclos): object 'period' not found import_sensor(c('RteVitre-06', 'ParisArcEnCiel-05')) #> No data stored for RteVitre-06 #> No data stored for ParisArcEnCiel-05 #> # A tibble: 0 × 0"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor_comp.html","id":null,"dir":"Reference","previous_headings":"","what":"Import Sensor Data and Combine — import_sensor_comp","title":"Import Sensor Data and Combine — import_sensor_comp","text":"function imports sensor data CSV files given sensor IDs combines . function also processes data converting certain columns lists.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor_comp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import Sensor Data and Combine — import_sensor_comp","text":"","code":"import_sensor_comp(sensor_ids, sensor_comp_names)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor_comp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import Sensor Data and Combine — import_sensor_comp","text":"sensor_ids character vector containing sensor IDs import. sensor_comp_names character vector containing names CSV files import.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor_comp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import Sensor Data and Combine — import_sensor_comp","text":"data frame containing imported combined sensor data.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/is_vacation.html","id":null,"dir":"Reference","previous_headings":"","what":"Indicates if a date is in vacation period and if true, which vacation. — is_vacation","title":"Indicates if a date is in vacation period and if true, which vacation. — is_vacation","text":"date vacation period, \"vacation\" returned.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/is_vacation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indicates if a date is in vacation period and if true, which vacation. — is_vacation","text":"","code":"is_vacation(date, vacation)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/is_vacation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indicates if a date is in vacation period and if true, which vacation. — is_vacation","text":"date Date (character format) vacation Dataframe vacations, format set_globals_vars output.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/is_vacation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indicates if a date is in vacation period and if true, which vacation. — is_vacation","text":"Vacation description day two dates, \"vacation\" otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/is_vacation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indicates if a date is in vacation period and if true, which vacation. — is_vacation","text":"","code":"vacation <- data.frame('description' = c('Vacances de Noël'), start_date = as.POSIXct('2021-12-17 23:00:00'), end_date = as.POSIXct('2022-01-02 23:00:00')) is_vacation(as.Date('2022-01-01'), vacation) #> [1] \"Vacances de Noël\""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/melt_direction_mode.html","id":null,"dir":"Reference","previous_headings":"","what":"Melt dataframe to obtain one row per hour/segment/transportation mode/direction\nThis format makes graphs with ggplot and filtering easier. — melt_direction_mode","title":"Melt dataframe to obtain one row per hour/segment/transportation mode/direction\nThis format makes graphs with ggplot and filtering easier. — melt_direction_mode","text":"Melt dataframe obtain one row per hour/segment/transportation mode/direction format makes graphs ggplot filtering easier.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/melt_direction_mode.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Melt dataframe to obtain one row per hour/segment/transportation mode/direction\nThis format makes graphs with ggplot and filtering easier. — melt_direction_mode","text":"","code":"melt_direction_mode(data)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/melt_direction_mode.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Melt dataframe to obtain one row per hour/segment/transportation mode/direction\nThis format makes graphs with ggplot and filtering easier. — melt_direction_mode","text":"data Traffic Data Frame","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/melt_direction_mode.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Melt dataframe to obtain one row per hour/segment/transportation mode/direction\nThis format makes graphs with ggplot and filtering easier. — melt_direction_mode","text":"DataFrame one row per hour/segment/transportation mode/direction","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/melt_direction_mode.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Melt dataframe to obtain one row per hour/segment/transportation mode/direction\nThis format makes graphs with ggplot and filtering easier. — melt_direction_mode","text":"","code":"melt_direction_mode(traffic[0:2,]) #> date day hour weekday holiday vacation #> 1 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 2 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 3 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 4 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 5 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 6 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 7 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 8 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 9 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 10 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 11 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 12 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 13 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 14 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 15 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 16 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 17 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 18 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 19 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 20 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 21 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 22 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 23 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 24 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> segment_name v85 car_speed_hist_0to70plus #> 1 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 2 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 3 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 4 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 5 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 6 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 7 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 8 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 9 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 10 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 11 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 12 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 13 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 14 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 15 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 16 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 17 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 18 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 19 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 20 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 21 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 22 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 23 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 24 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> car_speed_hist_0to120plus #> 1 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 4 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 5 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 6 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 7 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 10 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 11 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 12 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 13 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 14 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 15 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 16 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 17 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 18 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 19 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 20 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 21 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 22 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 23 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 24 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> uptime uptime_quality mode direction traffic_sum #> 1 0 FALSE pedestrian both 0 #> 2 0 FALSE pedestrian both 0 #> 3 0 FALSE bike both 0 #> 4 0 FALSE bike both 0 #> 5 0 FALSE heavy both 0 #> 6 0 FALSE heavy both 0 #> 7 0 FALSE car both 0 #> 8 0 FALSE car both 0 #> 9 0 FALSE pedestrian lft 0 #> 10 0 FALSE pedestrian lft 0 #> 11 0 FALSE bike lft 0 #> 12 0 FALSE bike lft 0 #> 13 0 FALSE heavy lft 0 #> 14 0 FALSE heavy lft 0 #> 15 0 FALSE car lft 0 #> 16 0 FALSE car lft 0 #> 17 0 FALSE pedestrian rgt 0 #> 18 0 FALSE pedestrian rgt 0 #> 19 0 FALSE bike rgt 0 #> 20 0 FALSE bike rgt 0 #> 21 0 FALSE heavy rgt 0 #> 22 0 FALSE heavy rgt 0 #> 23 0 FALSE car rgt 0 #> 24 0 FALSE car rgt 0"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/na_prop.html","id":null,"dir":"Reference","previous_headings":"","what":"Visualisation NA stats — na_prop","title":"Visualisation NA stats — na_prop","text":"function calculates returns proportion missing values (NA) imputed values given sensor within specified date range.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/na_prop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Visualisation NA stats — na_prop","text":"","code":"na_prop(data, start, end, sensor)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/na_prop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Visualisation NA stats — na_prop","text":"data Data frame. Containing road traffic data. start Character. start date format \"yyyy-mm-dd\". end Character. end date format \"yyyy-mm-dd\". sensor Character. sensor ID want work.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/na_prop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Visualisation NA stats — na_prop","text":"character vector containing two phrases: proportion missing values data treatment. proportion missing values replaced imputed data remaining proportion missing values.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_comparaison.html","id":null,"dir":"Reference","previous_headings":"","what":"Comparison time period — plot_comparaison","title":"Comparison time period — plot_comparaison","text":"Comparative visualization number users hour day data two different time periods.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_comparaison.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Comparison time period — plot_comparaison","text":"","code":"plot_comparaison(param_ref, param_1, color_graph)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_comparaison.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Comparison time period — plot_comparaison","text":"param_ref List data parameters want filter compare, filtering : list(data=,sensor=,direction=,mobility=,date_range=,vac=,wkd=,p_h=) : - data: dataframe containing data sensor: character, id sensor want study quotes direction: character, \" \" , \"_rgt\" right (B ), \"_lft\" left (B) mobility: character vector, c(\"car\", \"heavy\", \"pedestrian\", \"bike\") types can choose date_range: date vector, c(\"starting_date\", \"ending_date\") vac: character, \"YES\" keep, \"\" filter , \"\" take vacation database wkd: character vector, c(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"), \"1\" stands Monday \"7\" Sunday. Use options(lubridate.week.start = 1) function perform correctly. p_h: character, \"YES\" keep, \"\" filter , \"\" take public holidays database param_1 List, param_ref color_graph Color palette plot","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_comparaison.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Comparison time period — plot_comparaison","text":"ggplot object representing comparison plot","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_deseas.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot decomposed data — plot_deseas","title":"Plot decomposed data — plot_deseas","text":"Plot decomposed data","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_deseas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot decomposed data — plot_deseas","text":"","code":"plot_deseas( data, sensor1, sensor2, hour_x, direction1, direction2, mobility, norm, vacations = NULL, public_holidays = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_deseas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot decomposed data — plot_deseas","text":"data Data frame containing data sensor1 segment ID sensor 1 sensor2 segment ID sensor 2 hour_x hour filter direction1 direction sensor 1 direction2 direction sensor 2 mobility character vector indicating mobility types include filter norm character indicating whether normalize results vacations vacations period filtering function public_holidays public holidays period filtering function","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_deseas.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot decomposed data — plot_deseas","text":"list plots including trend, seasonal, random, peaks, correlation","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_hour_threshold.html","id":null,"dir":"Reference","previous_headings":"","what":"Plots the number of vehicles in each direction for a selected sensor, aswell as the average speed and traffic volume\nby hour of the day. — plot_hour_threshold","title":"Plots the number of vehicles in each direction for a selected sensor, aswell as the average speed and traffic volume\nby hour of the day. — plot_hour_threshold","text":"Plots number vehicles direction selected sensor, aswell average speed traffic volume hour day.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_hour_threshold.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plots the number of vehicles in each direction for a selected sensor, aswell as the average speed and traffic volume\nby hour of the day. — plot_hour_threshold","text":"","code":"plot_hour_threshold(...)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_hour_threshold.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plots the number of vehicles in each direction for a selected sensor, aswell as the average speed and traffic volume\nby hour of the day. — plot_hour_threshold","text":"... data parameters filter , see filtering","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_hour_threshold.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plots the number of vehicles in each direction for a selected sensor, aswell as the average speed and traffic volume\nby hour of the day. — plot_hour_threshold","text":"list containing plotly figure aggregated traffic data hour.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_speed.html","id":null,"dir":"Reference","previous_headings":"","what":"Visualize speed proportion evolution with trafic — plot_speed","title":"Visualize speed proportion evolution with trafic — plot_speed","text":"Graphical representation (raw smoothed curves) proportion vehicles 10, 20, 30 40 km/h per vehicles/hour","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_speed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Visualize speed proportion evolution with trafic — plot_speed","text":"","code":"plot_speed(...)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_speed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Visualize speed proportion evolution with trafic — plot_speed","text":"... data parameters filter , see filtering","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_speed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Visualize speed proportion evolution with trafic — plot_speed","text":"list containing curves, result Darling-Erdös test performed smoothed curves, processed data used curves","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_threshold.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Threshold on Speed Chart — plot_threshold","title":"Plot Threshold on Speed Chart — plot_threshold","text":"Plot Threshold Speed Chart","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_threshold.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Threshold on Speed Chart — plot_threshold","text":"","code":"plot_threshold(plot_speed, selected_speed, state_threshold, threshold = NULL)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_threshold.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Threshold on Speed Chart — plot_threshold","text":"plot_speed List, plot_speed function returns. selected_speed Character indicating selected speed threshold (c(\"\",40KM/H\", \"30KM/H\", \"20KM/H\", \"10KM/H\")). state_threshold Character indicating state threshold (\"auto\" \"manual\"). threshold Numeric value representing manual threshold state_threshold \"manual\".","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_threshold.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Threshold on Speed Chart — plot_threshold","text":"ggplot2 chart speed plot threshold line.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepare data for plotting — prep","title":"Prepare data for plotting — prep","text":"Prepare data plotting","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare data for plotting — prep","text":"","code":"prep(data, count = \"count\", mean = \"mean\", var = \"var\", total = .data$total)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare data for plotting — prep","text":"data Data table processed count Column name representing count mean Column name representing mean var Column name representing variance total Column total table","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepare data for plotting — prep","text":"processed data table plotting","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_comp_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepares and completes road traffic data by replacing missing hour values with NA — prep_comp_data","title":"Prepares and completes road traffic data by replacing missing hour values with NA — prep_comp_data","text":"function prepares input road traffic data converting date character format, filtering rows missing dates, performing additional data cleaning imputation. also completes data adding missing hours sensor converting necessary variables numeric format.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_comp_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepares and completes road traffic data by replacing missing hour values with NA — prep_comp_data","text":"","code":"prep_comp_data(data)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_comp_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepares and completes road traffic data by replacing missing hour values with NA — prep_comp_data","text":"data Data frame containing road traffic data.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_comp_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepares and completes road traffic data by replacing missing hour values with NA — prep_comp_data","text":"complete data frame missing hour values replaced NA.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_view_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepare and filter data for viewing — prep_view_data","title":"Prepare and filter data for viewing — prep_view_data","text":"function prepares filters input data based specified parameters","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_view_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare and filter data for viewing — prep_view_data","text":"","code":"prep_view_data( data, start = str_sub(min(data$date), 1, 10), end = str_sub(max(data$date), 1, 10), list_weekday = \"ALL\", pub_holidays = \"YES\", holidays = \"YES\" )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_view_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare and filter data for viewing — prep_view_data","text":"data input data frame containing sensor data. start start date \"yyyy-mm-dd\" format (default minimum date data). end end date \"yyyy-mm-dd\" format (default maximum date data). list_weekday character vector weekdays include analysis (default \"\"). pub_holidays character indicating filter public holidays. Possible values \"YES\", \"\", \"\" (default \"YES\"). holidays character indicating filter holidays. Possible values \"YES\", \"\", \"\" (default \"YES\").","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_view_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepare and filter data for viewing — prep_view_data","text":"data frame containing summarized information operating sensors. data frame columns sensor_id, days, hourly uptime data (06h 18h).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/preprocess_car_speed.html","id":null,"dir":"Reference","previous_headings":"","what":"Preprocessing mandatory for car speed graphs functions — preprocess_car_speed","title":"Preprocessing mandatory for car speed graphs functions — preprocess_car_speed","text":"Preprocessing mandatory car speed graphs functions","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/preprocess_car_speed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Preprocessing mandatory for car speed graphs functions — preprocess_car_speed","text":"","code":"preprocess_car_speed( enriched_data, aggregated_by, date_range, segments, weekday, hours )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/preprocess_car_speed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Preprocessing mandatory for car speed graphs functions — preprocess_car_speed","text":"enriched_data enriched data.frame containing data sensors aggregated_by Character. Enables comparison segments weekdays. Options : 'segment_name', 'weekday'. date_range Date vector. Example: c('2021-01-01','2022-01-01'). segments Character vector. Selected road segment. weekday Character vector. Weekday choosen. hours Integer vector. Hours choosen.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/preprocess_car_speed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Preprocessing mandatory for car speed graphs functions — preprocess_car_speed","text":"list parameters data preprocessed.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/preprocess_car_speed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Preprocessing mandatory for car speed graphs functions — preprocess_car_speed","text":"","code":"preprocess_car_speed(traffic, date_range = c('2022-01-01','2022-03-01'), segments = 'RteVitre-06', weekday = c('monday','sunday'), hours = 17:20, aggregated_by = \"weekday\") #> $data #> date day hour weekday holiday vacation #> 1 2022-01-17 17:00:00 2022-01-17 17 monday FALSE No vacation #> 2 2022-01-23 17:00:00 2022-01-23 17 sunday FALSE No vacation #> 3 2022-01-24 17:00:00 2022-01-24 17 monday FALSE No vacation #> 4 2022-01-30 17:00:00 2022-01-30 17 sunday FALSE No vacation #> 5 2022-01-31 17:00:00 2022-01-31 17 monday FALSE No vacation #> 6 2022-02-13 17:00:00 2022-02-13 17 sunday FALSE Vacances d'Hiver #> 7 2022-02-14 17:00:00 2022-02-14 17 monday FALSE Vacances d'Hiver #> 8 2022-02-20 17:00:00 2022-02-20 17 sunday FALSE Vacances d'Hiver #> 9 2022-02-21 17:00:00 2022-02-21 17 monday FALSE No vacation #> 10 2022-02-21 18:00:00 2022-02-21 18 monday FALSE No vacation #> 11 2022-02-27 17:00:00 2022-02-27 17 sunday FALSE No vacation #> 12 2022-02-27 18:00:00 2022-02-27 18 sunday FALSE No vacation #> 13 2022-02-28 17:00:00 2022-02-28 17 monday FALSE No vacation #> 14 2022-02-28 18:00:00 2022-02-28 18 monday FALSE No vacation #> segment_name v85 #> 1 RteVitre-06 33.5 #> 2 RteVitre-06 37.5 #> 3 RteVitre-06 31.0 #> 4 RteVitre-06 35.5 #> 5 RteVitre-06 43.5 #> 6 RteVitre-06 41.5 #> 7 RteVitre-06 41.0 #> 8 RteVitre-06 40.0 #> 9 RteVitre-06 28.5 #> 10 RteVitre-06 36.5 #> 11 RteVitre-06 31.0 #> 12 RteVitre-06 34.0 #> 13 RteVitre-06 32.0 #> 14 RteVitre-06 37.0 #> car_speed_hist_0to70plus #> 1 8.0604534, 17.8841310, 30.9823678, 38.7909320, 3.5264484, 0.2518892, 0.0000000, 0.5037783 #> 2 1.951220, 3.414634, 23.414634, 55.609756, 15.609756, 0.000000, 0.000000, 0.000000 #> 3 18.1818182, 26.0042283, 27.0613108, 26.8498943, 1.4799154, 0.2114165, 0.2114165, 0.0000000 #> 4 0.3745318, 5.9925094, 32.2097378, 54.3071161, 6.7415730, 0.3745318, 0.0000000, 0.0000000 #> 5 0.9740260, 2.5974026, 5.1948052, 51.9480519, 34.0909091, 2.2727273, 0.6493506, 2.2727273 #> 6 3.311258, 2.649007, 15.894040, 39.735099, 37.086093, 1.324503, 0.000000, 0.000000 #> 7 15.1603499, 16.0349854, 8.7463557, 32.3615160, 25.0728863, 1.7492711, 0.5830904, 0.2915452 #> 8 1.136364, 4.924242, 12.500000, 57.954545, 21.212121, 2.272727, 0.000000, 0.000000 #> 9 2.7184466, 35.1456311, 44.6601942, 15.3398058, 1.7475728, 0.0000000, 0.1941748, 0.1941748 #> 10 2.2792023, 5.4131054, 20.2279202, 61.5384615, 8.8319088, 0.8547009, 0.2849003, 0.5698006 #> 11 5.5921053, 33.5526316, 35.8552632, 19.4078947, 3.9473684, 0.0000000, 0.3289474, 1.3157895 #> 12 6.6901408, 8.0985915, 36.2676056, 42.9577465, 4.9295775, 0.3521127, 0.3521127, 0.3521127 #> 13 2.2044088, 16.6332665, 49.6993988, 28.4569138, 2.8056112, 0.2004008, 0.0000000, 0.0000000 #> 14 1.0282776, 4.6272494, 19.5372751, 62.9820051, 10.7969152, 0.2570694, 0.2570694, 0.5141388 #> car_speed_hist_0to120plus #> 1 2.2670025, 5.7934509, 10.3274559, 7.5566751, 7.8085642, 23.1738035, 25.9445844, 12.8463476, 2.5188917, 1.0075567, 0.2518892, 0.0000000, 0.0000000, 0.0000000, 0.2518892, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.2518892 #> 2 1.9512195, 0.0000000, 0.9756098, 2.4390244, 6.3414634, 17.0731707, 32.6829268, 22.9268293, 14.1463415, 1.4634146, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 3 6.7653277, 11.4164905, 19.4503171, 6.5539112, 9.0909091, 17.9704017, 19.4503171, 7.3995772, 1.0570825, 0.4228330, 0.0000000, 0.2114165, 0.0000000, 0.2114165, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 4 0.3745318, 0.0000000, 1.8726592, 4.1198502, 10.1123596, 22.0973783, 34.4569288, 19.8501873, 6.3670412, 0.3745318, 0.3745318, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 5 0.6493506, 0.3246753, 0.3246753, 2.2727273, 1.6233766, 3.5714286, 22.7272727, 29.2207792, 22.4025974, 11.6883117, 1.9480519, 0.3246753, 0.3246753, 0.3246753, 0.0000000, 0.3246753, 0.0000000, 0.0000000, 0.6493506, 0.3246753, 0.3246753, 0.0000000, 0.3246753, 0.0000000, 0.3246753 #> 6 2.6490066, 0.6622517, 0.0000000, 2.6490066, 7.2847682, 8.6092715, 17.8807947, 21.8543046, 31.1258278, 5.9602649, 0.6622517, 0.6622517, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 7 9.9125364, 5.2478134, 11.0787172, 4.9562682, 4.3731778, 4.3731778, 11.9533528, 20.4081633, 19.5335277, 5.5393586, 1.4577259, 0.2915452, 0.0000000, 0.5830904, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.2915452, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 8 0.3787879, 0.7575758, 1.8939394, 3.0303030, 3.4090909, 9.0909091, 27.6515152, 30.3030303, 16.6666667, 4.5454545, 2.2727273, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 9 1.3592233, 1.3592233, 7.7669903, 27.3786408, 30.0970874, 14.5631068, 11.0679612, 4.2718447, 1.7475728, 0.0000000, 0.0000000, 0.0000000, 0.1941748, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.1941748, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 10 1.4245014, 0.8547009, 1.4245014, 3.9886040, 2.5641026, 17.6638177, 36.1823362, 25.3561254, 7.9772080, 0.8547009, 0.8547009, 0.0000000, 0.2849003, 0.0000000, 0.0000000, 0.2849003, 0.0000000, 0.0000000, 0.0000000, 0.2849003, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 11 3.2894737, 2.3026316, 12.8289474, 20.7236842, 21.0526316, 14.8026316, 13.4868421, 5.9210526, 3.9473684, 0.0000000, 0.0000000, 0.0000000, 0.3289474, 0.0000000, 0.3289474, 0.0000000, 0.0000000, 0.3289474, 0.3289474, 0.0000000, 0.3289474, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 12 4.5774648, 2.1126761, 2.8169014, 5.2816901, 12.3239437, 23.9436620, 29.9295775, 13.0281690, 3.8732394, 1.0563380, 0.0000000, 0.3521127, 0.0000000, 0.3521127, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.3521127, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 13 1.0020040, 1.2024048, 3.6072144, 13.0260521, 25.4509018, 24.2484970, 19.2384770, 9.2184369, 2.6052104, 0.2004008, 0.2004008, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 14 1.0282776, 0.0000000, 2.0565553, 2.5706941, 3.3419023, 16.1953728, 34.4473008, 28.5347044, 9.5115681, 1.2853470, 0.2570694, 0.0000000, 0.0000000, 0.2570694, 0.2570694, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.2570694 #> uptime uptime_quality mode direction traffic_sum #> 1 0.6711111 TRUE car both 591.5563 #> 2 0.5700000 TRUE car both 359.6491 #> 3 0.7633333 TRUE car both 619.6507 #> 4 0.7972222 TRUE car both 334.9129 #> 5 0.7822222 TRUE car both 393.7500 #> 6 0.7644444 TRUE car both 197.5291 #> 7 0.7308333 TRUE car both 469.3273 #> 8 0.7813889 TRUE car both 337.8599 #> 9 0.7708333 TRUE car both 668.1081 #> 10 0.5644444 TRUE car both 621.8504 #> 11 0.7927778 TRUE car both 383.4618 #> 12 0.6308333 TRUE car both 450.1982 #> 13 0.7897222 TRUE car both 631.8677 #> 14 0.6508333 TRUE car both 597.6953 #> #> $segment #> [1] \"RteVitre-06\" #> #> $mode #> [1] \"heavy\" \"car\" #> #> $direction #> [1] \"both\" #> #> $weekday #> [1] \"monday\" \"sunday\" #> #> $hour #> [1] 17 18 19 20 #> #> $speed_labels #> car_speed_hist_0to120plus_1 car_speed_hist_0to120plus_2 #> \"0 - 5 km/h\" \"5 - 10 km/h\" #> car_speed_hist_0to120plus_3 car_speed_hist_0to120plus_4 #> \"10 - 15 km/h\" \"15 - 20 km/h\" #> car_speed_hist_0to120plus_5 car_speed_hist_0to120plus_6 #> \"20 - 25 km/h\" \"25 - 30 km/h\" #> car_speed_hist_0to120plus_7 car_speed_hist_0to120plus_8 #> \"30 - 35 km/h\" \"35 - 40 km/h\" #> car_speed_hist_0to120plus_9 car_speed_hist_0to120plus_10 #> \"40 - 45 km/h\" \"45 - 50 km/h\" #> car_speed_hist_0to120plus_11 car_speed_hist_0to120plus_12 #> \"50 - 55 km/h\" \"55 - 60 km/h\" #> car_speed_hist_0to120plus_13 car_speed_hist_0to120plus_14 #> \"60 - 65 km/h\" \"65 - 70 km/h\" #> car_speed_hist_0to120plus_15 car_speed_hist_0to120plus_16 #> \"70 - 75 km/h\" \"75 - 80 km/h\" #> car_speed_hist_0to120plus_17 car_speed_hist_0to120plus_18 #> \"80 - 85 km/h\" \"85 - 90 km/h\" #> car_speed_hist_0to120plus_19 car_speed_hist_0to120plus_20 #> \"90 - 95 km/h\" \"95 - 100 km/h\" #> car_speed_hist_0to120plus_21 car_speed_hist_0to120plus_22 #> \"100 - 105 km/h\" \"105 - 110 km/h\" #> car_speed_hist_0to120plus_23 car_speed_hist_0to120plus_24 #> \"110 - 115 km/h\" \"115 - 120 km/h\" #> car_speed_hist_0to120plus_25 #> \"120 - 120+ km/h\" #>"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/retrieve_sensor.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieves data associated with a sensor from the Telraam API — retrieve_sensor","title":"Retrieves data associated with a sensor from the Telraam API — retrieve_sensor","text":"Retrieves data associated sensor Telraam API. data retrieved specified time period start_date end_date (inclusive).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/retrieve_sensor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieves data associated with a sensor from the Telraam API — retrieve_sensor","text":"","code":"retrieve_sensor(segment_name, start_date, end_date, key = get_telraam_token())"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/retrieve_sensor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieves data associated with a sensor from the Telraam API — retrieve_sensor","text":"segment_name Character. Name segment, specified config. start_date Date. Start date \"aaaa-mm-jj\", must date type. end_date Date. End date \"aaaa-mm-jj\", must date type. key API key (set set_telraam_token() function)","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/retrieve_sensor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieves data associated with a sensor from the Telraam API — retrieve_sensor","text":"Dataframe Telraam API, enriched enrich_traffic() function.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/retrieve_sensor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieves data associated with a sensor from the Telraam API — retrieve_sensor","text":"","code":"if (FALSE) # This function requires a valid API key period <- as.Date(c('2022-01-01', '2022-12-31')) retrieve_sensor('RteVitre-06', period[1], period[2]) #> Error in eval(expr, envir, enclos): object 'period' not found"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/seq_by_3_month.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate sequence of intervals with three-month periods — seq_by_3_month","title":"Generate sequence of intervals with three-month periods — seq_by_3_month","text":"function used internally retrieve_sensor function generate sequence intervals three-month periods. takes start date (start_date) end date (end_date), returns data frame two columns representing start end dates interval.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/seq_by_3_month.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate sequence of intervals with three-month periods — seq_by_3_month","text":"","code":"seq_by_3_month(start_date, end_date)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/seq_by_3_month.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate sequence of intervals with three-month periods — seq_by_3_month","text":"start_date Date. Start date \"yyyy-mm-dd\" format. end_date Date. End date \"yyyy-mm-dd\" format.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/seq_by_3_month.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate sequence of intervals with three-month periods — seq_by_3_month","text":"Dataframe start end columns, row represents 3 months period.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/seq_by_3_month.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate sequence of intervals with three-month periods — seq_by_3_month","text":"","code":"seq_by_3_month(as.Date('2023-11-01'),as.Date('2024-11-01')) #> start end #> 1 2023-11-01 2024-02-01 #> 2 2024-02-01 2024-05-01 #> 3 2024-05-01 2024-08-01 #> 4 2024-08-01 2024-11-01"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_global_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to set up the global variables for public holidays and vacations, with the default\nbeing the french dates from a governmental API. — set_global_vars","title":"Function to set up the global variables for public holidays and vacations, with the default\nbeing the french dates from a governmental API. — set_global_vars","text":"Function set global variables public holidays vacations, default french dates governmental API.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_global_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to set up the global variables for public holidays and vacations, with the default\nbeing the french dates from a governmental API. — set_global_vars","text":"","code":"set_global_vars(vacations = NULL, public_holidays = NULL)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_global_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to set up the global variables for public holidays and vacations, with the default\nbeing the french dates from a governmental API. — set_global_vars","text":"vacations data frame containing vacation dates public_holidays data frame containing public holidays dates","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_global_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to set up the global variables for public holidays and vacations, with the default\nbeing the french dates from a governmental API. — set_global_vars","text":"return anything, set global variables public holidays vacations.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_global_vars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to set up the global variables for public holidays and vacations, with the default\nbeing the french dates from a governmental API. — set_global_vars","text":"","code":"pkg.globals <- new.env(parent = emptyenv()) set_global_vars() print(pkg.globals$vacations) #> NULL"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_telraam_token.html","id":null,"dir":"Reference","previous_headings":"","what":"Saves an authentication token for the 'Telraam' API. — set_telraam_token","title":"Saves an authentication token for the 'Telraam' API. — set_telraam_token","text":"want get token instruction, please use get_telraam_token().","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_telraam_token.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Saves an authentication token for the 'Telraam' API. — set_telraam_token","text":"","code":"set_telraam_token(token)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_telraam_token.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Saves an authentication token for the 'Telraam' API. — set_telraam_token","text":"token string token","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_telraam_token.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Saves an authentication token for the 'Telraam' API. — set_telraam_token","text":"Boolean: TRUE token correctly set","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_telraam_token.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Saves an authentication token for the 'Telraam' API. — set_telraam_token","text":"","code":"my_token <- \"MyTelraamToken\" set_telraam_token(my_token) get_telraam_token() #> [1] \"MyTelraamToken\""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/simple_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of cars and Heavies as a function of time — simple_plot","title":"Number of cars and Heavies as a function of time — simple_plot","text":"Number cars Heavies function time","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/simple_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of cars and Heavies as a function of time — simple_plot","text":"","code":"simple_plot( data, sensor, date_range, line_color = \"black\", smooth_color = \"#B1D62E\" )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/simple_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of cars and Heavies as a function of time — simple_plot","text":"data data.frame containing data sensors sensor numeric, Id chosen sensor date_range Date vector. example: c('2021-01-01','2022-01-01') line_color character. color main line. Default black smooth_color character. color smoothing line. Default light green","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/simple_plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of cars and Heavies as a function of time — simple_plot","text":"graph showing evolution number cars heavies selected date range chosen sensor.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/traffic.html","id":null,"dir":"Reference","previous_headings":"","what":"Traffic data of Telraam sensors in Châteaubourg (FR) — traffic","title":"Traffic data of Telraam sensors in Châteaubourg (FR) — traffic","text":"Telraam sensors continously monitor street form citizen window. count heavy vehicules, cars, twok-wheelers pedestrians, every hour. Châteaubourg one city France highest density sensors dataframe subset sensors data Châteaubourg 2022. Additional properties present natively Telraam API added package.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/traffic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Traffic data of Telraam sensors in Châteaubourg (FR) — traffic","text":"","code":"traffic"},{"path":[]},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/traffic.html","id":"traffic","dir":"Reference","previous_headings":"","what":"traffic","title":"Traffic data of Telraam sensors in Châteaubourg (FR) — traffic","text":"data frame 16,729 rows 22 columns: instance_id Sensor number. Equals -1 API request made road segment camera. segment_id Road segment Telraam ID. Equals -1 API request made camera road segment. segment_name Additional property - Segment name specified configuration file. segment_fullname Additional property - Concatenation segment_id segment name specified configuration. date date UTC time reporting interval (beginning interval). day Additional property - Day reporting interval. hour Additional property - Hour reporting interval. weekday Additional property - Weekday reporting interval. holiday Additional property - boolean, indicates whether entry French public holiday. vacation Indicates whether entry French vacation period, true, vacation period name. interval can \"hourly\" \"daily\" hourly daily aggregate data. uptime 0 1, represents portion reporting interval actively spent counting traffic uptime_quality Additional property - boolean, indicates whether entry uptime greather equal 0. heavy, heavy_lft, heavy_rgt number heavy vehicles, total directions. car, car_lft, car_rgt number cars, total directions. bike, bike_lft, bike_rgt number two-wheelers, total directions. pedestrian, pedestrian_lft, pedestrian_rgt number pedestrians, total directions. direction 1, internal consistency value Telraam. car_speed_hist_0to70plus, car_speed_hist_0to120plus estimated car speed distribution 10 km/h bins 0 70+ km/h 120+ km/h (percentage total 100%). timezone name Time zone segment can found. v85 estimated car speed limit km/h 85% cars respect","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/traffic.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Traffic data of Telraam sensors in Châteaubourg (FR) — traffic","text":"https://telraam-api.net/","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/which_vacations.html","id":null,"dir":"Reference","previous_headings":"","what":"Indicates if a date is in vacation period and if true, which vacation.\nIf the date is not in a vacation period, ","title":"Indicates if a date is in vacation period and if true, which vacation.\nIf the date is not in a vacation period, ","text":"Indicates date vacation period true, vacation. date vacation period, \"vacation\" returned.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/which_vacations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indicates if a date is in vacation period and if true, which vacation.\nIf the date is not in a vacation period, ","text":"","code":"which_vacations(date, vacation)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/which_vacations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indicates if a date is in vacation period and if true, which vacation.\nIf the date is not in a vacation period, ","text":"date Date (character format) vacation Dataframe vacations, format set_globals_vars output.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/which_vacations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indicates if a date is in vacation period and if true, which vacation.\nIf the date is not in a vacation period, ","text":"Vacation description day two dates, \"vacation\" otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Write or update the sensor data in the data folder — write_update_data","title":"Write or update the sensor data in the data folder — write_update_data","text":"Writes updates sensor data data folder. retrieves data specified sensor start_date end_date (inclusive) using retrieve_sensor function, converts certain columns character strings writing data RData file data folder (create_directory = TRUE), temporary folder otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write or update the sensor data in the data folder — write_update_data","text":"","code":"write_update_data(segment_name, start_date, end_date, create_directory = FALSE)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write or update the sensor data in the data folder — write_update_data","text":"segment_name Character. Name segment, specified config. start_date Date. Start date \"aaaa-mm-jj\" end_date Date. End date \"aaaa-mm-jj\" create_directory Boolean: file need created project directory? Default FALSE.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Write or update the sensor data in the data folder — write_update_data","text":"Boolean: TRUE data well saved/written, FALSE otherwise (data example)","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Write or update the sensor data in the data folder — write_update_data","text":"","code":"if (FALSE) # This function requires a valid API key period <- as.Date(c('2022-01-01', '2022-12-31')) write_update_data('RteVitre-06', period[1], period[2]) #> Error in eval(expr, envir, enclos): object 'period' not found"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data_comp.html","id":null,"dir":"Reference","previous_headings":"","what":"Write or update the sensor data in the data folder — write_update_data_comp","title":"Write or update the sensor data in the data folder — write_update_data_comp","text":"function writes updates sensor data data folder. retrieves data specified sensor start_date end_date (inclusive) using retrieve_sensor function, converts certain columns character strings writing data CSV file data folder.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data_comp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write or update the sensor data in the data folder — write_update_data_comp","text":"","code":"write_update_data_comp( segment_name, start_date, end_date, vacations = NULL, public_holidays = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data_comp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write or update the sensor data in the data folder — write_update_data_comp","text":"segment_name Character. Name segment, specified config. start_date Date. Start date \"aaaa-mm-jj\" end_date Date. End date \"aaaa-mm-jj\" vacations vacation periods, set default french ones public_holidays public holidays list, set default french ones","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/news/index.html","id":"telraamstats-110","dir":"Changelog","previous_headings":"","what":"telraamStats 1.1.0","title":"telraamStats 1.1.0","text":"Initial CRAN submission.","code":""}] +[{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Gathering data","text":"vignette describes traffic data Telraam sensors get access specific data. go , ’ll attach packages use.","code":"library(telraamStats)"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"telraam","dir":"Articles","previous_headings":"Introduction","what":"Telraam","title":"Gathering data","text":"Telraam Belgian company develops sensors monitoring collecting multi-modal traffic data. sensors equipped cameras count road users using various mode transport, including pedestrian, cyclists, cars heavy vehicles. diverse range stakeholders (individuals, community groups, local authoritieds, researchers…) can purchase install Telraam sensor buildings. map sensors available Telraam website. Everyone can access data web interface (example) API.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"available-data","dir":"Articles","previous_headings":"Introduction > Telraam","what":"Available data","title":"Gathering data","text":"Telraam API provides information road segments sensors locations, parameters, importantly, offers traffic data. Every hour, sensor sends information traffic counts, transportation mode road direction, along confidence metric. addition traffic counts, estimated car speed car speed histogram also available. details data provided vignette.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"included-dataset","dir":"Articles","previous_headings":"Introduction","what":"Included dataset","title":"Gathering data","text":"’re interested discovering Telraam data playing real traffic data, dataset two road segments city Châteaubourg (FR) included package. Châteaubourg municipality Brittany, northwestern France. population around 7,500 inhabitants area less 30km\\(^2\\). France, city largest number Telraam sensors 2023 far highest density sensors. two road segments offer hourly data January 1, 2022, December 31, 2022. data directly extracted API may contain missing extreme values.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"load-included-dataset","dir":"Articles","previous_headings":"Introduction > Included dataset","what":"Load included dataset","title":"Gathering data","text":"Included dataset lazily loaded telraamStats package. already called library(telraamStats), dataset already attached can call directly : Otherwise, don’t want load entire package, can also access dataset using telraamStats::traffic.","code":"head(traffic)"},{"path":[]},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"obtain-a-telraam-token","dir":"Articles","previous_headings":"Introduction > Retrieve data from a specific road segment or set of segments","what":"1. Obtain a Telraam token","title":"Gathering data","text":"work data one sensor - -, must first create Telraam (free) account obtain API token. API token serves unique identifier accessing Telraam API service, used package. can generate personal dashboard Telraam website. information Telraam API, refer Telraam Q&website.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"specify-your-token-in-configuration","dir":"Articles","previous_headings":"Introduction > Retrieve data from a specific road segment or set of segments","what":"2. Specify your token in configuration","title":"Gathering data","text":"strongly recommended directly embed token code, especially code shared versioned using system like Git. two options specify Telraam token : Edit .Renviron file. .Renviron useful defining sensitive information R environment variables: contains list environment variables set. easy way edit file add Telraam token using usethis package. Run following command (either every time change API Token) : .Renviron file open RStudio can add new line form token='YourTelraamAPIToken'. comfortable previous step, can use built-function telraamStats package. However, keep mind need run function every time want retrieve data: want verify token correctly set, can use following command :","code":"if (!require(\"usethis\")) install.packages(\"usethis\") #if you haven't installed 'usethis' already usethis::edit_r_environ() set_telraam_token(token = 'YourTelraamAPIToken') get_telraam_token()"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"specify-road-segment-ids-in-configuration-file","dir":"Articles","previous_headings":"Introduction > Retrieve data from a specific road segment or set of segments","what":"3. Specify road segment IDs in configuration file","title":"Gathering data","text":"road segment unique ID, can found Telraam location URL. instance, URL one Châteaubourg’s segments https://telraam.net/home/location/9000005665, ID located last part URL (9000005665). gathered IDs segments, can specify editing inst\\config.yml file. file can created using create_config() function. executed, find config.yml file inst\\ folder work directory. file already contains following template, can modify (directly yml file) add segments, adhering format template, , segment name (without quotes), followed colon, segment number within quotes : segmentName: '9000000000'. can specify many segments want personalize segment’s names. don’t want create folder project directory, another option use temporary folder specify segments names IDs directly create_config() function, re-run command session.","code":"create_config(create_directory = TRUE) default: url: https://telraam-api.net/v1 segments: segment-01: '9000000000' segment-02: '9000000000' default: url: https://telraam-api.net/v1 segments: MyFirstSegment: '9000000000' My-second-segment: '9000000000' My_3rd_segment: '9000000000' list_of_segments = list(\"Burel\"= \"9000002156\", \"Vitre\" = \"9000001844\") create_config(segments = list_of_segments, create_directory = FALSE)"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"get-data-for-your-road-segments","dir":"Articles","previous_headings":"Introduction > Retrieve data from a specific road segment or set of segments","what":"4. Get data for your road segments","title":"Gathering data","text":"specified names IDs road segments, can use retrieve_sensor() function gather data segment Telraam API. function takes, arguments, name segment, first last day period interest. must use names specified configuration files dates must date type. want store data, can directly use write_update_data(), performs task also writes updates sensor data temporary folder data/ directory .Rdata format. arguments previous function: retrieve data already stored, can use import_sensor(). function imports data associated given list sensor names .RData files contained data/ directory. , also use names specified configuration files. available periods imported.","code":"retrieve_sensor(segment_name = \"segment-01\", start_date = as.Date('2023-09-01'), end_date = as.Date('2023-09-30')) write_update_data(segment_name = \"segment-01\", start_date = as.Date('2023-09-01'), end_date = as.Date('2023-09-30'), create_directory = FALSE) #TRUE if you want to save the data in a permanent folder import_sensor(list_sensor = c(\"segment-01\",\"segment-02\"))"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-details.html","id":"data-details","dir":"Articles","previous_headings":"Introduction","what":"Data details","title":"Gathering data","text":"importing data road segments (following previous steps) using included dataset, obtain Telraam data columns. Among columns, important ones : segment_id : Telraam ID road segment ; date : date UTC time reporting interval (beginning interval) ; interval : can “hourly” “daily” hourly daily aggregate data ; uptime : 0 1, represents portion reporting interval actively spent counting traffic. information uptime parameter, can refer Telraam article ; heavy, heavy_lft, heavy_rgt : number heavy vehicles, total directions. also columns transportation mode (car, bike, pedestrian) ; car_speed_hist_0to70plus, car_speed_hist_0to120plus : estimated car speed distribution 10 km/h bins 0 70+ km/h 120+ km/h (percentage) ; v85 : estimated car speed limit km/h 85% cars respect. Complete data description can found data documentation package, can refer Telraam API website details.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Visualize and analyse traffic","text":"vignette illustrates potential visualizations (ensuing analysis) traffic data Telraam sensors provided package. go , ’ll attach packages use. also load data: , use dataset attached package, can certainly replicate visualizations analyses using data sensors. information data retrieval, can refer dedicated vignette (vignette(\"data-details\")). Included dataset lazily loaded telraamStats package. already called library(telraamStats), dataset already attached can call directly :","code":"library(telraamStats) head(traffic)"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"period-availability-for-your-segments","dir":"Articles","previous_headings":"","what":"Period availability for your segments","title":"Visualize and analyse traffic","text":"Road segment-specific sensors operate continuously; limited daylight duration may also face external issues (unplugged, falling, software problems, etc.). data collected period may continuous interruptions ranging hour several days. visualize traffic, important aware operating periods sensors analyzed, well quality data. data reliability provided uptime indicator. Uptime, ranging 0 1, corresponds percentage time camera actively counting passages. Following Telraam’s recommendations, uptime lower 0.5 considered associated poor-quality data. graphical representation , obtained using gg_availability() function, provides overview data availability quality different sensors entire period. indicator calculated daytime hours (5 .m. 8 p.m.) Telraam sensor operational. represents average uptime hours. illustrates daily average uptime evolution: higher value, better data quality sensor respective day. purpose assist selecting study periods. graph, example, can observe black time slots camera segment ‘ParisArcEnCiel-05’ report data end June 2022 end year 2022. can also notice average uptime higher summer period. illustrates fact duration daylight, therefore possible filming period, longer summer. graphs generated functions presented based data filtered according uptime parameter: hours uptime > 0.5 retained. filter editable moment ensures data considered sufficient level reliability.","code":"plot( gg_availability(traffic) )"},{"path":[]},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"traffic-evolution","dir":"Articles","previous_headings":"Traffic","what":"Traffic evolution","title":"Visualize and analyse traffic","text":"identified specific period want analyze, may want observe evolution traffic trends time. gg_traffic_evolution() enables representation traffic particular period, aggregated segments, specific direction, aggregated , aggregated transportation modes selected ones. Without specifying options, can view traffic evolution cars heavy vehicles segments entire period. default, smoothing curve (based GAM model cubic spline) used represent trend. can specify date range, one segments, different transportation modes directions choose whether want smoothing curve . default, aggregation done day, can obtain precise information setting agg_day parameter FALSE aggregate hour. example possible filters parameters :","code":"plot( gg_traffic_evolution(traffic) ) plot( gg_traffic_evolution(traffic, date_range = c('2022-01-01','2022-03-01'), segment = 'RteVitre-06', mode = c('car','pedestrian'), direction = 'lft', smoothed = FALSE, agg_day = FALSE) )"},{"path":[]},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"average-traffic-per-weekday","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per weekday","title":"Visualize and analyse traffic","text":"traffic varies according days week, can serve analytical window understand territorial mobility. gg_traffic_avg() function allows examine average behavior per day week. can used globally specifically (specific period, segment set segments, specific direction, particular transportation mode). default, function provides average traffic per day week : , instance, one can observe several different traffic dynamics, weekdays exhibiting similar patterns weekends displaying different ones (shifted morning peak smoother traffic throughout day). , ’s possible select specific period, specific segment, mode transportation, direction, day week according needs study. representation, instance, allows us see traffic one direction segment much heavier evening morning, even Fridays compared Mondays.","code":"plot( gg_traffic_avg(traffic) ) plot( gg_traffic_avg(traffic, date_range = c('2022-07-01','2022-09-01'), segment = 'RteVitre-06', mode = 'car', direction = 'rgt', weekday = c('monday','friday') ) )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"average-traffic-per-segment","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per segment","title":"Visualize and analyse traffic","text":"function gg_traffic_avg() can used calculate average traffic per segment compare segments . , simply use parameter 'aggregated_by' replace default value ('weekday') 'segment_name', shown example . function plot average traffic according time day, time road segment. representation allows us realize differences traffic, terms volumes dynamics. Similarly , possible specify period, direction travel, mode transportation, day week.","code":"plot( gg_traffic_avg(traffic, aggregated_by = \"segment_name\") ) plot( gg_traffic_avg(traffic, aggregated_by = 'segment_name', weekday = 'sunday', mode = 'car', direction = 'rgt') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"average-traffic-per-direction","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per direction","title":"Visualize and analyse traffic","text":"function gg_traffic_avg() can also used compare directions travel, using parameter aggregated_by = \"direction\" shown example . can particularly useful within road segment observe commuter traffic. , still possible filter modes transportation, days week, segments. example typical route significant commuter traffic, heavy traffic one direction morning direction evening.","code":"plot( gg_traffic_avg(traffic, aggregated_by = 'direction', weekday = 'monday', mode = 'car', segments = 'RteVitre-06' ) )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"average-traffic-per-mode","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per mode","title":"Visualize and analyse traffic","text":"Finally, function gg_traffic_avg() allows comparing modes transportation , particularly observe differences volumes dynamics, using parameter aggregated_by = \"direction\" shown example . , ’s possible filter directions, days week, segments, hours, course, select modes transportation","code":"plot( gg_traffic_avg(traffic, aggregated_by = 'mode', mode = c('heavy','car'), segment = 'RteVitre-06') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"car-speed","dir":"Articles","previous_headings":"","what":"Car speed","title":"Visualize and analyse traffic","text":"Telraam sensors offer speed estimation cars two levels : estimated car speed distribution (ranging 0 120+ km/h), 10 5 km/h bins ; v85, estimated car speed limit km/h 85% cars respect. 15% drivers drive faster v85 indicator. Telraam specifies speed-related measurements biases: accuracy likely better +/- 10%. Moreover, measurements pertain exclusively cars include modes transportation.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"car-speed-distribution","dir":"Articles","previous_headings":"Car speed","what":"Car speed distribution","title":"Visualize and analyse traffic","text":"car’s speed distribution can plotted globally filters (specific period, weekdays segments) function gg_car_speed_histogram(). Refer documentation information filters. function gg_car_speed_histogram() enables compare speed histograms different segments weekdays. example distinction road segment. example, can observe difference two segments: first segment (ParisArcEnCiel-05), speed distribution spread characterized peak low speeds. second segment (RteVitre-06) peak distribution 35-40 km/h class, values concentrated around range. period, 25% cars driving 35 40 km/h segment. example weekday available filters. shift less significant distinguishing sensors, one can still notice difference speed weekdays, likely attributable traffic dynamics differences observed earlier.","code":"plot( gg_car_speed_histogram(traffic) ) plot( gg_car_speed_histogram(traffic, aggregated_by = 'segment_name') ) plot( gg_car_speed_histogram(traffic, weekday = c('monday','sunday'), segments = 'RteVitre-06', hours = 17:20, aggregated_by = \"weekday\") )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data-visualization.html","id":"v85","dir":"Articles","previous_headings":"Car speed","what":"v85","title":"Visualize and analyse traffic","text":"v85 estimated car speed limit km/h 85% cars respect. 15% drivers drive faster v85. function gg_car_speed_v85() allows plotting evolution average indicator according time day. can particularly interesting link traffic, observe possible congestion phenomena , possible view indicator segment (aggregated_by = 'segment_name') day week (aggregated_by = 'weekday'). ’s example segment. Finally, still possible filter specific period particular segment.","code":"plot( gg_car_speed_v85(traffic) ) plot( gg_car_speed_v85(traffic, aggregated_by = 'segment_name') ) plot( gg_car_speed_v85(traffic, aggregated_by = 'weekday', date_range = c('2022-01-01','2022-03-01'), segments = 'RteVitre-06') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Visualize and analyse traffic","text":"vignette illustrates potential visualizations (ensuing analysis) traffic data Telraam sensors provided package. go , ’ll attach packages use. also load data: , use dataset attached package, can certainly replicate visualizations analyses using data sensors. information data retrieval, can refer dedicated vignette (vignette(\"data-details\")). Included dataset lazily loaded telraamStats package. already called library(telraamStats), dataset already attached can call directly :","code":"library(telraamStats) head(traffic)"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"period-availability-for-your-segments","dir":"Articles","previous_headings":"","what":"Period availability for your segments","title":"Visualize and analyse traffic","text":"Road segment-specific sensors operate continuously; limited daylight duration may also face external issues (unplugged, falling, software problems, etc.). data collected period may continuous interruptions ranging hour several days. visualize traffic, important aware operating periods sensors analyzed, well quality data. data reliability provided uptime indicator. Uptime, ranging 0 1, corresponds percentage time camera actively counting passages. Following Telraam’s recommendations, uptime lower 0.5 considered associated poor-quality data. graphical representation , obtained using gg_availability() function, provides overview data availability quality different sensors entire period. indicator calculated daytime hours (5 .m. 8 p.m.) Telraam sensor operational. represents average uptime hours. illustrates daily average uptime evolution: higher value, better data quality sensor respective day. purpose assist selecting study periods. graph, example, can observe black time slots camera segment ‘ParisArcEnCiel-05’ report data end June 2022 end year 2022. can also notice average uptime higher summer period. illustrates fact duration daylight, therefore possible filming period, longer summer. graphs generated functions presented based data filtered according uptime parameter: hours uptime > 0.5 retained. filter editable moment ensures data considered sufficient level reliability.","code":"plot( gg_availability(traffic) )"},{"path":[]},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"traffic-evolution","dir":"Articles","previous_headings":"Traffic","what":"Traffic evolution","title":"Visualize and analyse traffic","text":"identified specific period want analyze, may want observe evolution traffic trends time. gg_traffic_evolution() enables representation traffic particular period, aggregated segments, specific direction, aggregated , aggregated transportation modes selected ones. Without specifying options, can view traffic evolution cars heavy vehicles segments entire period. default, smoothing curve (based GAM model cubic spline) used represent trend. can specify date range, one segments, different transportation modes directions choose whether want smoothing curve . default, aggregation done day, can obtain precise information setting agg_day parameter FALSE aggregate hour. example possible filters parameters :","code":"plot( gg_traffic_evolution(traffic) ) plot( gg_traffic_evolution(traffic, date_range = c('2022-01-01','2022-03-01'), segment = 'RteVitre-06', mode = c('car','pedestrian'), direction = 'lft', smoothed = FALSE, agg_day = FALSE) )"},{"path":[]},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"average-traffic-per-weekday","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per weekday","title":"Visualize and analyse traffic","text":"traffic varies according days week, can serve analytical window understand territorial mobility. gg_traffic_avg() function allows examine average behavior per day week. can used globally specifically (specific period, segment set segments, specific direction, particular transportation mode). default, function provides average traffic per day week : , instance, one can observe several different traffic dynamics, weekdays exhibiting similar patterns weekends displaying different ones (shifted morning peak smoother traffic throughout day). , ’s possible select specific period, specific segment, mode transportation, direction, day week according needs study. representation, instance, allows us see traffic one direction segment much heavier evening morning, even Fridays compared Mondays.","code":"plot( gg_traffic_avg(traffic) ) plot( gg_traffic_avg(traffic, date_range = c('2022-07-01','2022-09-01'), segment = 'RteVitre-06', mode = 'car', direction = 'rgt', weekday = c('monday','friday') ) )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"average-traffic-per-segment","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per segment","title":"Visualize and analyse traffic","text":"function gg_traffic_avg() can used calculate average traffic per segment compare segments . , simply use parameter 'aggregated_by' replace default value ('weekday') 'segment_name', shown example . function plot average traffic according time day, time road segment. representation allows us realize differences traffic, terms volumes dynamics. Similarly , possible specify period, direction travel, mode transportation, day week.","code":"plot( gg_traffic_avg(traffic, aggregated_by = \"segment_name\") ) plot( gg_traffic_avg(traffic, aggregated_by = 'segment_name', weekday = 'sunday', mode = 'car', direction = 'rgt') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"average-traffic-per-direction","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per direction","title":"Visualize and analyse traffic","text":"function gg_traffic_avg() can also used compare directions travel, using parameter aggregated_by = \"direction\" shown example . can particularly useful within road segment observe commuter traffic. , still possible filter modes transportation, days week, segments. example typical route significant commuter traffic, heavy traffic one direction morning direction evening.","code":"plot( gg_traffic_avg(traffic, aggregated_by = 'direction', weekday = 'monday', mode = 'car', segments = 'RteVitre-06' ) )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"average-traffic-per-mode","dir":"Articles","previous_headings":"Traffic > Average traffic","what":"Average traffic per mode","title":"Visualize and analyse traffic","text":"Finally, function gg_traffic_avg() allows comparing modes transportation , particularly observe differences volumes dynamics, using parameter aggregated_by = \"direction\" shown example . , ’s possible filter directions, days week, segments, hours, course, select modes transportation","code":"plot( gg_traffic_avg(traffic, aggregated_by = 'mode', mode = c('heavy','car'), segment = 'RteVitre-06') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"car-speed","dir":"Articles","previous_headings":"","what":"Car speed","title":"Visualize and analyse traffic","text":"Telraam sensors offer speed estimation cars two levels : estimated car speed distribution (ranging 0 120+ km/h), 10 5 km/h bins ; v85, estimated car speed limit km/h 85% cars respect. 15% drivers drive faster v85 indicator. Telraam specifies speed-related measurements biases: accuracy likely better +/- 10%. Moreover, measurements pertain exclusively cars include modes transportation.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"car-speed-distribution","dir":"Articles","previous_headings":"Car speed","what":"Car speed distribution","title":"Visualize and analyse traffic","text":"car’s speed distribution can plotted globally filters (specific period, weekdays segments) function gg_car_speed_histogram(). Refer documentation information filters. function gg_car_speed_histogram() enables compare speed histograms different segments weekdays. example distinction road segment. example, can observe difference two segments: first segment (ParisArcEnCiel-05), speed distribution spread characterized peak low speeds. second segment (RteVitre-06) peak distribution 35-40 km/h class, values concentrated around range. period, 25% cars driving 35 40 km/h segment. example weekday available filters. shift less significant distinguishing sensors, one can still notice difference speed weekdays, likely attributable traffic dynamics differences observed earlier.","code":"plot( gg_car_speed_histogram(traffic) ) plot( gg_car_speed_histogram(traffic, aggregated_by = 'segment_name') ) plot( gg_car_speed_histogram(traffic, weekday = c('monday','sunday'), segments = 'RteVitre-06', hours = 17:20, aggregated_by = \"weekday\") )"},{"path":"https://ketsiaguichard.github.io/telraamStats/articles/data_visualization.html","id":"v85","dir":"Articles","previous_headings":"Car speed","what":"v85","title":"Visualize and analyse traffic","text":"v85 estimated car speed limit km/h 85% cars respect. 15% drivers drive faster v85. function gg_car_speed_v85() allows plotting evolution average indicator according time day. can particularly interesting link traffic, observe possible congestion phenomena , possible view indicator segment (aggregated_by = 'segment_name') day week (aggregated_by = 'weekday'). ’s example segment. Finally, still possible filter specific period particular segment.","code":"plot( gg_car_speed_v85(traffic) ) plot( gg_car_speed_v85(traffic, aggregated_by = 'segment_name') ) plot( gg_car_speed_v85(traffic, aggregated_by = 'weekday', date_range = c('2022-01-01','2022-03-01'), segments = 'RteVitre-06') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Lilou Augeray. Author. Ulysse Caromel. Author. Ketsia Guichard. Maintainer. Pascal Irz. Author. Mijin Park. Author. Tanguy Richard. Author. Agis-ta-terre. Copyright holder, funder.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Augeray L, Caromel U, Irz P, Park M, Richard T (2024). telraamStats: Retrieval Visualization Mobility Data 'Telraam' Sensors. R package version 1.1.0, https://annuaire.agistaterre.org/telraamStats/.","code":"@Manual{, title = {telraamStats: Retrieval and Visualization of Mobility Data from 'Telraam' Sensors}, author = {Lilou Augeray and Ulysse Caromel and Pascal Irz and Mijin Park and Tanguy Richard}, year = {2024}, note = {R package version 1.1.0}, url = {https://annuaire.agistaterre.org/telraamStats/}, }"},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"telraamstats","dir":"","previous_headings":"","what":"Retrieval and Visualization of Mobility Data from Telraam Sensors","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"aim package grant user tools data visualisation data analysis mobility data Telraam sensors. example using package can seen application, although also utilizes advanced representations. Link Github repository","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"telraam-sensors","dir":"","previous_headings":"","what":"Telraam Sensors","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"Telraam Belgian company offers citizen-powered solution gathering diverse traffic data using affordable device. sensor continuously monitors street activity citizen’s window, capturing data various transportation modes like cars, heavy vehicles, cyclists, pedestrians. data crucial informing traffic planning engaging local communities dialogue authorities. sensors employs advanced AI proprietary algorithms detect, classify count road users, providing anonymous, aggregate data 15-minute resolution. device operates autonomously installed upper-floor window unobstructed view street. Data collected Telraam devices can shared Open Data. information view map currently available sensors, can visit Telraam website.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"specific-terms","dir":"","previous_headings":"","what":"Specific Terms","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"Telraam data includes specific terms essential use package : segment abbreviated term road segment. road segment part road, defined set geographical coordinate pairs Telraam id. segments defined typically two corners street, longer street likely consist multiple road segments ; sensor device measures traffic specific segment. Multiple sensors can associated road segment, unique sensor linked multiple segments. Sensors also defined configuration, primarily version (either V1 S2, S2 advanced version Telraam devices) ; uptime: Telraam V1 sensors don’t count trafic 100% time. portion time used calculations preprocessing. uptime percentage time counter actively counting. Data provided Telraam API already corrected uptime Telraam recommends keeping eye uptime values. high uptime, typically 0.7-0.8, indicates good data. first last daylight hour day consistently lower uptimes due aforementioned reasons, uptimes day 0.5, usually indicates potential issue instance. Uptime Telraam S2 units almost always 1.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"licence","dir":"","previous_headings":"","what":"Licence","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"work licensed Creative Commons Attribution-ShareAlike 4.0 International License.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"install-package","dir":"","previous_headings":"","what":"Install Package","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"","code":"install.packages('telraamStats') library(telraamStats)"},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"vignettes","dir":"","previous_headings":"","what":"Vignettes","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"Two vignettes currently available: one explaining retrieval Telraam data describing data included package (vignette(\"data-details\")) second detailing available graphical representations (vignette(\"data-visualization\")).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/index.html","id":"future-developments","dir":"","previous_headings":"","what":"Future Developments","title":"Retrieval and Visualization of Mobility Data from Telraam Sensors","text":"Future developments focus data quality topics: descriptive statistics visualizations data quality, well imputation methods data low update frequencies (indicating low quality).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/api_state.html","id":null,"dir":"Reference","previous_headings":"","what":"Check API State — api_state","title":"Check API State — api_state","text":"Return state Telraam API. Determine updates can made.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/api_state.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check API State — api_state","text":"","code":"api_state(key = get_telraam_token())"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/api_state.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check API State — api_state","text":"key api key (set set_telraam_token function)","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/api_state.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check API State — api_state","text":"TRUE API responds well, FALSE otherwise","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/car_speed_preprocessing.html","id":null,"dir":"Reference","previous_headings":"","what":"Preprocessing mandatory for car speed graphs functions — car_speed_preprocessing","title":"Preprocessing mandatory for car speed graphs functions — car_speed_preprocessing","text":"Preprocessing mandatory car speed graphs functions","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/car_speed_preprocessing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Preprocessing mandatory for car speed graphs functions — car_speed_preprocessing","text":"","code":"car_speed_preprocessing( enriched_data, date_range, segments, weekday, hours, aggregated_by )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/car_speed_preprocessing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Preprocessing mandatory for car speed graphs functions — car_speed_preprocessing","text":"enriched_data enriched data.frame containing data sensors date_range Date vector. example: c('2021-01-01','2022-01-01'). Full period NULL (default). segments Character vector. Selected road segment, NULL (default). weekday Character vector. Weekday choosen. Default week. hours Integer vector. Hours choosen, default day. aggregated_by Character. Enables comparison segments weekdays. Options : 'segment_name', 'weekday', NULL (comparison, default).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/car_speed_preprocessing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Preprocessing mandatory for car speed graphs functions — car_speed_preprocessing","text":"list parameters data preprocessed.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/check_options_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if options are available in the options list, replace by a default otherwise. — check_options_graph","title":"Check if options are available in the options list, replace by a default otherwise. — check_options_graph","text":"Check options available options list, replace default otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/check_options_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if options are available in the options list, replace by a default otherwise. — check_options_graph","text":"","code":"check_options_graph(options_selected, options_available, default)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/check_options_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if options are available in the options list, replace by a default otherwise. — check_options_graph","text":"options_selected List characters. Selected options. options_available List characters. Valid options. default List characters. Default options.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/check_options_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if options are available in the options list, replace by a default otherwise. — check_options_graph","text":"Options consistent possibilities","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/check_options_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check if options are available in the options list, replace by a default otherwise. — check_options_graph","text":"","code":"check_options_graph(c('car','pedestrian'), c('car','pedestrian','bike','heavy'),c('car','heavy')) #> [1] \"car\" \"pedestrian\" check_options_graph(c('coucou','salut'), c('car','pedestrian','bike','heavy'),c('car','heavy')) #> [1] \"car\" \"heavy\" check_options_graph(NULL, c('car','pedestrian','bike','heavy'),c('car','heavy')) #> [1] \"car\" \"heavy\""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/convert_string_to_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a character string into a numeric vector — convert_string_to_list","title":"Convert a character string into a numeric vector — convert_string_to_list","text":"Convert character string numeric vector","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/convert_string_to_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a character string into a numeric vector — convert_string_to_list","text":"","code":"convert_string_to_list(vector)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/convert_string_to_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a character string into a numeric vector — convert_string_to_list","text":"vector Something shape \"10,20,30\"","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/convert_string_to_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a character string into a numeric vector — convert_string_to_list","text":"Numeric vector. Something shape c(10,20,30)","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/convert_string_to_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a character string into a numeric vector — convert_string_to_list","text":"","code":"convert_string_to_list(\"10,20,30\") #> [[1]] #> [1] 10 20 30 #>"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/create_config.html","id":null,"dir":"Reference","previous_headings":"","what":"Create config file if needed. — create_config","title":"Create config file if needed. — create_config","text":"want specify IDs sensors, function create local configuration template file \\inst directory, edit specific information. default, function create file project directory temp directory. want permanent configuration, please use .","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/create_config.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create config file if needed. — create_config","text":"","code":"create_config( segments = list(`segment-01` = \"9000000000\", `segment-02` = \"9000000000\"), create_directory = FALSE, overwrite = FALSE )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/create_config.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create config file if needed. — create_config","text":"segments Named List segments (\"name1\" = \"9000000000\", ...). Default example version. create_directory Boolean: file need created project directory? Default FALSE. overwrite Boolean: file exist, overwriten? Default FALSE.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/create_config.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create config file if needed. — create_config","text":"Boolean: TRUE file created, FALSE overwise (config already exists example).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/create_config.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create config file if needed. — create_config","text":"use temporary options, please fill directly name number sensors \"segments\" argument.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/create_config.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create config file if needed. — create_config","text":"","code":"create_config(create_directory=FALSE) #> [1] TRUE list_of_segments = list(\"Burel\"= \"9000002156\", \"Vitre\" = \"9000001844\") create_config(segments = list_of_segments, create_directory = FALSE, overwrite = TRUE) # the file already exists #> [1] TRUE"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/custom_colors_palette.html","id":null,"dir":"Reference","previous_headings":"","what":"Colors palettes for each option — custom_colors_palette","title":"Colors palettes for each option — custom_colors_palette","text":"Colors palettes option","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/custom_colors_palette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Colors palettes for each option — custom_colors_palette","text":"","code":"custom_colors_palette(segments)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/custom_colors_palette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Colors palettes for each option — custom_colors_palette","text":"segments List characters. Segments name dataframe.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/custom_colors_palette.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Colors palettes for each option — custom_colors_palette","text":"list color palettes (named vector) option","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/decompose_2_fct.html","id":null,"dir":"Reference","previous_headings":"","what":"Decompose data from two sensors — decompose_2_fct","title":"Decompose data from two sensors — decompose_2_fct","text":"Decompose data two sensors","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/decompose_2_fct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decompose data from two sensors — decompose_2_fct","text":"","code":"decompose_2_fct( data, sensor1, sensor2, hour_x, direction1, direction2, mobility, norm, vacations = NULL, public_holidays = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/decompose_2_fct.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decompose data from two sensors — decompose_2_fct","text":"data Data frame containing data sensor1 segment ID sensor 1 sensor2 segment ID sensor 2 hour_x hour filter direction1 direction sensor 1 direction2 direction sensor 2 mobility character vector indicating mobility types include filter norm character indicating whether normalize results vacations vacations period filtering function public_holidays public holidays period filtering function","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/decompose_2_fct.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decompose data from two sensors — decompose_2_fct","text":"list containing decomposed data, seasonal data, peaks, correlation","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_dates.html","id":null,"dir":"Reference","previous_headings":"","what":"Enrich traffic data with date informations. — enrich_dates","title":"Enrich traffic data with date informations. — enrich_dates","text":"Enrich traffic data date informations.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_dates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enrich traffic data with date informations. — enrich_dates","text":"","code":"enrich_dates(data)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_dates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enrich traffic data with date informations. — enrich_dates","text":"data Data frame containing date character column containing date + hour + timezone.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_dates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enrich traffic data with date informations. — enrich_dates","text":"dataframe 3 additionnal columns : day, weekday hour.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_dates.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enrich traffic data with date informations. — enrich_dates","text":"","code":"df <- data.frame('date' = c(\"2022-02-18 08:00:00 CET\",\"2022-02-18 09:00:00 CET\"), stringsAsFactors = FALSE) enrich_dates(df) #> date day hour weekday #> 1 2022-02-18 08:00:00 CET 2022-02-18 8 friday #> 2 2022-02-18 09:00:00 CET 2022-02-18 9 friday"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Enrich traffic data with segment name — enrich_name","title":"Enrich traffic data with segment name — enrich_name","text":"segment_fullname also added : combination segment's id name. segment_id configuration file.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enrich traffic data with segment name — enrich_name","text":"","code":"enrich_name(data)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enrich traffic data with segment name — enrich_name","text":"data Data frame containing segment_id column","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enrich traffic data with segment name — enrich_name","text":"dataframe two additionnal columns : segment_name segment_fullname","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_name.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enrich traffic data with segment name — enrich_name","text":"","code":"df <- data.frame('segment_id' = c(9000002156, 9000001906)) enrich_name(df) #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> segment_fullname segment_id segment_name #> 1 9000002156 - NULL 9000002156 NULL #> 2 9000001906 - NULL 9000001906 NULL"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_special_days.html","id":null,"dir":"Reference","previous_headings":"","what":"Enrich traffic data with french vacation and public holidays — enrich_special_days","title":"Enrich traffic data with french vacation and public holidays — enrich_special_days","text":"Enrich traffic data french vacation public holidays","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_special_days.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enrich traffic data with french vacation and public holidays — enrich_special_days","text":"","code":"enrich_special_days(data, vacations = NULL, public_holidays = NULL)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_special_days.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enrich traffic data with french vacation and public holidays — enrich_special_days","text":"data Data frame containing day date(day + hour + timezone) column vacations Data frame containing vacation dates public_holidays Data frame containing public holidays dates","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_special_days.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enrich traffic data with french vacation and public holidays — enrich_special_days","text":"dataframe two additionnal columns : holiday, boolean: TRUE day corresponds public holiday, FALSE otherwise vacation, indicating french vacation, \"vacation\" otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_special_days.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enrich traffic data with french vacation and public holidays — enrich_special_days","text":"","code":"df <- data.frame('day' = as.Date(c(\"2022-02-18\",\"2022-01-01\")), 'date' = c('2022-02-18 12:00:00 CET','2022-01-01 12:00:00 CET')) enrich_special_days(df) #> day date holiday vacation #> 1 2022-02-18 2022-02-18 12:00:00 CET FALSE Vacances d'Hiver #> 2 2022-01-01 2022-01-01 12:00:00 CET TRUE Vacances de Noël"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_traffic.html","id":null,"dir":"Reference","previous_headings":"","what":"Enrich traffic data with date features, names and uptime filters. — enrich_traffic","title":"Enrich traffic data with date features, names and uptime filters. — enrich_traffic","text":"function add day, weekday, hour, segment_name full_name uptime quality boolean. function already used data retrievement process.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_traffic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enrich traffic data with date features, names and uptime filters. — enrich_traffic","text":"","code":"enrich_traffic(data)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_traffic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enrich traffic data with date features, names and uptime filters. — enrich_traffic","text":"data Raw data frame Telraam API, imported package.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_traffic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enrich traffic data with date features, names and uptime filters. — enrich_traffic","text":"dataframe additionnal informations : day, hour, weekday, holiday, vacation, segment_name, uptime_quality","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_traffic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enrich traffic data with date features, names and uptime filters. — enrich_traffic","text":"","code":"enriched_traffic <- enrich_traffic(traffic[0:10,]) #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. #> This ID is unknown. Please update configuration file. setdiff(colnames(enriched_traffic[0:10,]), colnames(traffic[0:10,])) #> character(0)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_uptime.html","id":null,"dir":"Reference","previous_headings":"","what":"Enrich traffic data with uptime quality indication — enrich_uptime","title":"Enrich traffic data with uptime quality indication — enrich_uptime","text":"uptime lower 0.5, uptime_quality FALSE, else TRUE","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_uptime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enrich traffic data with uptime quality indication — enrich_uptime","text":"","code":"enrich_uptime(data)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_uptime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enrich traffic data with uptime quality indication — enrich_uptime","text":"data Data frame containing uptime column","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_uptime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enrich traffic data with uptime quality indication — enrich_uptime","text":"dataframe additionnal column indicating uptime greater (TRUE) lower (FALSE) 0.5.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/enrich_uptime.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enrich traffic data with uptime quality indication — enrich_uptime","text":"","code":"df <- data.frame('uptime' = c(0.05, 0.95)) enrich_uptime(df) #> uptime uptime_quality #> 1 0.05 FALSE #> 2 0.95 TRUE"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_agg.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter by selected criteria and aggregating traffics. — filter_agg","title":"Filter by selected criteria and aggregating traffics. — filter_agg","text":"criteria need filled . Unfilled criteria set default filtering performed.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_agg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter by selected criteria and aggregating traffics. — filter_agg","text":"","code":"filter_agg( data, date_range = NULL, segments = NULL, direction = NULL, modes = NULL, weekdays = NULL, hours = NULL, uptime_quality = TRUE )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_agg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter by selected criteria and aggregating traffics. — filter_agg","text":"data Traffic Data Frame date_range Date vector, c(\"aaaa-mm-jj\",\"aaaa-mm-jj\") segments Vector character. Ids desired segments. direction Vector character. Direction street (lft, right, ). modes Vector character. Type(s) mobility: c(\"car\",\"heavy\",\"pedestrian\",\"bike\") weekdays Vector character. Weekday(s) choosen. hours Integer vector. Hours choosen, default day.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_agg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter by selected criteria and aggregating traffics. — filter_agg","text":"filtered data, molten mode direction, new columns : mode, mode, one row per different transportation mode + date/hour + direction direction, direction, one row per different transportation mode + date/hour + direction traffic_sum, traffic mode/direction specific date/hour","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_agg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Filter by selected criteria and aggregating traffics. — filter_agg","text":"","code":"date_range = as.Date(c('2022-01-01','2022-01-08')) filter_agg(traffic, date_range = date_range, segments = 'RteVitre-06', direction = 'lft', modes = 'pedestrian', weekdays = 'saturday', hours = 12:14, uptime_quality = TRUE ) #> $data #> date day hour weekday holiday vacation #> 1 2022-01-01 12:00:00 2022-01-01 12 saturday TRUE Vacances de Noël #> 2 2022-01-01 13:00:00 2022-01-01 13 saturday TRUE Vacances de Noël #> 3 2022-01-08 12:00:00 2022-01-08 12 saturday FALSE No vacation #> 4 2022-01-08 13:00:00 2022-01-08 13 saturday FALSE No vacation #> 5 2022-01-08 14:00:00 2022-01-08 14 saturday FALSE No vacation #> segment_name v85 #> 1 RteVitre-06 6.5 #> 2 RteVitre-06 40.0 #> 3 RteVitre-06 43.0 #> 4 RteVitre-06 44.5 #> 5 RteVitre-06 44.0 #> car_speed_hist_0to70plus #> 1 100, 0, 0, 0, 0, 0, 0, 0 #> 2 0.000000, 2.222222, 11.111111, 63.333333, 22.222222, 0.000000, 0.000000, 1.111111 #> 3 6.3333333, 3.6666667, 3.6666667, 41.3333333, 38.6666667, 6.0000000, 0.0000000, 0.3333333 #> 4 1.7667845, 3.1802120, 3.5335689, 41.6961131, 45.2296820, 4.2402827, 0.3533569, 0.0000000 #> 5 0.9740260, 0.3246753, 2.9220779, 48.7012987, 40.9090909, 5.8441558, 0.0000000, 0.3246753 #> car_speed_hist_0to120plus #> 1 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 2 0.000000, 0.000000, 0.000000, 2.222222, 3.333333, 7.777778, 22.222222, 41.111111, 16.666667, 5.555556, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.111111, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 #> 3 3.6666667, 2.6666667, 1.6666667, 2.0000000, 1.0000000, 2.6666667, 14.0000000, 27.3333333, 29.0000000, 9.6666667, 5.3333333, 0.6666667, 0.0000000, 0.0000000, 0.3333333, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 4 1.0600707, 0.7067138, 1.4134276, 1.7667845, 0.7067138, 2.8268551, 13.7809187, 27.9151943, 28.9752650, 16.2544170, 3.5335689, 0.7067138, 0.0000000, 0.3533569, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 5 0.9740260, 0.0000000, 0.3246753, 0.0000000, 0.9740260, 1.9480519, 14.2857143, 34.4155844, 28.8961039, 12.0129870, 4.8701299, 0.9740260, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.3246753, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> uptime uptime_quality mode direction traffic_sum #> 1 0.7875000 TRUE pedestrian lft 16.507937 #> 2 0.7277778 TRUE pedestrian lft 10.992366 #> 3 0.7808333 TRUE pedestrian lft 0.000000 #> 4 0.7922222 TRUE pedestrian lft 1.262272 #> 5 0.7922222 TRUE pedestrian lft 1.262272 #> #> $segment #> [1] \"RteVitre-06\" #> #> $mode #> [1] \"pedestrian\" #> #> $direction #> [1] \"lft\" #> #> $weekday #> [1] \"saturday\" #> #> $hour #> [1] 12 13 14 #>"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_date.html","id":null,"dir":"Reference","previous_headings":"","what":"Select data within a specified date range — filter_date","title":"Select data within a specified date range — filter_date","text":"Select data within specified date range","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_date.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select data within a specified date range — filter_date","text":"","code":"filter_date(data, date_range)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_date.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select data within a specified date range — filter_date","text":"data Data frame containing date column date_range vector two dates specifying range","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_date.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select data within a specified date range — filter_date","text":"Subset input data frame within specified date range","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_public_holidays.html","id":null,"dir":"Reference","previous_headings":"","what":"Select data based on public holiday criteria — filter_public_holidays","title":"Select data based on public holiday criteria — filter_public_holidays","text":"Select data based public holiday criteria","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_public_holidays.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select data based on public holiday criteria — filter_public_holidays","text":"","code":"filter_public_holidays(data, JF)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_public_holidays.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select data based on public holiday criteria — filter_public_holidays","text":"data Data frame containing date column JF character indicating public holiday selection criteria","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_public_holidays.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select data based on public holiday criteria — filter_public_holidays","text":"Subset input data frame based public holiday criteria","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_vacation.html","id":null,"dir":"Reference","previous_headings":"","what":"Select data based on vacation criteria — filter_vacation","title":"Select data based on vacation criteria — filter_vacation","text":"Select data based vacation criteria","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_vacation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select data based on vacation criteria — filter_vacation","text":"","code":"filter_vacation(data, vacation)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_vacation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select data based on vacation criteria — filter_vacation","text":"data Data frame containing date column vacation character indicating vacation selection criteria","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filter_vacation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select data based on vacation criteria — filter_vacation","text":"Subset input data frame based vacation criteria","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter by selected criteria. — filtering","title":"Filter by selected criteria. — filtering","text":"criteria need filled . Unfilled criteria set default filtering performed.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter by selected criteria. — filtering","text":"","code":"filtering( data = NULL, sensor = NULL, direction = \" \", mobility = c(\"car\", \"heavy\", \"pedestrian\", \"bike\"), date_range = NULL, vac = NULL, p_h = NULL, wkd = NULL, vacations = NULL, public_holidays = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter by selected criteria. — filtering","text":"data dat.frame. See \"importation\" function '2-import.R' file sensor character. Id desired sensor quotations direction character. Direction street: \" \" \"_lft\" \"_rgt\" mobility character. Type mobility: c(\"car\",\"heavy\",\"pedestrian\",\"bike\") date_range Date vector, c(\"aaaa-mm-jj\",\"aaaa-mm-jj\") vac character. , without, vacation: \"YES\" \"\" \"\" p_h character. , without, public holiday: \"YES\" \"\" \"\" wkd character vector. Selected days week: c(\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\") starting one Monday. Make sure use options(lubridate.week.start = 1) function perform correctly. vacations data.frame, containing 3 columns : desctiption, start_date end_date description column contains character vectors name every vacations studying starting_date ending_date Date-Time vectors(POSIXct) format \"year-month-day hour:minute:second\", obtainable example using ymd_hms lubridate package public_holidays date vector, containing public holidays dates \"Year-month-day\" format.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter by selected criteria. — filtering","text":"filtered data","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering_agg.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter by selected criteria and aggregating traffics. — filtering_agg","title":"Filter by selected criteria and aggregating traffics. — filtering_agg","text":"criteria need filled . Unfilled criteria set default filtering performed.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering_agg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter by selected criteria and aggregating traffics. — filtering_agg","text":"","code":"filtering_agg( data, date_range = NULL, segments = NULL, direction = NULL, modes = NULL, weekdays = NULL, hours = NULL, uptime_quality = TRUE )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering_agg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter by selected criteria and aggregating traffics. — filtering_agg","text":"data Traffic Data Frame date_range Date vector, c(\"aaaa-mm-jj\",\"aaaa-mm-jj\") direction Vector character. Direction street (lft, right, ). modes Vector character. Type(s) mobility: c(\"car\",\"heavy\",\"pedestrian\",\"bike\") hours Integer vector. Hours choosen, default day. segment Vector character. Ids desired segments. weekday Vector character. Weekday(s) choosen.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/filtering_agg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter by selected criteria and aggregating traffics. — filtering_agg","text":"filtered data new column \"traffic\" aggregated data specified direction/modes","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_api_state.html","id":null,"dir":"Reference","previous_headings":"","what":"Check API state — get_api_state","title":"Check API state — get_api_state","text":"Return state 'Telraam' API. Determine updates can made.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_api_state.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check API state — get_api_state","text":"","code":"get_api_state(key = get_telraam_token())"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_api_state.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check API state — get_api_state","text":"key API key (set set_telraam_token function - default -, directly filled).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_api_state.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check API state — get_api_state","text":"Boolean: TRUE API responds well, FALSE otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_api_state.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check API state — get_api_state","text":"","code":"my_token <- 'ThisIsNotAValidToken' get_api_state(my_token) #> [1] FALSE"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_config_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the path of configuration file. — get_config_path","title":"Get the path of configuration file. — get_config_path","text":"configuration file inst directory, temporary directory, according create_directory option create_config() function. configuration file exist, function create file temporary directory send message user.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_config_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the path of configuration file. — get_config_path","text":"","code":"get_config_path()"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_config_path.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the path of configuration file. — get_config_path","text":"Character: path configuration file, needed lot functions.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_config_path.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the path of configuration file. — get_config_path","text":"","code":"create_config(create_directory=FALSE) #> Warning: A configuration file already exists in the directory #> [1] FALSE get_config_path() #> [1] \"inst/config.yml\""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_custom_palette.html","id":null,"dir":"Reference","previous_headings":"","what":"Colors palettes for each option (mode, direction, segment_name, weekday, hour) — get_custom_palette","title":"Colors palettes for each option (mode, direction, segment_name, weekday, hour) — get_custom_palette","text":"Colors palettes option (mode, direction, segment_name, weekday, hour)","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_custom_palette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Colors palettes for each option (mode, direction, segment_name, weekday, hour) — get_custom_palette","text":"","code":"get_custom_palette(segments)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_custom_palette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Colors palettes for each option (mode, direction, segment_name, weekday, hour) — get_custom_palette","text":"segments Character vectors. Segments name dataframe.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_custom_palette.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Colors palettes for each option (mode, direction, segment_name, weekday, hour) — get_custom_palette","text":"list color palettes (named vector) option (mode, direction, segment_name, weekday, hour)","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_custom_palette.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Colors palettes for each option (mode, direction, segment_name, weekday, hour) — get_custom_palette","text":"","code":"segments <- c('Route1', 'Route2') get_custom_palette(segments) #> $mode #> car pedestrian bike heavy #> \"#F95335\" \"#FCAF38\" \"#50A3A4\" \"#674A40\" #> #> $direction #> both lft rgt #> \"#6d676e\" \"#ff595e\" \"#8ac926\" #> #> $segment_name #> #> #7E1900FF #1A3399FF #> #> $weekday #> #> #009392FF #39B185FF #9CCB86FF #E9E29CFF #EEB479FF #E88471FF #CF597EFF #> #> $hour #> 1 2 3 4 5 6 #> \"#FEFBE9FF\" \"#FCF7D5FF\" \"#F5F3C1FF\" \"#EAF0B5FF\" \"#DDECBFFF\" \"#D0E7CAFF\" #> 7 8 9 10 11 12 #> \"#C2E3D2FF\" \"#B5DDD8FF\" \"#A8D8DCFF\" \"#9BD2E1FF\" \"#8DCBE4FF\" \"#81C4E7FF\" #> 13 14 15 16 17 18 #> \"#7BBCE7FF\" \"#7EB2E4FF\" \"#88A5DDFF\" \"#9398D2FF\" \"#9B8AC4FF\" \"#9D7DB2FF\" #> 19 20 21 22 23 #> \"#9A709EFF\" \"#906388FF\" \"#805770FF\" \"#684957FF\" \"#46353AFF\" \"grey\" #>"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_graph_subtitles.html","id":null,"dir":"Reference","previous_headings":"","what":"Create subtitles for graphics. — get_graph_subtitles","title":"Create subtitles for graphics. — get_graph_subtitles","text":"Create subtitles graphics.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_graph_subtitles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create subtitles for graphics. — get_graph_subtitles","text":"","code":"get_graph_subtitles( segments = NULL, modes = NULL, directions = NULL, weekdays = NULL, hours = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_graph_subtitles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create subtitles for graphics. — get_graph_subtitles","text":"segments Character vector. Selected road segment text, precision NULL (default). modes Character vector. Different modes transportation selected (heavy, car, bike, pedestrian). Default: NULL directions Character vector. Directions traffic (lft, rgt, ) choosen. Default NULL. weekdays Character vector. Weekdays choosen. Default NULL. hours Numeric vector. Hours choosen. Default NULL.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_graph_subtitles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create subtitles for graphics. — get_graph_subtitles","text":"Character, description parameters filled, usable subtitle graphs.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_graph_subtitles.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create subtitles for graphics. — get_graph_subtitles","text":"","code":"get_graph_subtitles(segments = c(\"Route1\"), mode = \"car\", direction = \"lft\", weekdays = \"monday\", hours = 12:14) #> [1] \"Modes: car\\nDirections: lft\\nWeekdays: monday\\nSegments: Route1\\nHours: 12, 13, 14\""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segment_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the name of a segment giving its id — get_segment_name","title":"Get the name of a segment giving its id — get_segment_name","text":"Get name segment giving id","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segment_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the name of a segment giving its id — get_segment_name","text":"","code":"get_segment_name(segment_id)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segment_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the name of a segment giving its id — get_segment_name","text":"segment_id ID segment, present inst/config.yml","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segment_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the name of a segment giving its id — get_segment_name","text":"Name segment, specified configuration file, NULL otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segment_name.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the name of a segment giving its id — get_segment_name","text":"","code":"if (FALSE) #run if you want to create a inst/ directory containing config file create_config() get_segment_name(9000000000) #> This ID is unknown. Please update configuration file. #> NULL"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segments.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Telraam segments into a named vector — get_segments","title":"Get Telraam segments into a named vector — get_segments","text":"Get Telraam segments info yml file transform named vector","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Telraam segments into a named vector — get_segments","text":"","code":"get_segments()"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Telraam segments into a named vector — get_segments","text":"Named vector names segment IDs, NULL configuration file","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_segments.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Telraam segments into a named vector — get_segments","text":"","code":"create_config(create_directory = FALSE) #> Warning: A configuration file already exists in the directory #> [1] FALSE get_segments() #> $`segment-01` #> [1] \"9000000000\" #> #> $`segment-02` #> [1] \"9000000000\" #>"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_telraam_token.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the current authentication token for the 'Telraam' API — get_telraam_token","title":"Get the current authentication token for the 'Telraam' API — get_telraam_token","text":"Get current authentication token 'Telraam' API","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_telraam_token.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the current authentication token for the 'Telraam' API — get_telraam_token","text":"","code":"get_telraam_token()"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_telraam_token.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the current authentication token for the 'Telraam' API — get_telraam_token","text":"Token currently used, set set_telraam_token()","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/get_telraam_token.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the current authentication token for the 'Telraam' API — get_telraam_token","text":"","code":"my_token <- \"MyTelraamToken\" set_telraam_token(my_token) get_telraam_token() #> [1] \"MyTelraamToken\""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_availability.html","id":null,"dir":"Reference","previous_headings":"","what":"Availability and quality of sensors during a period through a heatmap. — gg_availability","title":"Availability and quality of sensors during a period through a heatmap. — gg_availability","text":"Higher uptime average, higher quality data. null uptime means sensor available period.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_availability.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Availability and quality of sensors during a period through a heatmap. — gg_availability","text":"","code":"gg_availability(enriched_data, date_range = NULL)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_availability.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Availability and quality of sensors during a period through a heatmap. — gg_availability","text":"enriched_data enriched data.frame containing data sensors date_range Date vector. Example: c('2021-01-01','2022-01-01'). Full period NULL.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_availability.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Availability and quality of sensors during a period through a heatmap. — gg_availability","text":"Graph showing availability quality sensors selected date range.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_availability.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Availability and quality of sensors during a period through a heatmap. — gg_availability","text":"","code":"gg_availability(traffic)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_histogram.html","id":null,"dir":"Reference","previous_headings":"","what":"Histogram of car speed over a period, for a segment or a subset of segment. — gg_car_speed_histogram","title":"Histogram of car speed over a period, for a segment or a subset of segment. — gg_car_speed_histogram","text":"Histogram car speed period, segment subset segment.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_histogram.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Histogram of car speed over a period, for a segment or a subset of segment. — gg_car_speed_histogram","text":"","code":"gg_car_speed_histogram( enriched_data, date_range = NULL, segments = NULL, weekday = NULL, hours = NULL, aggregated_by = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_histogram.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Histogram of car speed over a period, for a segment or a subset of segment. — gg_car_speed_histogram","text":"enriched_data enriched data.frame containing data sensors date_range Date vector. Example: c('2021-01-01','2022-01-01'). Full period NULL (default). segments Character vector. Selected road segment, NULL (default). weekday Character vector. Weekday choosen. Default week. hours Integer vector. Hours choosen, default day. aggregated_by Character. Enables comparison segments weekdays. Options : 'segment_name', 'weekday', NULL (comparison, default).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_histogram.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Histogram of car speed over a period, for a segment or a subset of segment. — gg_car_speed_histogram","text":"Graph showing histogram car speed period.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_histogram.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Histogram of car speed over a period, for a segment or a subset of segment. — gg_car_speed_histogram","text":"","code":"library(dplyr) #> #> Attaching package: ‘dplyr’ #> The following objects are masked from ‘package:stats’: #> #> filter, lag #> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union subset_traffic <- traffic %>% filter(day < '2022-02-01', hour > 9) gg_car_speed_histogram(subset_traffic) gg_car_speed_histogram(subset_traffic, aggregated_by = 'segment_name') gg_car_speed_histogram(subset_traffic, weekday = c('monday','sunday'), segments = 'RteVitre-06', hours = 17:20, aggregated_by = \"weekday\")"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_v85.html","id":null,"dir":"Reference","previous_headings":"","what":"Average of v85 car speed per hour over a period, for a segment or a subset of segment. — gg_car_speed_v85","title":"Average of v85 car speed per hour over a period, for a segment or a subset of segment. — gg_car_speed_v85","text":"v85 estimated car speed limit km/h 85% cars respect. 15% drivers drive faster v85 indicator.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_v85.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average of v85 car speed per hour over a period, for a segment or a subset of segment. — gg_car_speed_v85","text":"","code":"gg_car_speed_v85( enriched_data, date_range = NULL, segments = NULL, weekday = NULL, hours = NULL, aggregated_by = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_v85.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average of v85 car speed per hour over a period, for a segment or a subset of segment. — gg_car_speed_v85","text":"enriched_data enriched data.frame containing data sensors date_range Date vector. Example: c('2021-01-01','2022-01-01'). Full period NULL (default). segments Character vector. Selected road segment, NULL (default). weekday Character vector. Weekday choosen. Default week. hours Integer vector. Hours choosen, default day. aggregated_by Character. Enables comparison segments weekdays. Options : 'segment_name', 'weekday', NULL (comparison, default).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_v85.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average of v85 car speed per hour over a period, for a segment or a subset of segment. — gg_car_speed_v85","text":"Graph showing average v85 speed per hour.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_car_speed_v85.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Average of v85 car speed per hour over a period, for a segment or a subset of segment. — gg_car_speed_v85","text":"","code":"library(dplyr) subset_traffic <- traffic %>% filter(day < '2022-02-01', hour > 9) gg_car_speed_histogram(subset_traffic[0:100,]) gg_car_speed_histogram(subset_traffic, aggregated_by = 'segment_name') gg_car_speed_histogram(subset_traffic, weekday = c('monday','sunday'), segments = 'RteVitre-06', hours = 17:20, aggregated_by = \"weekday\")"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_dist.html","id":null,"dir":"Reference","previous_headings":"","what":"gg_na_dist\nThe function gives a graphical representation of NA's distribution (monthly) during a selected period for one sensor. — gg_na_dist","title":"gg_na_dist\nThe function gives a graphical representation of NA's distribution (monthly) during a selected period for one sensor. — gg_na_dist","text":"gg_na_dist function gives graphical representation NA's distribution (monthly) selected period one sensor.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_dist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"gg_na_dist\nThe function gives a graphical representation of NA's distribution (monthly) during a selected period for one sensor. — gg_na_dist","text":"","code":"gg_na_dist( data, sensor, start = NULL, end = NULL, hours = \"ALL\", list_weekday = \"ALL\", pub_holidays = \"YES\", holidays = \"YES\" )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_dist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"gg_na_dist\nThe function gives a graphical representation of NA's distribution (monthly) during a selected period for one sensor. — gg_na_dist","text":"data Data.Frame. data frame containing road traffic data. sensor Numeric. sensor ID want see representation. start Character. start period format \"yyyy-mm-dd\". end Character. end period format \"yyyy-mm-dd\". hours Vector. vector containing hours want see representation, e.g., c(\"05h\", \"18h\"). list_weekday Vector. vector containing weekdays French, e.g., c(\"Monday\", \"Sunday\"). pub_holidays Character. \"YES\" want see results public holidays included; \"\" want exclude representation; \"\" want see result. holidays Character. \"YES\" want see results including holidays; \"\" want exclude representation; \"\" want see result.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_dist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"gg_na_dist\nThe function gives a graphical representation of NA's distribution (monthly) during a selected period for one sensor. — gg_na_dist","text":"ggplot graph.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_heatmap.html","id":null,"dir":"Reference","previous_headings":"","what":"gg_na_heatmap\nThis function generates a heatmap representation of the proportion of missing values (NA) for different sensors over monthly periods during a selected time frame. — gg_na_heatmap","title":"gg_na_heatmap\nThis function generates a heatmap representation of the proportion of missing values (NA) for different sensors over monthly periods during a selected time frame. — gg_na_heatmap","text":"gg_na_heatmap function generates heatmap representation proportion missing values (NA) different sensors monthly periods selected time frame.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_heatmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"gg_na_heatmap\nThis function generates a heatmap representation of the proportion of missing values (NA) for different sensors over monthly periods during a selected time frame. — gg_na_heatmap","text":"","code":"gg_na_heatmap( data, start = NULL, end = NULL, hours = \"ALL\", list_weekday = \"ALL\", pub_holidays = \"YES\", holidays = \"YES\" )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_heatmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"gg_na_heatmap\nThis function generates a heatmap representation of the proportion of missing values (NA) for different sensors over monthly periods during a selected time frame. — gg_na_heatmap","text":"data Data frame. data frame containing road traffic data. start Character. start date format \"yyyy-mm-dd\". end Character. end date format \"yyyy-mm-dd\". hours Vector. vector containing hours want see representation, e.g., c(\"05h\", \"18h\"). list_weekday Vector. vector containing weekdays French, e.g., c(\"Monday\", \"Sunday\"). pub_holidays Character. \"YES\" want see results public holidays included; \"\" want exclude representation; \"\" want see result. holidays Character. \"YES\" want see results including holidays; \"\" want exclude representation; \"\" want see result.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_na_heatmap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"gg_na_heatmap\nThis function generates a heatmap representation of the proportion of missing values (NA) for different sensors over monthly periods during a selected time frame. — gg_na_heatmap","text":"ggplot graph representing heatmap NA proportions different sensors monthly periods.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_avg.html","id":null,"dir":"Reference","previous_headings":"","what":"Average of traffic during a week. — gg_traffic_avg","title":"Average of traffic during a week. — gg_traffic_avg","text":"short description... Average traffic week, period segment subset segment, transportation mode , direction .","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_avg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average of traffic during a week. — gg_traffic_avg","text":"","code":"gg_traffic_avg( enriched_data, date_range = NULL, segments = NULL, modes = c(\"heavy\", \"car\"), direction = \"both\", weekday = NULL, aggregated_by = \"weekday\" )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_avg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average of traffic during a week. — gg_traffic_avg","text":"enriched_data enriched data.frame containing data sensors date_range Date vector. example: c('2021-01-01','2022-01-01'). Full period NULL (default). segments Character vector. Selected road segment, NULL (default). modes Character vector. Different modes transportation aggregated (heavy, car, bike, pedestrian) . Default: heavy & car direction Character. Direction traffic (lft, rgt, ). Default . weekday Character vector. Weekday choosen. Default week. aggregated_by Character. Options : 'segment_name', 'weekday', 'direction', 'mode'. Default: 'weekday'.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_avg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average of traffic during a week. — gg_traffic_avg","text":"Graph showing weekly average evolution traffic (specified parameters) specified period.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_avg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Average of traffic during a week. — gg_traffic_avg","text":"","code":"gg_traffic_avg(traffic) gg_traffic_avg(traffic, date_range = c('2022-07-01','2022-09-01'), segment = 'RteVitre-06', mode = 'car', direction = 'rgt', weekday = c('monday','friday') )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_evolution.html","id":null,"dir":"Reference","previous_headings":"","what":"Evolution of traffic and smoothed traffic. — gg_traffic_evolution","title":"Evolution of traffic and smoothed traffic. — gg_traffic_evolution","text":"Evolution traffic (global, per mode ou per direction), smoothed traffic period.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_evolution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evolution of traffic and smoothed traffic. — gg_traffic_evolution","text":"","code":"gg_traffic_evolution( enriched_data, date_range = NULL, segments = NULL, modes = c(\"heavy\", \"car\"), direction = \"both\", smoothed = TRUE, agg_day = TRUE )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_evolution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evolution of traffic and smoothed traffic. — gg_traffic_evolution","text":"enriched_data enriched data.frame containing data sensors date_range Date vector. Example: c('2021-01-01','2022-01-01'). Full period NULL (default). segments Character vector. Selected road segment name, NULL (default). modes Character vector. Different modes transportation aggregated (heavy, car, bike, pedestrian) . Default: heavy & car direction Character. Direction traffic (lft, rgt, ). Default . smoothed Boolean. smoothed traffic plotted ? Default: True agg_day Boolean. data aggregated per day ? Default : True","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_evolution.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evolution of traffic and smoothed traffic. — gg_traffic_evolution","text":"Graph showing evolution traffic (specified parameters) specified period.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_traffic_evolution.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Evolution of traffic and smoothed traffic. — gg_traffic_evolution","text":"","code":"gg_traffic_evolution(traffic) gg_traffic_evolution(traffic, date_range = c('2022-01-01','2022-03-01'), segment = 'RteVitre-06', mode = c('car','pedestrian'), direction = 'lft', smoothed = FALSE, agg_day = FALSE)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_working_sensor.html","id":null,"dir":"Reference","previous_headings":"","what":"gg_working_sensor\nthe function gives a graphical representation of the sensors operation during a selected period,\nthe representation can be grouped or individual — gg_working_sensor","title":"gg_working_sensor\nthe function gives a graphical representation of the sensors operation during a selected period,\nthe representation can be grouped or individual — gg_working_sensor","text":"gg_working_sensor function gives graphical representation sensors operation selected period, representation can grouped individual","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_working_sensor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"gg_working_sensor\nthe function gives a graphical representation of the sensors operation during a selected period,\nthe representation can be grouped or individual — gg_working_sensor","text":"","code":"gg_working_sensor( list_sensor = \"ALL\", data, start, end, hours = \"ALL\", aggregate = TRUE, list_weekday = \"ALL\", pub_holyday = \"YES\", holydays = \"YES\" )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_working_sensor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"gg_working_sensor\nthe function gives a graphical representation of the sensors operation during a selected period,\nthe representation can be grouped or individual — gg_working_sensor","text":"list_sensor vector containing sensor IDs, ex : c(\"9000001906\", \"9000003090) data data frame containing road traffic data start start period format \"yyyy-mm-dd\" end start period format \"yyyy-mm-dd\" hours vector containing hours want see representation, ex : c(\"05h\", \"18h\") aggregate aggregate = TRUE, see information sensors together. aggregate = FALSe, information show sensor sensor list_weekday vector containing weekdays french, ex : c(\"lundi\", \"jeudi\") pub_holyday \"YES\" : want see results public holydays inclue; \"\" want exclude representation; \"\" want see result holydays \"YES\" : want see results including holydays; \"\" want exclude representation; \"\" want see result","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/gg_working_sensor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"gg_working_sensor\nthe function gives a graphical representation of the sensors operation during a selected period,\nthe representation can be grouped or individual — gg_working_sensor","text":"ggplot graph","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/graph_subtitles.html","id":null,"dir":"Reference","previous_headings":"","what":"Create subtitles for graphics. — graph_subtitles","title":"Create subtitles for graphics. — graph_subtitles","text":"Create subtitles graphics.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/graph_subtitles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create subtitles for graphics. — graph_subtitles","text":"","code":"graph_subtitles( segments = NULL, modes = NULL, directions = NULL, weekdays = NULL, hours = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/graph_subtitles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create subtitles for graphics. — graph_subtitles","text":"segments Character vector. Selected road segment, NULL (default). modes Character vector. Different modes transportation aggregated (heavy, car, bike, pedestrian) . Default: heavy & car directions Character vector. Direction traffic (lft, rgt, ). Default . weekdays Character vector. Weekday choosen. Default week.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/graph_subtitles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create subtitles for graphics. — graph_subtitles","text":"DataFrame one row per hour/segment/transportation mode/direction","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/imp_na.html","id":null,"dir":"Reference","previous_headings":"","what":"Impute Missing Data using Linear Interpolation — imp_na","title":"Impute Missing Data using Linear Interpolation — imp_na","text":"function uses linear interpolation method fill missing data road traffic data. interpolation done day 4 hours data row missing, days (grouped day week) 4 consecutive weeks missing.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/imp_na.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Impute Missing Data using Linear Interpolation — imp_na","text":"","code":"imp_na(data, period = \"open days\")"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/imp_na.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Impute Missing Data using Linear Interpolation — imp_na","text":"data Data frame. data frame containing road traffic data. period Character. period impute data : \"open days\" open days, \"public holidays\" public holidays, \"holidays\" holidays.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/imp_na.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Impute Missing Data using Linear Interpolation — imp_na","text":"data frame imputed data new column named \"imputation\" indicating whether data point original (0), imputed (1), NA (2).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor.html","id":null,"dir":"Reference","previous_headings":"","what":"Imports data associated with a list of sensors — import_sensor","title":"Imports data associated with a list of sensors — import_sensor","text":"Imports data associated given list sensor names .RData files contained data directory. main purpose function load data saved write update data.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imports data associated with a list of sensors — import_sensor","text":"","code":"import_sensor(list_sensor)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imports data associated with a list of sensors — import_sensor","text":"list_sensor character vector specifying names sensors import data .","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imports data associated with a list of sensors — import_sensor","text":"dataframe containing imported data.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imports data associated with a list of sensors — import_sensor","text":"","code":"if (FALSE) # This example requires a valid API key period <- as.Date(c('2022-01-01', '2022-12-31')) write_update_data('RteVitre-06', period[1], period[2]) #> Error in eval(expr, envir, enclos): object 'period' not found write_update_data('ParisArcEnCiel-05', period[1], period[2]) #> Error in eval(expr, envir, enclos): object 'period' not found import_sensor(c('RteVitre-06', 'ParisArcEnCiel-05')) #> # A tibble: 0 × 2 #> # ℹ 2 variables: car_speed_hist_0to70plus , #> # car_speed_hist_0to120plus "},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor_comp.html","id":null,"dir":"Reference","previous_headings":"","what":"Import Sensor Data and Combine — import_sensor_comp","title":"Import Sensor Data and Combine — import_sensor_comp","text":"function imports sensor data CSV files given sensor IDs combines . function also processes data converting certain columns lists.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor_comp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import Sensor Data and Combine — import_sensor_comp","text":"","code":"import_sensor_comp(sensor_ids, sensor_comp_names)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor_comp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import Sensor Data and Combine — import_sensor_comp","text":"sensor_ids character vector containing sensor IDs import. sensor_comp_names character vector containing names CSV files import.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/import_sensor_comp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import Sensor Data and Combine — import_sensor_comp","text":"data frame containing imported combined sensor data.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/is_vacation.html","id":null,"dir":"Reference","previous_headings":"","what":"Indicates if a date is in vacation period and if true, which vacation. — is_vacation","title":"Indicates if a date is in vacation period and if true, which vacation. — is_vacation","text":"date vacation period, \"vacation\" returned.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/is_vacation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indicates if a date is in vacation period and if true, which vacation. — is_vacation","text":"","code":"is_vacation(date, vacation)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/is_vacation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indicates if a date is in vacation period and if true, which vacation. — is_vacation","text":"date Date (character format) vacation Dataframe vacations, format set_globals_vars output.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/is_vacation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indicates if a date is in vacation period and if true, which vacation. — is_vacation","text":"Vacation description day two dates, \"vacation\" otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/is_vacation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indicates if a date is in vacation period and if true, which vacation. — is_vacation","text":"","code":"vacation <- data.frame('description' = c('Vacances de Noël'), start_date = as.POSIXct('2021-12-17 23:00:00'), end_date = as.POSIXct('2022-01-02 23:00:00')) is_vacation(as.Date('2022-01-01'), vacation) #> [1] \"Vacances de Noël\""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/melt_direction_mode.html","id":null,"dir":"Reference","previous_headings":"","what":"Melt dataframe to obtain one row per hour/segment/transportation mode/direction\nThis format makes graphs with ggplot and filtering easier. — melt_direction_mode","title":"Melt dataframe to obtain one row per hour/segment/transportation mode/direction\nThis format makes graphs with ggplot and filtering easier. — melt_direction_mode","text":"Melt dataframe obtain one row per hour/segment/transportation mode/direction format makes graphs ggplot filtering easier.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/melt_direction_mode.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Melt dataframe to obtain one row per hour/segment/transportation mode/direction\nThis format makes graphs with ggplot and filtering easier. — melt_direction_mode","text":"","code":"melt_direction_mode(data)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/melt_direction_mode.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Melt dataframe to obtain one row per hour/segment/transportation mode/direction\nThis format makes graphs with ggplot and filtering easier. — melt_direction_mode","text":"data Traffic Data Frame","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/melt_direction_mode.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Melt dataframe to obtain one row per hour/segment/transportation mode/direction\nThis format makes graphs with ggplot and filtering easier. — melt_direction_mode","text":"DataFrame one row per hour/segment/transportation mode/direction","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/melt_direction_mode.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Melt dataframe to obtain one row per hour/segment/transportation mode/direction\nThis format makes graphs with ggplot and filtering easier. — melt_direction_mode","text":"","code":"melt_direction_mode(traffic[0:2,]) #> date day hour weekday holiday vacation #> 1 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 2 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 3 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 4 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 5 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 6 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 7 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 8 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 9 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 10 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 11 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 12 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 13 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 14 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 15 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 16 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 17 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 18 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 19 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 20 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 21 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 22 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> 23 2022-01-01 01:00:00 CET 2022-01-01 1 saturday TRUE Vacances de Noël #> 24 2022-01-01 02:00:00 CET 2022-01-01 2 saturday TRUE Vacances de Noël #> segment_name v85 car_speed_hist_0to70plus #> 1 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 2 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 3 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 4 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 5 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 6 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 7 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 8 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 9 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 10 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 11 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 12 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 13 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 14 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 15 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 16 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 17 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 18 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 19 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 20 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 21 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 22 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 23 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> 24 RteVitre-06 NA 0, 0, 0, 0, 0, 0, 0, 0 #> car_speed_hist_0to120plus #> 1 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 4 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 5 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 6 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 7 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 10 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 11 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 12 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 13 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 14 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 15 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 16 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 17 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 18 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 19 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 20 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 21 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 22 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 23 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> 24 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #> uptime uptime_quality mode direction traffic_sum #> 1 0 FALSE pedestrian both 0 #> 2 0 FALSE pedestrian both 0 #> 3 0 FALSE bike both 0 #> 4 0 FALSE bike both 0 #> 5 0 FALSE heavy both 0 #> 6 0 FALSE heavy both 0 #> 7 0 FALSE car both 0 #> 8 0 FALSE car both 0 #> 9 0 FALSE pedestrian lft 0 #> 10 0 FALSE pedestrian lft 0 #> 11 0 FALSE bike lft 0 #> 12 0 FALSE bike lft 0 #> 13 0 FALSE heavy lft 0 #> 14 0 FALSE heavy lft 0 #> 15 0 FALSE car lft 0 #> 16 0 FALSE car lft 0 #> 17 0 FALSE pedestrian rgt 0 #> 18 0 FALSE pedestrian rgt 0 #> 19 0 FALSE bike rgt 0 #> 20 0 FALSE bike rgt 0 #> 21 0 FALSE heavy rgt 0 #> 22 0 FALSE heavy rgt 0 #> 23 0 FALSE car rgt 0 #> 24 0 FALSE car rgt 0"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/na_prop.html","id":null,"dir":"Reference","previous_headings":"","what":"Visualisation NA stats — na_prop","title":"Visualisation NA stats — na_prop","text":"function calculates returns proportion missing values (NA) imputed values given sensor within specified date range.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/na_prop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Visualisation NA stats — na_prop","text":"","code":"na_prop(data, start, end, sensor)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/na_prop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Visualisation NA stats — na_prop","text":"data Data frame. Containing road traffic data. start Character. start date format \"yyyy-mm-dd\". end Character. end date format \"yyyy-mm-dd\". sensor Character. sensor ID want work.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/na_prop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Visualisation NA stats — na_prop","text":"character vector containing two phrases: proportion missing values data treatment. proportion missing values replaced imputed data remaining proportion missing values.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_comparaison.html","id":null,"dir":"Reference","previous_headings":"","what":"Comparison time period — plot_comparaison","title":"Comparison time period — plot_comparaison","text":"Comparative visualization number users hour day data two different time periods.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_comparaison.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Comparison time period — plot_comparaison","text":"","code":"plot_comparaison(param_ref, param_1, color_graph)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_comparaison.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Comparison time period — plot_comparaison","text":"param_ref List data parameters want filter compare, filtering : list(data=,sensor=,direction=,mobility=,date_range=,vac=,wkd=,p_h=) : - data: dataframe containing data sensor: character, id sensor want study quotes direction: character, \" \" , \"_rgt\" right (B ), \"_lft\" left (B) mobility: character vector, c(\"car\", \"heavy\", \"pedestrian\", \"bike\") types can choose date_range: date vector, c(\"starting_date\", \"ending_date\") vac: character, \"YES\" keep, \"\" filter , \"\" take vacation database wkd: character vector, c(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"), \"1\" stands Monday \"7\" Sunday. Use options(lubridate.week.start = 1) function perform correctly. p_h: character, \"YES\" keep, \"\" filter , \"\" take public holidays database param_1 List, param_ref color_graph Color palette plot","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_comparaison.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Comparison time period — plot_comparaison","text":"ggplot object representing comparison plot","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_deseas.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot decomposed data — plot_deseas","title":"Plot decomposed data — plot_deseas","text":"Plot decomposed data","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_deseas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot decomposed data — plot_deseas","text":"","code":"plot_deseas( data, sensor1, sensor2, hour_x, direction1, direction2, mobility, norm, vacations = NULL, public_holidays = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_deseas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot decomposed data — plot_deseas","text":"data Data frame containing data sensor1 segment ID sensor 1 sensor2 segment ID sensor 2 hour_x hour filter direction1 direction sensor 1 direction2 direction sensor 2 mobility character vector indicating mobility types include filter norm character indicating whether normalize results vacations vacations period filtering function public_holidays public holidays period filtering function","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_deseas.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot decomposed data — plot_deseas","text":"list plots including trend, seasonal, random, peaks, correlation","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_hour_threshold.html","id":null,"dir":"Reference","previous_headings":"","what":"Plots the number of vehicles in each direction for a selected sensor, aswell as the average speed and traffic volume\nby hour of the day. — plot_hour_threshold","title":"Plots the number of vehicles in each direction for a selected sensor, aswell as the average speed and traffic volume\nby hour of the day. — plot_hour_threshold","text":"Plots number vehicles direction selected sensor, aswell average speed traffic volume hour day.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_hour_threshold.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plots the number of vehicles in each direction for a selected sensor, aswell as the average speed and traffic volume\nby hour of the day. — plot_hour_threshold","text":"","code":"plot_hour_threshold(...)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_hour_threshold.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plots the number of vehicles in each direction for a selected sensor, aswell as the average speed and traffic volume\nby hour of the day. — plot_hour_threshold","text":"... data parameters filter , see filtering","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_hour_threshold.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plots the number of vehicles in each direction for a selected sensor, aswell as the average speed and traffic volume\nby hour of the day. — plot_hour_threshold","text":"list containing plotly figure aggregated traffic data hour.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_speed.html","id":null,"dir":"Reference","previous_headings":"","what":"Visualize speed proportion evolution with trafic — plot_speed","title":"Visualize speed proportion evolution with trafic — plot_speed","text":"Graphical representation (raw smoothed curves) proportion vehicles 10, 20, 30 40 km/h per vehicles/hour","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_speed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Visualize speed proportion evolution with trafic — plot_speed","text":"","code":"plot_speed(...)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_speed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Visualize speed proportion evolution with trafic — plot_speed","text":"... data parameters filter , see filtering","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_speed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Visualize speed proportion evolution with trafic — plot_speed","text":"list containing curves, result Darling-Erdös test performed smoothed curves, processed data used curves","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_threshold.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Threshold on Speed Chart — plot_threshold","title":"Plot Threshold on Speed Chart — plot_threshold","text":"Plot Threshold Speed Chart","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_threshold.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Threshold on Speed Chart — plot_threshold","text":"","code":"plot_threshold(plot_speed, selected_speed, state_threshold, threshold = NULL)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_threshold.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Threshold on Speed Chart — plot_threshold","text":"plot_speed List, plot_speed function returns. selected_speed Character indicating selected speed threshold (c(\"\",40KM/H\", \"30KM/H\", \"20KM/H\", \"10KM/H\")). state_threshold Character indicating state threshold (\"auto\" \"manual\"). threshold Numeric value representing manual threshold state_threshold \"manual\".","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/plot_threshold.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Threshold on Speed Chart — plot_threshold","text":"ggplot2 chart speed plot threshold line.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepare data for plotting — prep","title":"Prepare data for plotting — prep","text":"Prepare data plotting","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare data for plotting — prep","text":"","code":"prep(data, count = \"count\", mean = \"mean\", var = \"var\", total = .data$total)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare data for plotting — prep","text":"data Data table processed count Column name representing count mean Column name representing mean var Column name representing variance total Column total table","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepare data for plotting — prep","text":"processed data table plotting","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_comp_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepares and completes road traffic data by replacing missing hour values with NA — prep_comp_data","title":"Prepares and completes road traffic data by replacing missing hour values with NA — prep_comp_data","text":"function prepares input road traffic data converting date character format, filtering rows missing dates, performing additional data cleaning imputation. also completes data adding missing hours sensor converting necessary variables numeric format.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_comp_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepares and completes road traffic data by replacing missing hour values with NA — prep_comp_data","text":"","code":"prep_comp_data(data)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_comp_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepares and completes road traffic data by replacing missing hour values with NA — prep_comp_data","text":"data Data frame containing road traffic data.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_comp_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepares and completes road traffic data by replacing missing hour values with NA — prep_comp_data","text":"complete data frame missing hour values replaced NA.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_view_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepare and filter data for viewing — prep_view_data","title":"Prepare and filter data for viewing — prep_view_data","text":"function prepares filters input data based specified parameters","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_view_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare and filter data for viewing — prep_view_data","text":"","code":"prep_view_data( data, start = str_sub(min(data$date), 1, 10), end = str_sub(max(data$date), 1, 10), list_weekday = \"ALL\", pub_holidays = \"YES\", holidays = \"YES\" )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_view_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare and filter data for viewing — prep_view_data","text":"data input data frame containing sensor data. start start date \"yyyy-mm-dd\" format (default minimum date data). end end date \"yyyy-mm-dd\" format (default maximum date data). list_weekday character vector weekdays include analysis (default \"\"). pub_holidays character indicating filter public holidays. Possible values \"YES\", \"\", \"\" (default \"YES\"). holidays character indicating filter holidays. Possible values \"YES\", \"\", \"\" (default \"YES\").","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/prep_view_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepare and filter data for viewing — prep_view_data","text":"data frame containing summarized information operating sensors. data frame columns sensor_id, days, hourly uptime data (06h 18h).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/preprocess_car_speed.html","id":null,"dir":"Reference","previous_headings":"","what":"Preprocessing mandatory for car speed graphs functions — preprocess_car_speed","title":"Preprocessing mandatory for car speed graphs functions — preprocess_car_speed","text":"Preprocessing mandatory car speed graphs functions","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/preprocess_car_speed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Preprocessing mandatory for car speed graphs functions — preprocess_car_speed","text":"","code":"preprocess_car_speed( enriched_data, aggregated_by, date_range, segments, weekday, hours )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/preprocess_car_speed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Preprocessing mandatory for car speed graphs functions — preprocess_car_speed","text":"enriched_data enriched data.frame containing data sensors aggregated_by Character. Enables comparison segments weekdays. Options : 'segment_name', 'weekday'. date_range Date vector. Example: c('2021-01-01','2022-01-01'). segments Character vector. Selected road segment. weekday Character vector. Weekday choosen. hours Integer vector. Hours choosen.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/preprocess_car_speed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Preprocessing mandatory for car speed graphs functions — preprocess_car_speed","text":"list parameters data preprocessed.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/preprocess_car_speed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Preprocessing mandatory for car speed graphs functions — preprocess_car_speed","text":"","code":"preprocess_car_speed(traffic, date_range = c('2022-01-01','2022-03-01'), segments = 'RteVitre-06', weekday = c('monday','sunday'), hours = 17:20, aggregated_by = \"weekday\") #> $data #> date day hour weekday holiday vacation #> 1 2022-01-17 17:00:00 2022-01-17 17 monday FALSE No vacation #> 2 2022-01-23 17:00:00 2022-01-23 17 sunday FALSE No vacation #> 3 2022-01-24 17:00:00 2022-01-24 17 monday FALSE No vacation #> 4 2022-01-30 17:00:00 2022-01-30 17 sunday FALSE No vacation #> 5 2022-01-31 17:00:00 2022-01-31 17 monday FALSE No vacation #> 6 2022-02-13 17:00:00 2022-02-13 17 sunday FALSE Vacances d'Hiver #> 7 2022-02-14 17:00:00 2022-02-14 17 monday FALSE Vacances d'Hiver #> 8 2022-02-20 17:00:00 2022-02-20 17 sunday FALSE Vacances d'Hiver #> 9 2022-02-21 17:00:00 2022-02-21 17 monday FALSE No vacation #> 10 2022-02-21 18:00:00 2022-02-21 18 monday FALSE No vacation #> 11 2022-02-27 17:00:00 2022-02-27 17 sunday FALSE No vacation #> 12 2022-02-27 18:00:00 2022-02-27 18 sunday FALSE No vacation #> 13 2022-02-28 17:00:00 2022-02-28 17 monday FALSE No vacation #> 14 2022-02-28 18:00:00 2022-02-28 18 monday FALSE No vacation #> segment_name v85 #> 1 RteVitre-06 33.5 #> 2 RteVitre-06 37.5 #> 3 RteVitre-06 31.0 #> 4 RteVitre-06 35.5 #> 5 RteVitre-06 43.5 #> 6 RteVitre-06 41.5 #> 7 RteVitre-06 41.0 #> 8 RteVitre-06 40.0 #> 9 RteVitre-06 28.5 #> 10 RteVitre-06 36.5 #> 11 RteVitre-06 31.0 #> 12 RteVitre-06 34.0 #> 13 RteVitre-06 32.0 #> 14 RteVitre-06 37.0 #> car_speed_hist_0to70plus #> 1 8.0604534, 17.8841310, 30.9823678, 38.7909320, 3.5264484, 0.2518892, 0.0000000, 0.5037783 #> 2 1.951220, 3.414634, 23.414634, 55.609756, 15.609756, 0.000000, 0.000000, 0.000000 #> 3 18.1818182, 26.0042283, 27.0613108, 26.8498943, 1.4799154, 0.2114165, 0.2114165, 0.0000000 #> 4 0.3745318, 5.9925094, 32.2097378, 54.3071161, 6.7415730, 0.3745318, 0.0000000, 0.0000000 #> 5 0.9740260, 2.5974026, 5.1948052, 51.9480519, 34.0909091, 2.2727273, 0.6493506, 2.2727273 #> 6 3.311258, 2.649007, 15.894040, 39.735099, 37.086093, 1.324503, 0.000000, 0.000000 #> 7 15.1603499, 16.0349854, 8.7463557, 32.3615160, 25.0728863, 1.7492711, 0.5830904, 0.2915452 #> 8 1.136364, 4.924242, 12.500000, 57.954545, 21.212121, 2.272727, 0.000000, 0.000000 #> 9 2.7184466, 35.1456311, 44.6601942, 15.3398058, 1.7475728, 0.0000000, 0.1941748, 0.1941748 #> 10 2.2792023, 5.4131054, 20.2279202, 61.5384615, 8.8319088, 0.8547009, 0.2849003, 0.5698006 #> 11 5.5921053, 33.5526316, 35.8552632, 19.4078947, 3.9473684, 0.0000000, 0.3289474, 1.3157895 #> 12 6.6901408, 8.0985915, 36.2676056, 42.9577465, 4.9295775, 0.3521127, 0.3521127, 0.3521127 #> 13 2.2044088, 16.6332665, 49.6993988, 28.4569138, 2.8056112, 0.2004008, 0.0000000, 0.0000000 #> 14 1.0282776, 4.6272494, 19.5372751, 62.9820051, 10.7969152, 0.2570694, 0.2570694, 0.5141388 #> car_speed_hist_0to120plus #> 1 2.2670025, 5.7934509, 10.3274559, 7.5566751, 7.8085642, 23.1738035, 25.9445844, 12.8463476, 2.5188917, 1.0075567, 0.2518892, 0.0000000, 0.0000000, 0.0000000, 0.2518892, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.2518892 #> 2 1.9512195, 0.0000000, 0.9756098, 2.4390244, 6.3414634, 17.0731707, 32.6829268, 22.9268293, 14.1463415, 1.4634146, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 3 6.7653277, 11.4164905, 19.4503171, 6.5539112, 9.0909091, 17.9704017, 19.4503171, 7.3995772, 1.0570825, 0.4228330, 0.0000000, 0.2114165, 0.0000000, 0.2114165, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 4 0.3745318, 0.0000000, 1.8726592, 4.1198502, 10.1123596, 22.0973783, 34.4569288, 19.8501873, 6.3670412, 0.3745318, 0.3745318, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 5 0.6493506, 0.3246753, 0.3246753, 2.2727273, 1.6233766, 3.5714286, 22.7272727, 29.2207792, 22.4025974, 11.6883117, 1.9480519, 0.3246753, 0.3246753, 0.3246753, 0.0000000, 0.3246753, 0.0000000, 0.0000000, 0.6493506, 0.3246753, 0.3246753, 0.0000000, 0.3246753, 0.0000000, 0.3246753 #> 6 2.6490066, 0.6622517, 0.0000000, 2.6490066, 7.2847682, 8.6092715, 17.8807947, 21.8543046, 31.1258278, 5.9602649, 0.6622517, 0.6622517, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 7 9.9125364, 5.2478134, 11.0787172, 4.9562682, 4.3731778, 4.3731778, 11.9533528, 20.4081633, 19.5335277, 5.5393586, 1.4577259, 0.2915452, 0.0000000, 0.5830904, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.2915452, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 8 0.3787879, 0.7575758, 1.8939394, 3.0303030, 3.4090909, 9.0909091, 27.6515152, 30.3030303, 16.6666667, 4.5454545, 2.2727273, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 9 1.3592233, 1.3592233, 7.7669903, 27.3786408, 30.0970874, 14.5631068, 11.0679612, 4.2718447, 1.7475728, 0.0000000, 0.0000000, 0.0000000, 0.1941748, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.1941748, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 10 1.4245014, 0.8547009, 1.4245014, 3.9886040, 2.5641026, 17.6638177, 36.1823362, 25.3561254, 7.9772080, 0.8547009, 0.8547009, 0.0000000, 0.2849003, 0.0000000, 0.0000000, 0.2849003, 0.0000000, 0.0000000, 0.0000000, 0.2849003, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 11 3.2894737, 2.3026316, 12.8289474, 20.7236842, 21.0526316, 14.8026316, 13.4868421, 5.9210526, 3.9473684, 0.0000000, 0.0000000, 0.0000000, 0.3289474, 0.0000000, 0.3289474, 0.0000000, 0.0000000, 0.3289474, 0.3289474, 0.0000000, 0.3289474, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 12 4.5774648, 2.1126761, 2.8169014, 5.2816901, 12.3239437, 23.9436620, 29.9295775, 13.0281690, 3.8732394, 1.0563380, 0.0000000, 0.3521127, 0.0000000, 0.3521127, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.3521127, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 13 1.0020040, 1.2024048, 3.6072144, 13.0260521, 25.4509018, 24.2484970, 19.2384770, 9.2184369, 2.6052104, 0.2004008, 0.2004008, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000 #> 14 1.0282776, 0.0000000, 2.0565553, 2.5706941, 3.3419023, 16.1953728, 34.4473008, 28.5347044, 9.5115681, 1.2853470, 0.2570694, 0.0000000, 0.0000000, 0.2570694, 0.2570694, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.2570694 #> uptime uptime_quality mode direction traffic_sum #> 1 0.6711111 TRUE car both 591.5563 #> 2 0.5700000 TRUE car both 359.6491 #> 3 0.7633333 TRUE car both 619.6507 #> 4 0.7972222 TRUE car both 334.9129 #> 5 0.7822222 TRUE car both 393.7500 #> 6 0.7644444 TRUE car both 197.5291 #> 7 0.7308333 TRUE car both 469.3273 #> 8 0.7813889 TRUE car both 337.8599 #> 9 0.7708333 TRUE car both 668.1081 #> 10 0.5644444 TRUE car both 621.8504 #> 11 0.7927778 TRUE car both 383.4618 #> 12 0.6308333 TRUE car both 450.1982 #> 13 0.7897222 TRUE car both 631.8677 #> 14 0.6508333 TRUE car both 597.6953 #> #> $segment #> [1] \"RteVitre-06\" #> #> $mode #> [1] \"heavy\" \"car\" #> #> $direction #> [1] \"both\" #> #> $weekday #> [1] \"monday\" \"sunday\" #> #> $hour #> [1] 17 18 19 20 #> #> $speed_labels #> car_speed_hist_0to120plus_1 car_speed_hist_0to120plus_2 #> \"0 - 5 km/h\" \"5 - 10 km/h\" #> car_speed_hist_0to120plus_3 car_speed_hist_0to120plus_4 #> \"10 - 15 km/h\" \"15 - 20 km/h\" #> car_speed_hist_0to120plus_5 car_speed_hist_0to120plus_6 #> \"20 - 25 km/h\" \"25 - 30 km/h\" #> car_speed_hist_0to120plus_7 car_speed_hist_0to120plus_8 #> \"30 - 35 km/h\" \"35 - 40 km/h\" #> car_speed_hist_0to120plus_9 car_speed_hist_0to120plus_10 #> \"40 - 45 km/h\" \"45 - 50 km/h\" #> car_speed_hist_0to120plus_11 car_speed_hist_0to120plus_12 #> \"50 - 55 km/h\" \"55 - 60 km/h\" #> car_speed_hist_0to120plus_13 car_speed_hist_0to120plus_14 #> \"60 - 65 km/h\" \"65 - 70 km/h\" #> car_speed_hist_0to120plus_15 car_speed_hist_0to120plus_16 #> \"70 - 75 km/h\" \"75 - 80 km/h\" #> car_speed_hist_0to120plus_17 car_speed_hist_0to120plus_18 #> \"80 - 85 km/h\" \"85 - 90 km/h\" #> car_speed_hist_0to120plus_19 car_speed_hist_0to120plus_20 #> \"90 - 95 km/h\" \"95 - 100 km/h\" #> car_speed_hist_0to120plus_21 car_speed_hist_0to120plus_22 #> \"100 - 105 km/h\" \"105 - 110 km/h\" #> car_speed_hist_0to120plus_23 car_speed_hist_0to120plus_24 #> \"110 - 115 km/h\" \"115 - 120 km/h\" #> car_speed_hist_0to120plus_25 #> \"120 - 120+ km/h\" #>"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/retrieve_sensor.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieves data associated with a sensor from the Telraam API — retrieve_sensor","title":"Retrieves data associated with a sensor from the Telraam API — retrieve_sensor","text":"Retrieves data associated sensor Telraam API. data retrieved specified time period start_date end_date (inclusive).","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/retrieve_sensor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieves data associated with a sensor from the Telraam API — retrieve_sensor","text":"","code":"retrieve_sensor(segment_name, start_date, end_date, key = get_telraam_token())"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/retrieve_sensor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieves data associated with a sensor from the Telraam API — retrieve_sensor","text":"segment_name Character. Name segment, specified config. start_date Date. Start date \"aaaa-mm-jj\", must date type. end_date Date. End date \"aaaa-mm-jj\", must date type. key API key (set set_telraam_token() function)","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/retrieve_sensor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieves data associated with a sensor from the Telraam API — retrieve_sensor","text":"Dataframe Telraam API, enriched enrich_traffic() function.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/retrieve_sensor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieves data associated with a sensor from the Telraam API — retrieve_sensor","text":"","code":"if (FALSE) # This function requires a valid API key period <- as.Date(c('2022-01-01', '2022-12-31')) retrieve_sensor('RteVitre-06', period[1], period[2]) #> Error in eval(expr, envir, enclos): object 'period' not found"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/seq_by_3_month.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate sequence of intervals with three-month periods — seq_by_3_month","title":"Generate sequence of intervals with three-month periods — seq_by_3_month","text":"function used internally retrieve_sensor function generate sequence intervals three-month periods. takes start date (start_date) end date (end_date), returns data frame two columns representing start end dates interval.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/seq_by_3_month.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate sequence of intervals with three-month periods — seq_by_3_month","text":"","code":"seq_by_3_month(start_date, end_date)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/seq_by_3_month.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate sequence of intervals with three-month periods — seq_by_3_month","text":"start_date Date. Start date \"yyyy-mm-dd\" format. end_date Date. End date \"yyyy-mm-dd\" format.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/seq_by_3_month.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate sequence of intervals with three-month periods — seq_by_3_month","text":"Dataframe start end columns, row represents 3 months period.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/seq_by_3_month.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate sequence of intervals with three-month periods — seq_by_3_month","text":"","code":"seq_by_3_month(as.Date('2023-11-01'),as.Date('2024-11-01')) #> start end #> 1 2023-11-01 2024-02-01 #> 2 2024-02-01 2024-05-01 #> 3 2024-05-01 2024-08-01 #> 4 2024-08-01 2024-11-01"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_global_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to set up the global variables for public holidays and vacations, with the default\nbeing the french dates from a governmental API. — set_global_vars","title":"Function to set up the global variables for public holidays and vacations, with the default\nbeing the french dates from a governmental API. — set_global_vars","text":"Function set global variables public holidays vacations, default french dates governmental API.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_global_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to set up the global variables for public holidays and vacations, with the default\nbeing the french dates from a governmental API. — set_global_vars","text":"","code":"set_global_vars(vacations = NULL, public_holidays = NULL)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_global_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to set up the global variables for public holidays and vacations, with the default\nbeing the french dates from a governmental API. — set_global_vars","text":"vacations data frame containing vacation dates public_holidays data frame containing public holidays dates","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_global_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to set up the global variables for public holidays and vacations, with the default\nbeing the french dates from a governmental API. — set_global_vars","text":"return anything, set global variables public holidays vacations.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_global_vars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to set up the global variables for public holidays and vacations, with the default\nbeing the french dates from a governmental API. — set_global_vars","text":"","code":"pkg.globals <- new.env(parent = emptyenv()) set_global_vars() print(pkg.globals$vacations) #> NULL"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_telraam_token.html","id":null,"dir":"Reference","previous_headings":"","what":"Saves an authentication token for the 'Telraam' API. — set_telraam_token","title":"Saves an authentication token for the 'Telraam' API. — set_telraam_token","text":"want get token instruction, please use get_telraam_token().","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_telraam_token.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Saves an authentication token for the 'Telraam' API. — set_telraam_token","text":"","code":"set_telraam_token(token)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_telraam_token.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Saves an authentication token for the 'Telraam' API. — set_telraam_token","text":"token string token","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_telraam_token.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Saves an authentication token for the 'Telraam' API. — set_telraam_token","text":"Boolean: TRUE token correctly set","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/set_telraam_token.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Saves an authentication token for the 'Telraam' API. — set_telraam_token","text":"","code":"my_token <- \"MyTelraamToken\" set_telraam_token(my_token) get_telraam_token() #> [1] \"MyTelraamToken\""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/simple_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of cars and Heavies as a function of time — simple_plot","title":"Number of cars and Heavies as a function of time — simple_plot","text":"Number cars Heavies function time","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/simple_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of cars and Heavies as a function of time — simple_plot","text":"","code":"simple_plot( data, sensor, date_range, line_color = \"black\", smooth_color = \"#B1D62E\" )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/simple_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of cars and Heavies as a function of time — simple_plot","text":"data data.frame containing data sensors sensor numeric, Id chosen sensor date_range Date vector. example: c('2021-01-01','2022-01-01') line_color character. color main line. Default black smooth_color character. color smoothing line. Default light green","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/simple_plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of cars and Heavies as a function of time — simple_plot","text":"graph showing evolution number cars heavies selected date range chosen sensor.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/traffic.html","id":null,"dir":"Reference","previous_headings":"","what":"Traffic data of Telraam sensors in Châteaubourg (FR) — traffic","title":"Traffic data of Telraam sensors in Châteaubourg (FR) — traffic","text":"Telraam sensors continously monitor street form citizen window. count heavy vehicules, cars, twok-wheelers pedestrians, every hour. Châteaubourg one city France highest density sensors dataframe subset sensors data Châteaubourg 2022. Additional properties present natively Telraam API added package.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/traffic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Traffic data of Telraam sensors in Châteaubourg (FR) — traffic","text":"","code":"traffic"},{"path":[]},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/traffic.html","id":"traffic","dir":"Reference","previous_headings":"","what":"traffic","title":"Traffic data of Telraam sensors in Châteaubourg (FR) — traffic","text":"data frame 16,729 rows 22 columns: instance_id Sensor number. Equals -1 API request made road segment camera. segment_id Road segment Telraam ID. Equals -1 API request made camera road segment. segment_name Additional property - Segment name specified configuration file. segment_fullname Additional property - Concatenation segment_id segment name specified configuration. date date UTC time reporting interval (beginning interval). day Additional property - Day reporting interval. hour Additional property - Hour reporting interval. weekday Additional property - Weekday reporting interval. holiday Additional property - boolean, indicates whether entry French public holiday. vacation Indicates whether entry French vacation period, true, vacation period name. interval can \"hourly\" \"daily\" hourly daily aggregate data. uptime 0 1, represents portion reporting interval actively spent counting traffic uptime_quality Additional property - boolean, indicates whether entry uptime greather equal 0. heavy, heavy_lft, heavy_rgt number heavy vehicles, total directions. car, car_lft, car_rgt number cars, total directions. bike, bike_lft, bike_rgt number two-wheelers, total directions. pedestrian, pedestrian_lft, pedestrian_rgt number pedestrians, total directions. direction 1, internal consistency value Telraam. car_speed_hist_0to70plus, car_speed_hist_0to120plus estimated car speed distribution 10 km/h bins 0 70+ km/h 120+ km/h (percentage total 100%). timezone name Time zone segment can found. v85 estimated car speed limit km/h 85% cars respect","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/traffic.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Traffic data of Telraam sensors in Châteaubourg (FR) — traffic","text":"https://telraam-api.net/","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/which_vacations.html","id":null,"dir":"Reference","previous_headings":"","what":"Indicates if a date is in vacation period and if true, which vacation.\nIf the date is not in a vacation period, ","title":"Indicates if a date is in vacation period and if true, which vacation.\nIf the date is not in a vacation period, ","text":"Indicates date vacation period true, vacation. date vacation period, \"vacation\" returned.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/which_vacations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indicates if a date is in vacation period and if true, which vacation.\nIf the date is not in a vacation period, ","text":"","code":"which_vacations(date, vacation)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/which_vacations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indicates if a date is in vacation period and if true, which vacation.\nIf the date is not in a vacation period, ","text":"date Date (character format) vacation Dataframe vacations, format set_globals_vars output.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/which_vacations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indicates if a date is in vacation period and if true, which vacation.\nIf the date is not in a vacation period, ","text":"Vacation description day two dates, \"vacation\" otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Write or update the sensor data in the data folder — write_update_data","title":"Write or update the sensor data in the data folder — write_update_data","text":"Writes updates sensor data data folder. retrieves data specified sensor start_date end_date (inclusive) using retrieve_sensor function, converts certain columns character strings writing data RData file data folder (create_directory = TRUE), temporary folder otherwise.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write or update the sensor data in the data folder — write_update_data","text":"","code":"write_update_data(segment_name, start_date, end_date, create_directory = FALSE)"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write or update the sensor data in the data folder — write_update_data","text":"segment_name Character. Name segment, specified config. start_date Date. Start date \"aaaa-mm-jj\" end_date Date. End date \"aaaa-mm-jj\" create_directory Boolean: file need created project directory? Default FALSE.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Write or update the sensor data in the data folder — write_update_data","text":"Boolean: TRUE data well saved/written, FALSE otherwise (data example)","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Write or update the sensor data in the data folder — write_update_data","text":"","code":"if (FALSE) # This function requires a valid API key period <- as.Date(c('2022-01-01', '2022-12-31')) write_update_data('RteVitre-06', period[1], period[2]) #> Error in eval(expr, envir, enclos): object 'period' not found"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data_comp.html","id":null,"dir":"Reference","previous_headings":"","what":"Write or update the sensor data in the data folder — write_update_data_comp","title":"Write or update the sensor data in the data folder — write_update_data_comp","text":"function writes updates sensor data data folder. retrieves data specified sensor start_date end_date (inclusive) using retrieve_sensor function, converts certain columns character strings writing data CSV file data folder.","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data_comp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write or update the sensor data in the data folder — write_update_data_comp","text":"","code":"write_update_data_comp( segment_name, start_date, end_date, vacations = NULL, public_holidays = NULL )"},{"path":"https://ketsiaguichard.github.io/telraamStats/reference/write_update_data_comp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write or update the sensor data in the data folder — write_update_data_comp","text":"segment_name Character. Name segment, specified config. start_date Date. Start date \"aaaa-mm-jj\" end_date Date. End date \"aaaa-mm-jj\" vacations vacation periods, set default french ones public_holidays public holidays list, set default french ones","code":""},{"path":"https://ketsiaguichard.github.io/telraamStats/news/index.html","id":"telraamstats-110","dir":"Changelog","previous_headings":"","what":"telraamStats 1.1.0","title":"telraamStats 1.1.0","text":"Initial CRAN submission.","code":""}]