Produces an app that explores the item and user matrices output by our recommendation model
..Please complete..
..Please complete..
..Add any more info here if required..
See vignettes/
The R ecosystem is slightly different to that of Python and the approach to virtual environments is different. On 2019-08-02 an introduction to renv was created by the folks at RStudio. For the purposes of this template, it's recommended that we also use renv
.
To learn more about how renv
works see here.
To install the latest renv
install the following in your system-level version of R.
Note: check that R will use the proxy if on the BBC network.
file.edit('~/.Renviron') # in Rstudio, or in any text editor of your choice
then add to the file and save / write out:
https_proxy=http://www-cache.reith.bbc.co.uk:80
http_proxy=http://www-cache.reith.bbc.co.uk:80
Now you should be able to do the following:
..If anything more than R package install required, use docker..
make docker
- this will build and then run the container, will take a while the first time..Otherwise..
Option A: Using make
(the easy way):
make create_environment
To make sure your environment is stored run make package
before checking in
There are other things you can easily run using make
:
Run make help
to remind yourself:
> make help:
clean Delete all temp files (including environment)
create_environment Set up R interpreter environment
data Make Dataset
docker Run docker container, will build it first if required
docker_stop Stop the running container
make shiny Build and run shiny app
package Package dependencies to lockfile
sync_data_from_s3 Download Data from S3
sync_data_to_s3 Upload Data to S3
test Run tests inside renv
update_environment Sync Dependencies with Lockfile
Run the unit tests using make test
..If you are making use of s3 to back up data..
Data is stored here: s3://[OPTIONAL] your-bucket-for-syncing-data (do not include 's3://')
To get data:
1. Set up AWS cli on your machine, download the cli from AWS and then run something like the below on an EC2 box to generate some credentials to use:
instanceid=$( \
curl -s 'http://169.254.169.254/latest/meta-data/iam/security-credentials/'
)
curl "http://169.254.169.254/latest/meta-data/iam/security-credentials/${instanceid}"
2. Once access is granted you can run make sync_data_from_s3
to download data to use
..Include instructions on how to run your program, or get up and running with your package.
..Any more info on visualisations or where results might be saved. Under the package structure currently in use, we suggest using vignettes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.