landscapemetrics shiny app/ electron app
Closed this issue · 4 comments
Hi all, as you may know, my former student @bartlomiejtyrcha created a shiny interface for {landscapemetrics} -- see https://github.com/bartlomiejtyrcha/landscapexshiny and https://mobile.twitter.com/jakub_nowosad/status/1533482030893350914.
@marcosci had suggested creating an electron app based on this shiny app, and I recently made some progress based on https://github.com/chasemc/electricShine:
- Firstly, I reorganized and simplified the shiny app - see https://github.com/bartlomiejtyrcha/landscapexshiny/tree/electron
- Then, I used the following code to create a
.exe
file on a Windows laptop:
remotes::install_github("erikvona/electricShine")
buildPath <- tempdir()
platform <- "win"
arch <- "x64"
electricShine::electrify(app_name = "landscapemetrics",
short_description = "Calculate landscape metrics",
semantic_version = "1.0.0",
build_path = buildPath,
mran_date = NULL,
cran_like_url = "https://cran.r-project.org",
function_name = "run_app",
git_host = "github",
git_repo = "bartlomiejtyrcha/landscapexshiny@electron",
local_package_path = NULL,
package_install_opts = list(type = "binary"),
nodejs_version = "14.19.2",
run_build = TRUE)
- The code above creates a
.exe
file in the tmpdir +landscapemetrics/dist/
folder. - Using the
.exe
file, I was able to install the new program; however, it does not run correctly (it hangs on the loading screen).
I am not a Windows user, thus maybe some of you can try to find what is wrong with my approach and fix it...
I also don't have access to a Windows machine anymore, sorry.
P.S. Can I just say it's funny how we wrote a publication about how the big advantage of landscapemetrics
is that it is script based approach and now you are building a GUI for it again 🙈
:D FULL CIRCLE!!!
Jakob, thought about it ... and maybe it's a better idea to make that all plumber endpoints and then bind them to an UI? Maybe that's the safer approach, given the complexity of landscapemetrics.
Full circle for sure.
Also, given https://gis.stackexchange.com/questions/357620/measuring-fragmentation-metrics-of-classified-map/357759#357759 and https://www.umass.edu/landeco/research/fragstats/downloads/fragstats_downloads.html#FRAGSTATS, I would say that an UI would be welcomed by many people...
Feel free to reopen if required, but I think for now we can close this due to missing time and priority