Skip to content

Commit 247b876

Browse files
committed
added ignore a file
1 parent 45b8e12 commit 247b876

File tree

4 files changed

+86
-7
lines changed

4 files changed

+86
-7
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
googleVis_pkg
2+
.Rhistory

Networks/ggvisFunctionNetwork.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
source("utilFuns.R")
22

33

4-
if(FALSE) {
54
g = getFunctionNetwork("ggvis")
65

76
library(graph)
@@ -28,12 +27,16 @@ if(FALSE) {
2827
notCalled = setdiff(notCalled, c("ggvis", "mark", grep("^(layer_|knit_print)", names(g), value = TRUE)))
2928
cg = g[ - match(notCalled, names(g))]
3029
cgr = graphNEL(names(cg), cg, "directed")
30+
31+
3132
icgr = igraph.from.graphNEL(cgr)
3233
pos = plot(icgr, vertex.size = .75, edge.arrow.size = .4, layout = layout.kamada.kawai, vertex.label.dist = .25)
3334

3435

3536
# Perhaps display the not-called functions on the sides of the plot.
3637
# can use par()$usr to get coordinates.
3738

39+
# Exercise: How do we igraph to plot these for us?
40+
3841
# Rgraphviz
39-
}
42+

Topics.html

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,72 @@ <h1></h1>
1010
<dt>
1111
<li>Networks/Graphs - nodes and edges</li>
1212
<dd>
13+
<li> igraph
1314
<ul>
1415
<li><a href="Networks/ggvisFunctionNetwork.R" >Networks/ggvisFunctionNetwork.R</a></li>
15-
</ul>
16+
</ul>
17+
</li>
18+
19+
<ul>
20+
<li> <a href="http://igraph.org/r/doc/layout.html" >http://igraph.org/r/doc/layout.html</a></li>
21+
<li><a href="http://igraph.org/r/doc/plot.common.html" >http://igraph.org/r/doc/plot.common.html</a></li>
22+
</ul>
23+
24+
<li>Rgraphviz</li>
25+
1626

1727
<dt>
18-
<li>Maps</li>
28+
<li>Maps</li>
1929
<dd>
30+
Two approaches. C
31+
<li>maps</li>
32+
<li>rworldmap</li>
33+
<li>RgoogleMaps</li>
34+
<li>ggmap</li>
35+
<li>OpenStreetMap</li>
36+
37+
<li>leafletR</li>
38+
<ul>Google Earth and KML
39+
<ul>
40+
<li>plotKML</li>
41+
<li>RKML</li>
42+
</ul>
43+
</ul>
44+
</dl>
2045

46+
47+
<h2>Interaction and Animation</h2>
48+
49+
<dl>
2150
<dt>
22-
<li>Interaction and Animation</li>
51+
<li>Simple Animation</li>
2352
<dd>
24-
53+
<ul>
54+
<li>animation package</li>
55+
</ul>
56+
57+
58+
<dt>
59+
<li>Basics of HTML, CSS, JavaScript</li>
60+
<dd>
61+
<ul>
62+
<li><a href="JSEg/jsEg.html" >jsEg.html</a></li>
63+
<li><a href="JSEg/jsAutoEg.html" >jsAutoEg.html</a></li>
64+
</ul>
65+
66+
67+
<dt>
68+
<li>D3 - Data Driven Documents</li>
69+
<dd>
70+
<ul>
71+
<li><a href="https://github.com/mbostock/d3/wiki/Gallery" >Gallery</a></li>
72+
</ul>
2573
</dl>
2674

2775

76+
2877
<hr>
2978
<address><a href="http://www.stat.ucdavis.edu/~duncan">Duncan Temple Lang</a>
3079
<a href=mailto:duncan@r-project.org>&lt;duncan@r-project.org&gt;</a></address>
31-
<!-- hhmts start --> Last modified: Fri Apr 24 20:11:08 PDT 2015 <!-- hhmts end -->
80+
<!-- hhmts start --> Last modified: Sat Apr 25 04:39:12 PDT 2015 <!-- hhmts end -->
3281
</body> </html>

rCharts/maps.R

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
library(rCharts)
2+
3+
4+
load("../shinyHousePrices/housing.rda")
5+
6+
map <- Leaflet$new()
7+
map$setView(c(37.8717, -122.27), zoom = 8)
8+
countyCoords =
9+
list(Sonoma = c(38.288, -122.4589),
10+
Napa = c(38.3047, -122.2989),
11+
Alameda = c(37.7561, -122.2744),
12+
"Contra Costa" = c(37.9300, -121.9500),
13+
"San Mateo" = c(37.5542, -122.3131),
14+
"Marin" = c(38.0400, -122.7400),
15+
"San Francisco" = c(37.7833, -122.4167),
16+
Solano = c(38.270, -121.9400),
17+
"Santa Clara" = c(37.3600, -121.9700))
18+
19+
invisible(mapply(function(id, coords, pricePerSqft)
20+
map$marker(coords, bindPopup = sprintf("<p>%s: price/square foott = %d</p>", id, pricePerSqft)),
21+
names(countyCoords), countyCoords,
22+
as.integer(by(housing, housing$county, function(d) median(d$price/d$bsqft, na.rm = TRUE)))))
23+
24+
#map$print("chart7") # for generate the file
25+
print(map) # need to explicitly print it in case we source() this file.

0 commit comments

Comments
 (0)