Open javierfajnolla opened 3 years ago
Thank you for the workaround. Any chance you can add a reference in your readme to the instructions noted in this issue? It took me a while to find this information.
Dear authors,
I would be interested in using your app. I tried following the workaround to run the app locally, but I got the following warnings and errors:
Warning: Navigation containers expect a collection of bslib::nav()
/shiny::tabPanel()
s and/or bslib::nav_menu()
/shiny::navbarMenu()
s. Consider using header
or footer
if you wish to place content above (or below) every panel's contents.
Warning: Navigation containers expect a collection of bslib::nav()
/shiny::tabPanel()
s and/or bslib::nav_menu()
/shiny::navbarMenu()
s. Consider using header
or footer
if you wish to place content above (or below) every panel's contents.
Warning: Navigation containers expect a collection of bslib::nav()
/shiny::tabPanel()
s and/or bslib::nav_menu()
/shiny::navbarMenu()
s. Consider using header
or footer
if you wish to place content above (or below) every panel's contents.
Warning: Navigation containers expect a collection of bslib::nav()
/shiny::tabPanel()
s and/or bslib::nav_menu()
/shiny::navbarMenu()
s. Consider using header
or footer
if you wish to place content above (or below) every panel's contents.
Warning: Navigation containers expect a collection of bslib::nav()
/shiny::tabPanel()
s and/or bslib::nav_menu()
/shiny::navbarMenu()
s. Consider using header
or footer
if you wish to place content above (or below) every panel's contents.
Warning: Error in .as_Spatial: empty geometries are not supported by sp classes: conversion failed
61: stop
60: .as_Spatial
59: as_Spatial
58: asMethod
57: as
55: FUN
54: lapply
53: st_as_sfc.SpatialPolygons
51: st_as_sf.Spatial
1: runApp
Error in .as_Spatial(from, cast, IDs) :
empty geometries are not supported by sp classes: conversion failed.
Could you suggest a solution to fix the problem?
I really appreciate any help you can provide.
Best regards
Hi @eb1983, and sorry that you found that issue and that the app is not yet working online. To be honest, I am not sure what the error is. It suggest a problem reading some of the spatial data that comes with the app. I suppose you downloaded the zip folder and tried to run the app without adding, removing, or moving the location of the files bundled within the app folder, as per the instructions above? If you send me an email (kindly find it on the MEE paper) I might be able to follow up and then report back here.
Hi @javierfajnolla and @eb1983,
I got the same error (Error in .as_Spatial: empty geometries are not supported by sp classes: conversion failed). I fixed it using the terra package to convert the SpatialPolygonsDataFrame to SpatVector before converting to sf object:
So, in the line 24 of server.R file, instead of:
world_sf <- st_as_sf(world_map)
I used:
world_sf <- st_as_sf(terra::vect(world_map))
Dear all,
Thanks to the kind emails of many, we know now that the link of the App is not working. We are working on solving this and will try to get it back online as soon as possible. Meanwhile, we provide here a workaround to run the app locally. This is equivalent to using the old link for the local version linked on the App and in this same GitHub page, but the link includes a version that has been updated to avoid the most common problems people have found. Hope this one works for most! And again, sorry for the inconvenience, and thanks for the interest in using GCMcompareR. All the best, Javier
(beware of the size of the file, ~8.5Gb)
Unzip the file in your hard drive, so you get a folder containing the app and data. Do not remove or change the location of any of the files, or the app won’t work correctly.
Open the .Rproj file to launch RStudio using the app’s RStudio project
You could launch the app at this point by clicking on the “Run app” button that you will see if you open either “ui.R” or “server.R” in the Rstudio session. You could open any of those files directly from your browser or from RStudio itself.
Be sure to have all needed libraries and dependencies installed a) Beware that you need a few R libraries to be installed in order for the app to work. The needed libraries are detailed at the beginning of both packages. Be sure to install manually the needed libraries. If you are unsure, I think that the following code will do it:
install.packages("shiny", "tidyverse", "kableExtra", "raster", "plotly", "leaflet", "leaflet.extras", "ggrepel", "sp", "sf", "rgdal", "fasterize", "maps", "maptools", "shinythemes", "shinyjs", "shinycssloaders", "plotly")
(Please, ensure that the installation of all libraries is successful, or the app won’t work. If any of the libraries fails to install, try to google the problem and install it.)
b) For the option to download PDF reports after execution of the app to work, you will need to have “Tinytex” installed. This is used to produce PDFs, and you might install it following the instructions here: https://yihui.org/tinytex/. Without this, the app should still work fine but will fail to produce the PDF.