Ale0430 / MiniBuoy-App

Its another app
GNU General Public License v3.0
0 stars 0 forks source link

Restructure data upload and filter #1

Closed mcwimm closed 2 years ago

mcwimm commented 2 years ago

This PR includes the restructering of data upload and filter by time. @Ale0430 @cailadd90 please check if this works for you. Please also check if the time span shown in data > upload > table matches the time in the uploaded csv.

At the moment you should see

Short description how you can see this branch on your computer:

  1. Clean your working tree (nothing unstaged -> git status gives an overview
  2. Fetch remote changes -> git fetch --all
  3. Checkout this branch -> git checkout shiny_m
  4. Leave a comment here :)
  5. Switch back to your project -> git checkout your-branch
Ale0430 commented 2 years ago

Warning message on "Data Upload".. with data frame is too small... change to " Data set too small to rely on result interpretation"

cailadd90 commented 2 years ago

Cai WOW! Very impressed with the new upload and filter sections. I've experimented a little by uploading raw data from a B4+ (2nd) Mini Buoy. The timespan shown was correct. Looking really great.

Here are my suggestions:

EDIT: As per request, I've now added H, M, L to each comment according to priority.

General L • In the same way that the header remains fixed in place when you scroll up and down, can the menu on the left remain fixed as well? L• Can the font for project / target/ reference displayed at the top be white? And maybe have a matching font to the Mini Buoy App title? H• Maybe a good idea for all menu windows to have a 1 column tab along the top with a summary of what to do on each page?

Project settings H• Without more explanatory text, I think setting files / projects is a little confusing. I’m not entirely what the difference is between selecting a folder or setting a project. I wonder if it’s better that, everytime data is uploaded or downloaded, a browser window appears for the user to navigate to the right place, and so do away with using the project approach? For example, I worry that users will think it didn’t work when data was saved, as there was no prompt for where to save the data, or users might not realise /remember that new directories were created where the data / figures are saved. Moreover, would the user need to allow the App to modify directories on their computer? H• Current project and Current project directory + output [ character(0) ] display items aren’t helpful until rendered. Can the display be switched off until something is passed to them? L• You can create/set a project without first selecting a folder, giving the output ‘NULL’. Can this be stopped? One option might be to integrate folder select and project creation in one button. L• Without knowing what figure you’re going to title, it’s hard to decide what to enter here L• Visualisation window needs “Visualisation” as a title. When you minimize the window, nothing is shown. L• Is colour selection optional? Or maybe default option can be shown? L• It might be better to have the Visualisation window minimised as default, to keep the Project settings section minimal M Rewording • “Project settings” -> “Settings” (i.e., menu bar on the left) • “String added to file names” -> “Prefix for all files exported in this App” • “File name” -> “Prefix” • Figure theme -> remove “(ggplot)” • “Bw” -> “Black & white”

Data upload L• When we click “Browse…”, can it default to the project directory (working directory)? H• The summary dataset reloads every time a new “input file type” is selected. These shouldn’t be linked L• If the data can’t be read, it would be good to have a warning message like “Error: could not read file. Is the file in the correct format? Please refer to the Mini Buoy Handbook how to download data in the correct format for this App”, rather than the generic error being printed. L• Can we hide the column names, i.e. hide “Variable” and “Value”? Not helpful here. L• We don’t need date and time as separate columns, no? Just dateime and Acceleration? H• For the summary table, change the order/names slightly: Column names, Survey length (days), First date, last date, Mean acceleration (max and min), Median acceleration (1st and 3rd quantile), Number of recordings H• Can we round the acceleration data to 2 decimal places? L• Maybe a message after clicking “Use data” saying something like “Target data set”? M Rewording • “Upload data” -> “Upload” (i.e., menu bar on the left) • Titles can be simplified -> “Target” and “Reference” • Left panel: “Choose Target site CSV file” -> “Choose the target site data (.csv file)” • Right panel: “Choose Target site CSV file” -> “(optional) Choose the reference site data (.csv file)” • “Input file type” -> “Select Mini Buoy design used” • “Summary data set” -> “Summary of the data” • “datetime” -> “Date”

Filters M• Could start and end times default to the first and last entry for that date? Stops one trying to select a time earlier than the first record… H• The line and scatterplot still takes a while to render. Can you aggregate to 1/10 min windows before plotting? We don’t need to display all the data M Rewording • “Filters” -> “Filter” (i.e., menu bar on the left) • Titles can be simplified -> “Target” and “Reference” • “Remove NA-rows” -> “Remove blank rows • “Time filters” -> “Select the start and end dates/times of the survey” • “Raw data figures” -> “Check the raw acceleration data” • “View data set” -> “View data” • “Save csv” -> “Save filtered data”

Thanks!

mcwimm commented 2 years ago

@cailadd90 I updated the 'settings ' section -> see my comments below behind '->'

Project settings

Ale0430 commented 2 years ago

When going to shiny_m branch and running the app, several things look different from yesterday (i.e., Mini buoy models with old names (M"Mini Buoy Model 1", and "MB1"). I think I'm not being successful with the "git fetch --all" command

I'm working on the hydrodynamics functions script for now, so no need to answer for now.

mcwimm commented 2 years ago

@cailadd90 I redesigned the uplaod area. Now no data set is loaded by default but the user can still select to use a default data set. Otherwise, the default is always loaded first and the user has to wait until he/she can uplaod own data.

Data upload

Ale0430 commented 2 years ago

on computing hydrodynamics.

mcwimm commented 2 years ago

Filters

mcwimm commented 2 years ago

For now, I would suggest to have only 1 default data set (with target and reference). So if the user choose to use 'default data' the mini buoy design is preselected and can't be changed. However, I don't know which mini buoy design of the default data set, so I assume it to be B4.

mcwimm commented 2 years ago

Date upload

New data upload is based on the files provided in TestSet/MB1 and Test data/Raw

Based on the files provided, data upload for B4 and B4+ is similar and as follows:

this will show an error when uploading e.g. file L6.csv (provided in Raw)

Pendent data upload is different (raw file has > 2 columns but they are empty):

ALL types need one column containing date-time

@cailadd90 @Ale0430 does this work for you?

Ale0430 commented 2 years ago

fastPOSIXct () On my side testing origin/hydro file sI can upload data but when applying filters the app closes and an erro message shows on the console "could not find function "fastPOSIXct"

installing "fasttime" and loading the library solved this issue

Action

Ale0430 commented 2 years ago

About page

Mini Buoy model images updated to diagram figures

Actions:

mcwimm commented 2 years ago

fastPOSIXct () On my side testing origin/hydro file sI can upload data but when applying filters the app closes and an erro message shows on the console "could not find function "fastPOSIXct"

installing "fasttime" and loading the library solved this issue

Action

  • [x] H add to set-up.R file under # Package to deal with time serien -> rollmean(), fastPOSIXct() if(!require("zoo")) install.packages("zoo") if(!require("fasttime")) install.packages("fasttime")

Added fasttime package to setup file, but in hydro branch - in this branch it was still activated