README.md

StatusCoverage Status Doc

Helseatlas

R-package to be used to produce maps on the helseatlas.no web page.

How to install the package

# Install the data package
devtools::install_github("helseatlas/data")
# Install the maps package
devtools::install_github("helseatlas/kart")
# Install the helseatlas package
devtools::install_github("helseatlas/helseatlas")

Install the package behind a proxy

If you are behind a proxy, you have to run the following commands before the devtools::install_github-commands:

Sys.setenv(http_proxy="your.proxy.url:port")
Sys.setenv(https_proxy="your.proxy.url:port")

If you want to keep the proxy settings active when restarting R you can include the following in a file called .Renviron:

http_proxy="your.proxy.url:port"
https_proxy="your.proxy.url:port"

This file has to be saved in your $HOME directory, which typically is something like c:/Users/<username> on Windows.

How to use the package

Run the app

helseatlas::run_app()

Run a local copy of the package

git clone git@github.com:helseatlas/helseatlas

Contribute

git clone git@github.com:helseatlas/helseatlas
cd helseatlas
git checkout -b super-duper-idea
git push -u origin super-duper-idea
git add .
git commit -m 'My super duper idea'
git push

Test the package locally

The packages testhat and shinytest have to be installed if you want to test your local version of helseatlas. In addition, you must install PhantomJS. The latter can be installed with the following R command:

shinytest::installDependencies()

The package can then be tested by devtools:

devtools::test()

Update documentation

Run the following command to update the documentation in man/:

roxygen2::roxygenise()

File endings

This repository is mainly using LF (unix-style) line endings. If you are using Windows, please use git config --global core.autocrlf false if you want full control (take a look at this post). Files can be converted from Windows-style file endings to unix-style by dos2unix filename in git bash. In RStudio you can go into Tools/Global options/Code/Saving and choose Line ending conversion to None.



Helseatlas/shinymap documentation built on June 11, 2020, 3:38 a.m.