Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilri/feast-data-shiny
https://github.com/ilri/feast-data-shiny
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ilri/feast-data-shiny
- Owner: ilri
- License: mit
- Created: 2020-11-17T09:47:52.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-20T10:36:54.000Z (10 months ago)
- Last Synced: 2024-03-26T01:54:00.951Z (9 months ago)
- Language: R
- Size: 121 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Feed Assessment Tool (FEAST) data repository - Shiny download and visualisation applications
This repository hosts the R-Shiny code to download and visualise data stored in the [FEAST Global Data Repository](https://feastdata.ilri.org/).
There are two seperate applications for download and visualise functions.[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
## CHANGELOG
## Documentation
* [Shiny server set-up](#shiny-server-set-up)
* [Required packages](#required-packages)
* [Run the applications](#run-the-applications)### Shiny server set-up
On an Ubuntu GNU/Linux system, install R (>4.0.0) and follow [this guide](https://rstudio.com/products/shiny/download-server/ubuntu/)```console
$ sudo apt install r-base
$ sudo su - -c "R -e \"install.packages('shiny', repos='https://cran.rstudio.com/')\""
```Follow instructions in [the Shiny-server wiki](https://github.com/rstudio/shiny-server/wiki/Building-Shiny-Server-from-Source).
Run and test your Shiny-server implementation:
```console
$ sudo systemctl start shiny-server
```For troubleshooting, see the [Shiny-server administrator's guide](https://docs.rstudio.com/shiny-server/).
### Required packages
Install R package dependencies```console
$ sudo apt install build-essential libfontconfig1-dev libcairo2-dev gfortran libcurl4-openssl-dev libssl-dev libgit2-dev libudunits2-dev libxt-dev gdal-bin libgdal-dev
```Install R packages:
```console
$ sudo su -
# R -e "install.packages(c('RMariaDB', 'DBI', 'pool', 'dplyr', 'ggplot2', 'DT', 'devtools', 'shinyjs', 'openxlsx', 'leaflet', 'wesanderson', 'ggthemes', 'ggsci', 'cowplot', 'plotly', 'shinydashboard', 'shinyWidgets', 'dbplyr', 'svglite', 'Cairo', 'jsonlite', 'raster', 'sf', 'readr', 'shinydisconnect'), repos='https://cran.rstudio.com/')"
```
Alternative to sf: `exactextractr` and `geojsonsf` (more efficient than sf_read).### Run the applications
Enter the database name, host, username and password in the two `Global.R` files.Change file permissions recursively for www folders in Downloads and Visualise
Test application in R:
```console
$ R
> library(shiny)
> runApp(/srv/Shiny/Download/, launch.browser = F)
```### Acknowledgement
This research was conducted as part of the [CGIAR](https://www.cgiar.org/) Research Program on Livestock and is supported by contributors to the [CGIAR Trust Fund](https://www.cgiar.org/funders/). CGIAR is a global research partnership for a food-secure future. Its science is carried out by 15 Research Centers in close collaboration with hundreds of partners across the globe.