Git Product home page Git Product logo

ctd's Introduction

ctd: a package to support the processing of CTD data

This package is in the early stages of development, and is not yet suitable for wide use. Please exercise caution, in using the package. Be sure to back up files, etc.

There are two main branches to this project. The "develop" branch is where active development takes place, including both the addition of new features and the fixes for bugs. The "master" branch is more suitable for common use.

Installation

The easy way to install the "main" branch is to execute the following commands in R.

remotes::install_github("dankelley/oce", ref="main")

whereas installing "develop" may be done with

remotes::install_github("dankelley/oce", ref="develop")

Reporting bugs and requesting new features

Please use www.github.com/dankelley/ctd/issues to report bugs or suggest new features.

ctd's People

Contributors

dankelley avatar

Stargazers

Clark Richards avatar

Watchers

 avatar  avatar Cameron Richardson avatar

ctd's Issues

crashes on some user input

I might have been typing quite quickly. I was trying to identify iTop and iBot near the peak of Atl water.

 file <- "~/data/arctic/beaufort/2012/d201211_0048.cnv"
> ctdTag(file=file)

Listening on http://127.0.0.1:5456
Warning in min(x) : no non-missing arguments to min; returning Inf
Warning in max(x) : no non-missing arguments to max; returning -Inf
Warning in min(x) : no non-missing arguments to min; returning Inf
Warning in max(x) : no non-missing arguments to max; returning -Inf
Warning: Error in plot.window: need finite 'xlim' values
  174: plot.window
  173: localWindow
  172: plot.default
  169: renderPlot [/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/ctd/shiny/ctdTag/app.R#629]
  167: func
  127: drawPlot
  113: <reactive:plotObj>
   97: drawReactive
   84: renderFunc
   83: output$plot
    2: runApp
    1: ctdTag [/Users/kelley/git/ctd/R/ctdTag.R#67]

'do not tag' button should be activated

I need to change the meaning of the isTagged column of the files table, so the initial value can mean not-evaluated-yet. Luckily, sqlite3 doesn't have a boolean type, so it's already an integer :-)

rearrange some UI items

@cameronrichrdson -- as discussed separately, perhaps this week you could have a go at

  1. making a new tab, to the left of Help, called Settings
  2. moving 'quit' to Settings
  3. moving the arrows up to the top line, where there is likely enough space

This ought to be done in a fork, with changes in a PR. Please be sure to use the exact same indentation and spacing conventions. (Do not follow what RStudio might want you to do.)

Screenshot 2023-05-15 at 3 26 08 PM

ctdTag() analyst should be a link to a table

As we link for tags and files, we should link for analyst names. That way, we could have extra info, like contact information, if desired.

I'll bump the database version number when I do this, so that ctdTag() will automatically transform old databases to this new form. That is, no user-visible changes will result.

double timestamps

It happens after 'returning nearest'

[0.001049]   returning nearest=276, relativeDistance=0.0097
[0.000086] [4.399178] findNearestLevel(x=0.1216139, y=277.1692, ..., view=T profile)
[0.001145]   returning nearest=276, relativeDistance=0.0055
[0.000094] [4.330659] findNearestLevel(x=0.1204382, y=277.0242, ..., view=T profile)
[0.000955]   returning nearest=276, relativeDistance=0.0010
[0.000089] [2.148689] keypress being handled since not plotting

Use data or state$data?

I need to think more about whether e.g. data$ylabProfile should be used, or state$data$ylabProfile. The latter makes it reactive.

I think some of the odd non-noticing (e.g. a problem with y label, noticed in a meeting with Clark and Cameron this morning) might come down to my using data* instead of state$data*. (To Cameron -- this will make sense to you at some point.)

what if user wants to tag an offscreen focus level?

Choices seem to be:

  1. Move view to show the focus (might be hard to figure out, e.g. need to communicate the zoom scale between views)
  2. Detect if the focus is offscreen, and make a notification to that effect.
  3. Only permit tagging if the focus point is onscreen.

I sort of like method 3. Perhaps @cameronrichrdson has other ideas?

files$filename should handle file path notation in a uniform manner

We want the table to be uniform, so ctdTag() can determine if the file has already been examined. But, at the moment, if I do

ctdTag(file="~/data/arctic/beaufort/2012/d201211_0047.cnv")

and later do

ctdTag(file="/Users/kelley/data/arctic/beaufort/2012/d201211_0047.cnv")

then they will appear in the database as two separate files, even though they are the same file. So, for example, if I do the first form and tag some points, but then use the second form on the same file, the points will not be tagged.

Users may use either the ~ notation or the /Users/USERNAME notation in the filesystem, with identical results, so ctdApp ought to do the same.

I think it makes sense to convert to ~ notation because that will be uniform across users, so long as they put their data files in the same locations relative to their home directories.

I will think about this for a while and then decide on what I want to do, this afternoon.

NOTE: this will be done without the user needing any action. If I do decide to go ahead with the idea, ctdTag() will translate the database when it loads it. (It already does significant changes, to maintain compatibility with two previous versions.)

ctdTag should only show y-type for profile plots

The snapshot illustrates. For a TS plot, the user should not be able to alter whether the y axis is pressure or sigmaTheta. (I will assign this to CaRi when I know the right GH username to use ... we could work on this together sometime as a learning exercise.)

Screenshot 2023-05-01 at 3 47 25 PM

Can't initialize contents in 'createDatabase'


Warning: Error in createDatabase: Must provide tagScheme
  50: stop
  49: createDatabase [/Library/Frameworks/R.framework/Versions/4.1/Resources/library/ctd/shiny/ctdTag/app.R#54]
  48: server [/Library/Frameworks/R.framework/Versions/4.1/Resources/library/ctd/shiny/ctdTag/app.R#326]
   2: runApp
   1: ctdTag [/Users/cameronrichardson/Desktop/ctd/R/ctdTag.R#74]
Error in createDatabase(dbname = dbname, tagScheme = tagScheme) : 
  Must provide tagScheme

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.