Skip to content

Commit d3be63b

Browse files
authored
Merge pull request #51 from trackerproject/develop
trackeRapp v1.2
2 parents 9e3bd91 + 26a86f4 commit d3be63b

10 files changed

Lines changed: 50 additions & 54 deletions

File tree

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ inst/approvals/
1515
inst/presentations/
1616
^CONDUCT\.md$
1717
^CRAN-RELEASE$
18+
^CRAN-SUBMISSION$

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: trackeRapp
22
Title: Interface for the Analysis of Running, Cycling and Swimming Data from GPS-Enabled Tracking Devices
3-
Version: 1.1
3+
Version: 1.2
44
Authors@R: c(person(given = "Ioannis", family = "Kosmidis",
55
role = c("aut", "cre"), email = "ioannis.kosmidis@warwick.ac.uk",
66
comment = c(ORCID = "0000-0003-1556-0302")),

NEWS.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
# trackeRapp 1.2
2+
3+
## Bug fixes
4+
+ Fixed bugs introduced by updates in [**shinyjs**](https://cran.r-project.org/package=shinyjs) that broke the `trackeRapp()` interface.
5+
+ Fixed a few icons that changed name in recent versions of [**fontawesome**](https://cran.r-project.org/package=fontawesome).
6+
17
# trackeRapp 1.1
28

39
## Bug fixes
4-
+ Fixed bug in `get_coords` that caused errors with [mapdeck](https://symbolixau.github.io/mapdeck/articles/layers.html) v0.3.2
5-
+ Fixed bug where boxes in summary view would not update their value after session selection
10+
+ Fixed bug in `get_coords` that caused errors with [**mapdeck**](https://symbolixau.github.io/mapdeck/articles/layers.html) v0.3.2.
11+
+ Fixed bug where boxes in summary view would not update their value after session selection.
612

713
## Other improvements, updates and additions
8-
+ trackeRapp works on Firefox version >= 75.0
9-
+ Documentation improvements
14+
+ trackeRapp works on Firefox version >= 75.0.
15+
+ Documentation improvements.
1016

1117
# trackeRapp 1.0
1218

13-
* First CRAN release
19+
* First CRAN release.

R/helpers.R

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,19 @@ lab_sum <- function(feature, data, whole_text = TRUE, transform_feature = TRUE)
106106
## @param feature character string representing the feature for which we want to generate an icon
107107
create_icon <- function(feature) {
108108
icon <- switch(feature,
109-
"distance" = "area-chart",
110-
"duration" = "clock-o",
111-
"avgSpeed" = "line-chart",
112-
"avgAltitude" = "arrows-v",
113-
"total_elevation_gain" = "arrows-v",
114-
"avgTemperature" = "thermometer",
109+
"distance" = "chart-area",
110+
"duration" = "clock",
111+
"avgSpeed" = "chart-line",
112+
"avgAltitude" = "arrows-alt-v",
113+
"total_elevation_gain" = "arrows-alt-v",
114+
"avgTemperature" = "thermometer-half",
115115
"nsessions_cycling" = "bicycle",
116116
"nsessions_running" = "walking",
117117
"nsessions_swimming" = "swimmer",
118-
"avgPace" = "tachometer",
119-
"avgCadenceRunning" = "tachometer",
120-
"avgCadenceCycling" = "tachometer",
121-
"avgPower" = "flash",
118+
"avgPace" = "tachometer-alt",
119+
"avgCadenceRunning" = "tachometer-alt",
120+
"avgCadenceCycling" = "tachometer-alt",
121+
"avgPower" = "bolt",
122122
"avgHeartRate" = "heartbeat",
123123
"wrRatio" = "fire")
124124
icon

R/trackeRapp.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#' videos, explanation of the workflow and visualizations that
2020
#' \pkg{trackeRapp} offers, and to, generally, learn more about
2121
#' \pkg{trackeRapp} and all of its capabilities.
22-
#'
22+
#'
2323
#'
2424
#' @section Video channel:
2525
#' \pkg{trackeRapp} has a dedicated YouTube channel at

R/ui-injectors.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ create_summary_timeline_boxes <- function() {
293293
id = "summary_box",
294294
width = 6,
295295
collapsible = TRUE,
296-
title = tagList(icon("reorder"), "Workout summary"),
296+
title = tagList(icon("bars"), "Workout summary"),
297297
DTOutput("summary", height = "365px")),
298298
box(
299299
id = "workout_timeline_box",

README.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ install.packages("trackeRapp")
3838
The development version of **trackeRapp** can also be installed directly from github by doing
3939

4040
```{r eval = FALSE}
41-
# install.packages("devtools")
42-
devtools::install_github("trackerproject/trackeRapp")
41+
# install.packages("remotes")
42+
remotes::install_github("trackerproject/trackeRapp")
4343
```
4444

4545
## Getting started

README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/trackeRapp)](https://cran.r-project.org/package=trackeRapp)
2-
[![Travis-CI Build Status](https://travis-ci.org/trackerproject/trackeRapp.svg?branch=master)](https://travis-ci.org/trackerproject/trackeRapp)
2+
[![Travis-CI Build
3+
Status](https://travis-ci.org/trackerproject/trackeRapp.svg?branch=master)](https://travis-ci.org/trackerproject/trackeRapp)
34
[![Licence](https://img.shields.io/badge/licence-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)
45

5-
trackeRapp <img src="README_files/hex_trackeRapp.svg" width="320" align="right">
6-
================================================================================
6+
# trackeRapp <img src="README_files/hex_trackeRapp.svg" width="320" align="right">
77

88
[**trackeRapp**](https://trackerapp.com) is a
99
[**shiny**](http://shiny.rstudio.com) interface for the analysis and
@@ -22,8 +22,7 @@ structured R object, and finally to export that object so that it can be
2222
used for future analyses not only within **trackeRapp** but also for
2323
more advanced modelling in R.
2424

25-
Installation
26-
------------
25+
## Installation
2726

2827
**trackeRapp** can be installed by typing
2928

@@ -32,11 +31,10 @@ Installation
3231
The development version of **trackeRapp** can also be installed directly
3332
from github by doing
3433

35-
# install.packages("devtools")
36-
devtools::install_github("trackerproject/trackeRapp")
34+
# install.packages("remotes")
35+
remotes::install_github("trackerproject/trackeRapp")
3736

38-
Getting started
39-
---------------
37+
## Getting started
4038

4139
See the [**tour de
4240
trackeRapp**](https://trackerproject.github.io/trackeRapp/) pages for
@@ -74,16 +72,14 @@ Session summaries
7472

7573
<img src="README_files/selected_workouts.png" width="95%" style="display: block; margin: auto;" />
7674

77-
Video channel
78-
-------------
75+
## Video channel
7976

8077
**trackeRapp** has a dedicated [YouTube
8178
channel](https://www.youtube.com/channel/UCY6y-pw8d1kek1WAIWiVhhw). The
8279
channel features video tutorials about **trackeRapp** and the workflow
8380
it provides.
8481

85-
Launching the user-interface
86-
----------------------------
82+
## Launching the user-interface
8783

8884
The web-interface can be accessed remotely at
8985
<https://www.trackerapp.com> or on a local machine by doing:
@@ -93,8 +89,7 @@ The web-interface can be accessed remotely at
9389
# Open the interface in the browser
9490
trackeR_app()
9591

96-
Code of Conduct
97-
---------------
92+
## Code of Conduct
9893

9994
Please note that this project is released with a [Contributor Code of
10095
Conduct](CONDUCT.md). By participating in this project you agree to

inst/shiny/server.R

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ server <- function(input, output, session) {
3535
shinyjs::runjs('$(document).on("click", ".dropdown-menu", function (e) {
3636
e.stopPropagation();
3737
});
38-
window.onbeforeunload = function(e) {
38+
shinyjs.window.onbeforeunload = function(e) {
3939
e = e || window.event;
4040
if (e) {
4141
e.returnValue = "Sure?";
@@ -65,7 +65,7 @@ server <- function(input, output, session) {
6565
observeEvent(input$uploadButton, {
6666
no_raw_directory_selected <- is.null(input$rawDataDirectory$datapath)
6767
no_processed_file_selected <- is.null(input$processedDataPath$datapath)
68-
68+
6969
if (no_raw_directory_selected & no_processed_file_selected) {
7070
trackeRapp:::show_warning_no_data_selected()
7171
}
@@ -82,7 +82,7 @@ server <- function(input, output, session) {
8282
to <- file.path(dirname(from), basename(input$rawDataDirectory$name))
8383
file.rename(from, to)
8484
directory <- dirname(to[1])
85-
## Process raw data
85+
## Process raw data
8686
raw_data <- trackeRapp:::read_directory_shiny(
8787
directory = directory,
8888
timezone = "GMT",
@@ -148,7 +148,7 @@ server <- function(input, output, session) {
148148
## Sessions selected from plots using box/lasso selection
149149
observeEvent(plotly::event_data("plotly_selected"), {
150150
trackeRapp:::generate_selected_sessions_object(data, input,
151-
plot_selection = TRUE)
151+
plot_selection = TRUE)
152152
DT::selectRows(proxy = proxy, selected = data$selected_sessions)
153153
shinyWidgets::updatePickerInput(session = session, inputId = "metricsSelected",
154154
selected = selected_metrics(),
@@ -205,7 +205,7 @@ server <- function(input, output, session) {
205205

206206
## Uploading sample dataset
207207
observeEvent(input$uploadSampleDataset, {
208-
removeModal()
208+
removeModal()
209209
filepath <- system.file("extdata/sample.rds", package = "trackeRapp")
210210
data$object <- readRDS(filepath)
211211
## See helper file
@@ -226,14 +226,6 @@ server <- function(input, output, session) {
226226

227227
## Message and actions on firefox issues
228228
shinyjs::runjs('Shiny.setInputValue("browser", bowser.name);')
229-
## observeEvent(input$browser, {
230-
## if (grepl("firef", input$browser, ignore.case = TRUE)) {
231-
## shinyjs::show(id = "firefoxmessage")
232-
## shinyjs::disable(id = "resetButton")
233-
## shinyjs::disable(id = "uploadButton")
234-
## shinyjs::disable(id = "download_data")
235-
## }
236-
## })
237229

238230
## Session summaries page
239231
observeEvent(input$createDashboard, {
@@ -321,8 +313,8 @@ server <- function(input, output, session) {
321313
})
322314

323315
deselected_data <- reactive({
324-
sessions <- seq_along(data$object)[data$is_location_data]
325-
sessions <- sessions[!(sessions %in% data$selected_sessions)]
316+
sessions <- seq_along(data$object)[data$is_location_data]
317+
sessions <- sessions[!(sessions %in% data$selected_sessions)]
326318
if (length(sessions)) {
327319
out <- trackeRapp:::get_coords(data, sessions = sessions, keep = opts$coordinates_keep)
328320
out$col <- ifelse(out$sport == "running",
@@ -352,10 +344,10 @@ server <- function(input, output, session) {
352344
des <- deselected_data()
353345
incProgress(1/2, detail = "Preparing routes")
354346
## FIXME: mapdeck gets confused with the tooltips if we do not do the below
355-
incProgress(1/1, detail = "Mapping")
347+
incProgress(1/1, detail = "Mapping")
356348
if (!is.null(des)) {
357349
p <- mapdeck::mapdeck_update(map_id = "map")
358-
p <- mapdeck::clear_path(p, "deselection_path")
350+
p <- mapdeck::clear_path(p, "deselection_path")
359351
p <- mapdeck::add_path(p,
360352
data = des,
361353
stroke_colour = paste0(opts$summary_plots_deselected_colour, "80"),

inst/shiny/ui.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ui <- tagList(
4444
shinydashboard::sidebarMenu(
4545
br(),
4646
fileInput("processedDataPath",
47-
"Import processed data (rda)",
47+
"Import processed data (rds)",
4848
multiple = FALSE,
4949
buttonLabel = icon("folder-open"),
5050
accept = c(".rds")),
@@ -149,7 +149,9 @@ ui <- tagList(
149149
## Browser checks
150150
tags$head(tags$script(src="bowser.min.js")),
151151
tags$head(tags$script(src="buttons.js")),
152-
shinyjs::extendShinyjs(text = opts$custom_js),
152+
shinyjs::extendShinyjs(text = opts$custom_js,
153+
functions = c("window.onbeforeunload",
154+
"collapse", "reset_page", "no_sports")),
153155
## A hack to load the right js
154156
mapdeck::mapdeckOutput(outputId = "dummy_map")
155157
))))

0 commit comments

Comments
 (0)