RMaps
Interactive Maps from R
Install / Use
/learn @ramnathv/RMapsREADME
rMaps
rMaps is an R package to create, customize and publish interactive maps from R. It supports multiple mapping libraries, including leaflet, datamaps and crosslet
Installation
You can install rMaps from github using the devtools package. You will also need to install the dev version of rCharts, that contains several experimental features, required by rMaps.
require(devtools)
install_github('ramnathv/rCharts@dev')
install_github('ramnathv/rMaps')
Quick Start
Here are some quick examples to get you started.
Example 1: CrossLet
CrossLet is an amazing mappling library that combines Leaflet and CrossFilter, allowing one to create awesome visualizations. rMaps wraps CrossLet and provides R users with a simple interface to access its features.
library(rMaps)
crosslet(
x = "country",
y = c("web_index", "universal_access", "impact_empowerment", "freedom_openness"),
data = web_index
)
<img src='http://i.imgur.com/zQ6mixC.png?1' width=100%></img>
Example 2: DataMaps
DataMaps uses D3.js to create customizable SVG map visualizations in a single Javscript file. rMaps provides a simple wrapper around DataMaps and also extends its features using AngularJS.
ichoropleth(Crime ~ State, data = subset(violent_crime, Year == 2010))
ichoropleth(Crime ~ State, data = violent_crime, animate = "Year")
ichoropleth(Crime ~ State, data = violent_crime, animate = "Year", play = TRUE)
<img src='https://f.cloud.github.com/assets/346288/2117416/ab4aaaf6-90ca-11e3-8f3a-b03b8021737e.png' width=100%></img>
Example 3: Leaflet
map <- Leaflet$new()
map$setView(c(51.505, -0.09), zoom = 13)
map$tileLayer(provider = 'Stamen.Watercolor')
map$marker(
c(51.5, -0.09),
bindPopup = 'Hi. I am a popup'
)
map
<img src='http://i.imgur.com/zF4EDx2.png' width=100%></img>
Credits
rMaps would have not been possible without these amazing mapping libraries written in javascript
License
rMaps is licensed under the MIT License. However, the JavaScript charting libraries that are included with this package are licensed under their own terms. All of them are free for non-commercial and commercial use. For more details on the licensing terms, you can consult the License.md file in each of the charting libraries.
Related Skills
node-connect
347.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
