Skip to content

Commit

Permalink
update README instructions for running the app
Browse files Browse the repository at this point in the history
  • Loading branch information
RWParsons committed Aug 22, 2023
1 parent a5c8c47 commit eaec500
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 25 deletions.
16 changes: 5 additions & 11 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,14 @@ knitr::opts_chunk$set(
How to test out the (still very much in development) shiny app.

1. Clone this repository and open the project in RStudio (the GitHub desktop app may be helpful).
2. Be using R version 4.1.0 or greater and have access to the following folder on U drive: `U:\Research\Projects\health\jti_research_data\jti_itraqi`
3. Run the `read-and-wrangle.R` script with the following code:
2. Be using R version 4.1.0 or greater and have access to the following folder on U drive: `U:\Research\Projects\health\jti_research_data\jti_itraqi_mapping`
3. Install `{renv}` and then run `renv::restore()`.
4. Run the shiny app using the following code.

```{r, eval=FALSE}
source("read-and-wrangle.R")
```

> You may get lots of errors/warnings to say that you don't have the necessary packages installed. Install them as they show up - I hope there's not too many for you! (I'll streamline this in the future with `{renv}`).

4. Run the shiny app using the following code (again... you might get problems with missing packages).
```{r, eval=FALSE}
shiny::runApp("app")
```

> You may get lots of errors/warnings to say that you don't have the necessary packages installed. Install them as they show up - I hope there's not too many for you! You can run `renv::restore()` to load all the necessary packages. Do this and try it again. If it doesn't work - please let me (Rex) know!
Let me (Rex) know if you have any issues!
The first time you open the app, it will need to create the base-map and this can take a while. It will create a file in your project directory (`./app/fixtures/base-map.rds`) and then when re-loading the map, it'll be faster. But this only works while you're in the same R session. When you restart R, it'll cause a bug and the map won't display. If this happens, it means that you need to delete the `base-map.rds` file at the mentioned path.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,24 @@ How to test out the (still very much in development) shiny app.
desktop app may be helpful).
2. Be using R version 4.1.0 or greater and have access to the following
folder on U drive:
`U:\Research\Projects\health\jti_research_data\jti_itraqi`
3. Run the `read-and-wrangle.R` script with the following code:
`U:\Research\Projects\health\jti_research_data\jti_itraqi_mapping`
3. Install `{renv}` and then run `renv::restore()`.
4. Run the shiny app using the following code.

``` r
source("read-and-wrangle.R")
shiny::runApp("app")
```

> You may get lots of errors/warnings to say that you don’t have the
> necessary packages installed. Install them as they show up - I hope
> there’s not too many for you! (I’ll streamline this in the future with
> `{renv}`).
4. Run the shiny app using the following code (again… you might get
problems with missing packages).

``` r
shiny::runApp("app")
```

Let me (Rex) know if you have any issues!
> there’s not too many for you! You can run `renv::restore()` to load
> all the necessary packages. Do this and try it again. If it doesn’t
> work - please let me (Rex) know!
The first time you open the app, it will need to create the base-map and
this can take a while. It will create a file in your project directory
(`./app/fixtures/base-map.rds`) and then when re-loading the map, it’ll
be faster. But this only works while you’re in the same R session. When
you restart R, it’ll cause a bug and the map won’t display. If this
happens, it means that you need to delete the `base-map.rds` file at the
mentioned path.

0 comments on commit eaec500

Please sign in to comment.