CRAN_Status_Badge Research software impact Build Status

recmap - Compute the Rectangular Statistical Cartogram

This package implementats of the RecMap construction algorithm (MP2).

Installation

from CRAN

recmap requires R 3.3 or later.

Released and tested versions of recmap are available via CRAN, and can be installed using the following code

install.packages('recmap')

from github

the code below installs the latest development version

install.packages('devtools')
library(devtools)
install_github('cpanse/recmap', build_vignettes = TRUE, quiet = FALSE)
browseVignettes('recmap')

Use the docker public | automated build recmap image

this image contains the latest build.

docker pull cpanse/recmap \
&& docker run -d -p 8791:8787 cpanse/recmap

connect to http://yourdockerhost:8791 using a web browser

or stand alone

docker run -it -p 8787:8787 cpanse/recmap R -e "library(shiny); recmap_shiny <- system.file('shiny-examples', package = 'recmap'); shiny::runApp(recmap_shiny, display.mode = 'normal', port=8787, host='0.0.0.0')"

connect to the docker host:8787

Documentation

The package ships with a package vignette (browseVignettes('recmap')) and a reference manual (just type ?recmap on the R shell). Both documents are also available on the package’s CRAN page. A white paper containing more technical information and examples is available through jss.v086.c01.

Demonstration

interactive shiny application

# Requires to install suggested  packages
pkgs <- c('colorspace', 'maps', 'noncensus', 'shiny')
pkgs <- pkgs[(!pkgs %in% unique(installed.packages()[,'Package']))]
if(length(pkgs) > 0){install.packages(pkgs)}

library(shiny)
recmap_shiny <- system.file('shiny-examples', package = 'recmap')
shiny::runApp(recmap_shiny, display.mode = 'normal')

if you want to run the recmap shiny demonstration as stand-alone application using Linux and Apple systems use the Terminal application add the following code to your alias file, e.g., $HOME/.bashrc

alias recmapShiny="R -e \"library(shiny); \
  recmap_shiny <- system.file('shiny-examples', package = 'recmap'); \
  shiny::runApp(recmap_shiny, display.mode = 'normal', launch.browser=TRUE)\""