Introduction to parsetR
来源:互联网 发布:北京育知同创怎么样 编辑:程序博客网 时间:2024/06/17 13:17
Kenton Russell
2015-09-17
Parallel Sets
Parallel sets first published by Robert Kosara in
Kosara, Robert, Fabian Bendix, and Helwig Hauser. “Parallel sets: Interactive exploration and visual analysis of categorical data.” Visualization and Computer Graphics, IEEE Transactions on 12.4 (2006): 558-568.
provide a compelling interactive method for visualizing categorical data.Jason Davies, co-author of d3.js
, implemented an extremely well-designedd3
version of parallel sets. Using the infrastructure provided by htmlwidgets
, this package parsetR
allows us to easily integrate parallel sets into our R workflow.
Installation
parsetR
is not on CRAN, so please install using devtools::install_github()
.
devtools::install_github("timelyportfolio/parsetR")
Usage
With table
In this first iteration, parsetR
is designed to work with tables
from R, such as the built-in Titanic
dataset.
library(parsetR)
## Loading required package: vcdExtra## Loading required package: vcd## Loading required package: grid## Loading required package: gnm
parset(Titanic, width = "80%", height = 400)
Here is another example with the UCBAdmissions
data, and we’ll make the lines curvy with the tension
argument.
library(parsetR)parset(UCBAdmissions, tension = 0.5, width = "80%", height = 400)
With data.frame
With a data.frame
you’ll need to tell parsetR
where to find the numeric column for now. Otherwise, it will appear as a dimension. as shown below.
# demonstrate working with non-tabledata(Alligator, package="vcdExtra")# with data.frame to demo how it doesn't workparset(Alligator, width = "80%", height = 400)
I thought it be fun to force a little JavaScript
to specify our numeric value
. I will eventually provide a more R
-like interface, but for now please learn this tiny bit of JS :).
parset( Alligator, # dimensions are the categorical columns dimensions = colnames(Alligator)[-5], # use some JavaScript to inform parset that Freq has the value value = htmlwidgets::JS("function(d){return d.count}"), width = "80%", height = 400)
Feedback
parsetR
was implemented in a couple of hours to provide a base for feedback, criticism, comments. Please help me make this thing as good as it should be.
- Introduction to parsetR
- Introduction to CGI Variables
- Introduction to Rave Reports
- Introduction to RSS
- Introduction to NMock
- An Introduction to Struts
- Links:Introduction To TDD
- Introduction to Smartphone
- Introduction to C# interface
- 第一章: Introduction to Objects
- Introduction to IoC
- An introduction to LaTeX2e
- About Introduction to Algorithms
- Introduction to MySQL Cluster
- Introduction To Alpha Blending
- An Introduction To Ajax
- Introduction to Ajax
- Introduction To Perspective Projection
- Swift 算法实战之路:链表
- 解决ScrollView下嵌套ListView、GridView显示不全的问题
- jQuery根据元素值删除数组元素的方法
- 如何查看进程的线程数?
- Hbase 学习笔记二 》hbase with MR example
- Introduction to parsetR
- Kafka深度解析
- Java Servlet 配置文件 web.xml 详解
- Android Studio--Gradle配置详解
- MSQL 查询昨天指定时间到当前时间内的数据并加入ID序号
- Kmeans算法
- ios 透明导航栏
- [Leetcode]Nim Game
- JVM参数--GC