-
Notifications
You must be signed in to change notification settings - Fork 4
/
README.Rmd
65 lines (47 loc) · 2.46 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# R Shiny app for management data input
<!-- badges: start -->
[![R-CMD-check](https://github.com/Ottis1/fieldactivity/workflows/R-CMD-check/badge.svg)](https://github.com/Ottis1/fieldactivity/actions)
<!-- badges: end -->
An app for keeping track of field activity in the [Field Observatory](https://www.fieldobservatory.org) project. Built using [Shiny](http://shiny.rstudio.com/) and [Golem](https://thinkr-open.github.io/golem/), the application allows farmers to enter information about common farming events like tillage, sowing and harvest. These event data are stored in .json files, which mostly follow the ICASA standards for agricultural data.
## Installation
<!-- You can install the released version of fieldactivity from [CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("fieldactivity")
```
-->
You can install the app from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("PecanProject/fieldactivity")
```
## Running the app
To run the app, call `run_app` with the following arguments to define the json file directory, the user database and the passphrase to the user database:
```{r example, eval=FALSE}
options(golem.app.prod = TRUE) # run in production mode to enable user authentication
fieldactivity::run_app(json_file_path = "~/my_json_file_folder",
user_db_path = "~/my_user_database.sqlite",
user_db_passphrase = "password123")
```
Check out the documentation of [Shinymanager](https://datastorm-open.github.io/shinymanager/) (the user authentication system used in the app) to find out how to create the user database. You can also use the supplied R script in `dev/create_user_db.R` for this purpose.
## Modifying the code
To modify the code, clone the repository and set the working directory in R to the package folder (or open the RStudio project file `fieldactivity.Rproj`). You should now be able to run the app by running
```{r, eval = FALSE}
golem::run_dev()
```
Modify `dev/run_dev.R` if necessary, this is the file which `golem::run_dev()` runs.
## Meta
Links that might interest you:
- [Webpage](https://pecanproject.github.io/fieldactivity/)
- [Issues](https://github.com/PecanProject/fieldactivity/issues)