Creating a Formatted HTML Document with Graphed Data with the rmarkdown Package
You can use the rmarkdown package with another Javascript-enabled package to create a formatted HTML document with graphed data.
About this task
This example uses the same data from the task described in the topic Mapping data with TERR and leaflet to create a map chart with data available on the internet. Additionally, we create a document with formatted text and an interactive map, and then display the results in a stand-alone HTML file.
- To install the required
packages, call the
install.packages()
function from the TERR console. - To run the script that creates and displays the results, call the functions from the command line.
Package link | Package short description |
---|---|
https://dplyr.tidyverse.org/ | Work with data frame-like objects, both in memory and out of memory. |
https://rstudio.github.io/leaflet/ | Create and customize interactive maps using the 'Leaflet' JavaScript library and the 'htmlwidgets' package. |
https://www.rstudio.com/wp-content/uploads/2015/02/rmarkdown-cheatsheet.pdf | Convert R Markdown documents into a variety of formats. |