R-package to be used to produce maps on the helseatlas.no web page.
A working document on the process of going from IA to RShiny can be found here (read only).
You have the run the following command first if you are behind Helse Nord proxy:
The input to the shiny app is a data frame containing the following columns:
area level1 (level2) # optional (level3) # optional rate numerater name_numerater denominator name_denominator
If you want to test the package you can use a dataset shipped with the package, namely
Run the command
shinymap::launch_application(dataset = <dataset>)
Run the command
shinymap::launch_application(dataset = <r data frame>, publish_app = TRUE, name = <appName>, shiny_account = <publishing account>)
Make sure that the version of shinymap installed and active in your Rsession is installed directly from github, since it also has to be installed on shinyapps.io. Also remember to connect to your shinyapps.io profile.
git clone [email protected]:helseatlas/shinymap
shinymapfolder in RStudio
devtools::install_github("Helseatlas/shinymap"). This will install the shinymap package from github and at the same time install all the required packages.
healthatlas_dataand define some parametres
healthatlas_data <- shinymap::kols # or another dataset to use language <- "no" # or "en" webpage_title <- "Helseatlas kols 2013-2015"
inst/app/server.Rand push the button or
<usernamewith your github user name), create a branch and push it
git clone [email protected]:<username>/shinymap cd shinymap git checkout -b super-duper-idea git push -u origin super-duper-idea
git add . git commit -m 'My super duper idea' git push
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.