Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

altitude operations #191

Merged
merged 13 commits into from
Dec 20, 2023
Merged

altitude operations #191

merged 13 commits into from
Dec 20, 2023

Conversation

mgross
Copy link
Contributor

@mgross mgross commented Nov 9, 2023

Now it is possible to create altitude/elevation maps (data comes from package elevatr):
grafik

grafik.

Also custom maps are now possible (user must provide longitude (x), latitude (y) and value (x) data; note that each possible x-y combination must exist, i.e. full data matrix):
grafik

Weighting inside LocatoR with said altitude map (or any other map) is possible.
We have the option to set negative weighting values to 0 and to apply inverse exponential decay weighting. In the latter case, we can apply a halftime. This can make sense when we weight with altitude for example:
For a half-time of 1000m, locations with 1000 altitude get half the probability, with 2000m 1/4 of the probability and so forth.

Using Lives 13C data with 13C -18/1 as point gives this without weighting:
grafik
However with weighting, higher altitudes are downweighted:
grafik
With negative values set to zero weight oceans and areas below sealevel get 0 weight:
grafik

@mgross mgross requested a review from arunge November 9, 2023 15:41
@mgross
Copy link
Contributor Author

mgross commented Nov 9, 2023

@arunge : Could you check this?

@arunge
Copy link
Contributor

arunge commented Nov 10, 2023

@mgross Unfortunately, this feature requires a higher version of elevatr than we have currently running, that is why the checks fail:
image

Possibly, you need exactly version 0.99.0 of elevatr, correct?

I need to discuss with @jan-abel-inwt what way is best for our system to get the higher version into our docker container.
I will update you when we found a solution!

@arunge arunge self-assigned this Nov 10, 2023
@arunge arunge added enhancement New feature or request IsoMemo App labels Nov 10, 2023
@mgross
Copy link
Contributor Author

mgross commented Nov 10, 2023

@arunge, I can try with 0.4.2

@mgross
Copy link
Contributor Author

mgross commented Nov 10, 2023

@arunge ok, it also works for older version

Copy link
Contributor

@arunge arunge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • In general, the feature seems to work, I have some minor suggestions.
  • However, I tested to create a new elevation map from scratch. I did not upload or import any data. After naming the map and pressing Run a progress bar occurs, but nothing seems to happen after that. (The main panel remains empty.)
  • Checking "Saved maps" gives a new map, but it looks empty. The thumbnail seems not to be there:
    https://github.com/Pandora-IsoMemo/iso-app/blob/f549072ddfb8bcd9ed7dfc1ac7144c5c41d01c97/R/04-savedMapsModule.R#L43
    image
  • Only after selecting to load the map, the map becomes visible. Could we display the map directly after it was created in the main panel, without having to load the map?
    image
  • Additionally, an error occured in some if-clause, could you check and fix this?
    image

If you need some assistance regarding the display of the map, please let me know.

DESCRIPTION Outdated
@@ -1,6 +1,6 @@
Package: MpiIsoApp
Title: Pandora & IsoMemo spatiotemporal modeling
Version: 23.10.1
Version: 23.11.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Version: 23.11.1
Version: 23.11.0

NEWS.md Outdated
@@ -1,6 +1,14 @@
# MpiIsoApp development version

## Version 23.10.0
## Version 23.11.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Version 23.11.1
## Version 23.11.0

@arunge arunge assigned mgross and unassigned arunge Nov 16, 2023
@mgross
Copy link
Contributor Author

mgross commented Nov 17, 2023

@arunge: should be working now

Copy link
Contributor

@arunge arunge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you not just remove the code that is not needed for this case?

Comment on lines +548 to +552
# mapName <- trimws(input$saveMapName)
# if (mapName == "") {
# alert("Please provide a map name")
# return()
# }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, just remove the comments if this is not needed in this case.

R/03-mapDiff.R Outdated
Comment on lines 828 to 848
# map <- createSavedMap(
# model = XPred,
# predictions = XPred,
# plot = recordPlot({
# plot.new()
# text(
# x = 0.5,
# y = 0.5,
# paste0("Custom map"),
# cex = 5
# )
# }),
# type = "user",
# name = mapName
# )
# maps <- savedMaps()
# maps[[length(maps) + 1]] <- map
# savedMaps(maps)
#
# alert(paste0("Map '", mapName, "' was saved"))
# updateTextInput(session, "saveMapName", value = "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

Merge branch 'beta' into altitude_operations

# Conflicts:
#	DESCRIPTION
#	NEWS.md
Merge branch 'beta' into altitude_operations

# Conflicts:
#	DESCRIPTION
#	NEWS.md
@arunge
Copy link
Contributor

arunge commented Dec 5, 2023

@mgross I merged some fixes from the beta into this feature branch. It is just open to remove the comments mentioned above. I could also do this and merge afterwards. Just let me know if you need something. 😊

Merge branch 'beta' into altitude_operations

# Conflicts:
#	DESCRIPTION
#	NEWS.md
@arunge arunge merged commit 5a66c3a into beta Dec 20, 2023
1 check passed
@arunge arunge deleted the altitude_operations branch December 20, 2023 18:40
arunge added a commit that referenced this pull request Apr 30, 2024
* altitude operations (#191)

* altitude operations

* Fix

* set default differently

* make data points selectable in locateR

* update news

* Fix for older version

* fixes

* fix progress message

* remove comments

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* Fix error with mask (#208)

* add new tests

* extract function centerPlotData

* add tryCatch to plotting of map, add data preview, add logDebugs

* remove deprecated parameter 'mainfolder', add data preview

* update news.md

* catch failing of maskDraw if no data

* update news.md

* fix issue when drawing only centroids, add test

* add tryCatch to left plotting functions

---------

Co-authored-by: Marcus Groß <marcus.gross@inwt-statistics.de>
arunge added a commit that referenced this pull request Jul 1, 2024
* altitude operations (#191)

* altitude operations

* Fix

* set default differently

* make data points selectable in locateR

* update news

* Fix for older version

* fixes

* fix progress message

* remove comments

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* Fix error with mask (#208)

* add new tests

* extract function centerPlotData

* add tryCatch to plotting of map, add data preview, add logDebugs

* remove deprecated parameter 'mainfolder', add data preview

* update news.md

* catch failing of maskDraw if no data

* update news.md

* fix issue when drawing only centroids, add test

* add tryCatch to left plotting functions

* Version 24.05.0: Feat/202 contour maps (#210)

* option to use simple contour map, some formatting

* update news.md

* Feat/169 centering of coordinates (#215)

* new functions and ui input

* align values

* center predictions

* UI to center data coordinates before modelling

* add logic to center data before modelling to different modelling tabs

* add logic

* remove comments

* update news.md

* update news.md

* rename input to prevent confusion with parameter from batch mode

* extract processing of coordinate data

* extract and apply data augmentation

* fix issue with wrong default zoom when switching the map center

* add more docu

* more docu

* update test because of new logic

* add a vignette to the package about the processing of coordinate data

* update news.md

* fix for data augmentation

* Version 24.05.2: option to select a specific color for "fixed" point colour (#216)

* option to select a specific color for "fixed" point colour

* new button to apply point settings and the logic

* update news.md

* update tests after adding new input

* fix news.md

* MpiIsoApp 24.05.3: Bugfix missing lat/long (#219)

* BUG!!

* Bugfix

* update news.md

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* MpiIsoApp 24.05.4: fix warning (#217)

* fix warning

* extract updatePenalty function

* update news.md

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* MpiIsoApp 24.05.5: optionally download savedMaps (#222)

* optionally download savedMaps

* format new UI

* MpiIsoApp 24.05.6: option to export all plots from savedMaps (#223)

* option to export all plots from savedMaps

* remove not required

* picker input to select savedMaps for download

* shift code

* update news.md

* fix issue with missing thumbnail plot

* return empty list if missing

* cleaner return

* remove option to download savedMaps objects

* add docu

* add param to docu

* MpiIsoApp 24.05.7: Feat/224 warning if creating prob map (#225)

* fix issue with missing thumbnails, fix pch value

* update news.md

* set pch to NA

* remove warning

* replace deprecated package name

---------

Co-authored-by: Marcus Groß <marcus.gross@inwt-statistics.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request IsoMemo App
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants