File: googleVis_examples.Rmd

package info (click to toggle)
r-cran-googlevis 0.7.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,404 kB
  • sloc: makefile: 5
file content (180 lines) | stat: -rw-r--r-- 3,662 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
---
title: "googleVis examples"
author: "Markus Gesmann and Diego de Castillo"
date: "`r Sys.Date()`"
output:
  html_document:
    toc: true
    toc_depth: 2
    toc_float:
      collapsed: false
      smooth_scroll: false
    number_sections: true
    self_contained: false
---

<!--
%\VignetteEngine{knitr::rmarkdown}
%\VignetteIndexEntry{Demonstration of googleVis}
-->


```{js, echo=FALSE}
$('.title').css('color', 'darkred')
```

# Demonstration of googleVis

It may take a little while to load all charts. Please be patient.
All charts require an Internet connection.

These examples are taken from the googleVis demo. 
You can execute the demo via
```{r demo, eval=FALSE}
library(googleVis)
demo(googleVis)
```

For more details about the charts and further examples see the 
help files of the individual googleVis function and review the 
[Google Charts API documentation](https://developers.google.com/chart/interactive/docs/gallery) and [Terms of Service](https://developers.google.com/chart/terms).

## Line chart
```{r setOptions, message=FALSE, echo=FALSE}
library(googleVis)
library(knitr)
op <- options(gvis.plot.tag='chart')
read_demo('googleVis', 'googleVis')
```
```{r testData, tidy=FALSE}
```
```{r LineChart, results='asis', tidy=FALSE}
```

### Line chart with two axis
```{r TwoAxis, results='asis', tidy=FALSE}
```

## Bar chart
```{r BarChart, results='asis', tidy=FALSE}
```

## Column chart
```{r ColumnChart, results='asis', tidy=FALSE}
```

## Area chart
```{r AreaChart, results='asis', tidy=FALSE}
```

## Stepped Area chart
```{r SteppedAreaChart, results='asis', tidy=FALSE}
```

## Combo chart
```{r ComboChart, results='asis', tidy=FALSE}
```

## Scatter chart
```{r ScatterChart, results='asis', tidy=FALSE}
```

## Bubble chart
```{r BubbleChart, results='asis', tidy=FALSE}
```

### Customizing Lines
```{r CustomizingLines, results='asis', tidy=FALSE}
```


## Customizing points
```{r ScatterChartPoints, results='asis', tidy=FALSE}
```

### Add edit button for on the fly customisation
```{r EditButton, results='asis', tidy=FALSE}
```
The same option is available for all other charts as well.

### A chart with many options set
```{r SettingOptions, results='asis', tidy=FALSE}
```

## Candlestick chart
```{r CandlestickChart, results='asis', tidy=FALSE}
```

## Pie chart
```{r PieChart, results='asis', tidy=FALSE}
```

## Gauge
```{r Gauge, results='asis', tidy=FALSE}
```


## Geo Chart
```{r GeoChart, results='asis', tidy=FALSE}
```

### Example showing US data by state
```{r USStateData, results='asis', tidy=FALSE}
```

### Show Hurricane Andrew (1992) storm track with markers
```{r GeoChartHurricaneAndrew, results='asis', tidy=FALSE}
```

## Table
```{r Table, results='asis', tidy=FALSE}
```
Click on the column header to sort the rows

### Table with pages
```{r TableWithPages, results='asis', tidy=FALSE}
```

## Org chart
```{r OrgChart, results='asis', tidy=FALSE}
```
Double click on a parent to collapse all its children.

## Tree Map
```{r TreeMap, results='asis', tidy=FALSE}
```
Left mouse-click to drill down, right mouse-click to move up a level.

## Annotation chart
```{r AnnotationChart, results='asis', tidy=FALSE}
```

## Sankey chart
```{r SankeyChart, results='asis', tidy=FALSE}
```

## Histogram
```{r Histogram, results='asis', tidy=FALSE}
```

## Calendar chart
```{r CalendarChart, results='asis', tidy=FALSE}
```

## Timeline chart
```{r Timeline, results='asis', tidy=FALSE}
```

## Gantt chart
```{r Gantt, results='asis', tidy=FALSE}
```


## Word tree chart
```{r WordTree, results='asis', tidy=FALSE}
```

## Merging charts
```{r gvisMerge, results='asis', tidy=FALSE}
```