Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johncoene/datamaps
📍 datamaps htmlwidget for R
https://github.com/johncoene/datamaps
datamaps htmlwidgets r visualization
Last synced: 25 days ago
JSON representation
📍 datamaps htmlwidget for R
- Host: GitHub
- URL: https://github.com/johncoene/datamaps
- Owner: JohnCoene
- License: other
- Created: 2017-03-23T08:09:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-08-27T09:46:50.000Z (about 4 years ago)
- Last Synced: 2024-05-01T15:29:23.811Z (6 months ago)
- Topics: datamaps, htmlwidgets, r, visualization
- Language: R
- Homepage: http://datamaps.john-coene.com/
- Size: 381 KB
- Stars: 23
- Watchers: 6
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# datamaps
[![Travis-CI Build Status](https://travis-ci.org/JohnCoene/datamaps.svg?branch=master)](https://travis-ci.org/JohnCoene/datamaps)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/JohnCoene/datamaps?branch=master&svg=true)](https://ci.appveyor.com/project/JohnCoene/datamaps)
[![CRAN](https://img.shields.io/cran/v/datamaps.svg)](https://img.shields.io/cran/v/datamaps.svg)
[![CRAN_Status_Badge](http://cranlogs.r-pkg.org/badges/grand-total/datamaps)](http://cranlogs.r-pkg.org/badges/grand-total/datamaps)![proxies](https://raw.githubusercontent.com/JohnCoene/projects/master/img/datamaps_proxy.gif)
R htmlwidget for [datamaps](http://datamaps.github.io/), plot choropleth, overlay arcs and bubbles, customise options, easily interact with Shiny proxies.
* [Installation](#installation)
* [Details](#info)
* [Examples](#examples)
* [Shiny Proxies](#shiny-proxies)
* [Proxies demo](http://shiny.john-coene.com/datamaps/)
* [Website](http://datamaps.john-coene.com)## Installation
```R
# CRAN release
install.packages("datamaps")# Development version
devtools::install_github("JohnCoene/datamaps")
```Development version includes 2 plugins, `add_icons` and `add_markers`.
## Info
* See [website](http://datamaps.john-coene.com/) for demos.
* Includes proxies to update the visualisation without re-drawing entire map.
* See NEWS.md for new features and bug fixes## Shiny Proxies
* `update_bubbles` - update bubbles.
* `update_choropleth` - update choropleth values.
* `update_labels` - update labels.
* `update_legend` - update the legend.
* `update_arcs` - update arcs by coordinates.
* `update_arcs_name` - update arcs by name.
* `delete_map` - delete the map.## Examples
Example proxy.
### [demo](http://shiny.john-coene.com/datamaps/)
```R
library(shiny)ui <- fluidPage(
textInput(
"from",
"Origin",
value = "USA"
),
textInput(
"to",
"Destination",
value = "RUS"
),
actionButton(
"submit",
"Draw arc"
),
datamapsOutput("map")
)server <- function(input, output){
arc <- reactive({
data.frame(from = input$from, to = input$to)
})output$map <- renderDatamaps({
datamaps()
})observeEvent(input$submit, {
datamapsProxy("map") %>%
add_data(arc()) %>%
update_arcs_name(from, to)
})}
shinyApp(ui, server)
}
```