forked from hist3907b-winter2015/presentations
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.Rhistory
512 lines (512 loc) · 38.8 KB
/
.Rhistory
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
networkData <- data.frame(src, target)
simpleNetwork(networkData) + theme_xkcd()
simpleNetwork(networkData)
simpleNetwork(networkData) + theme (text = element_text(size = 16, family = "xkcd")
simpleNetwork(networkData) + theme (text = element_text(size = 16, family = "xkcd"))
netplot <- ggplot(networkData)
devtools::install_github("briatte/ggnet")
ggnet2(networkData)
library(ggnet)
ggnet2(networkData)
ggnet(networkData)
net = rgraph(10, mode = "graph", tprob = 0.5)
net = network(net, directed = FALSE)
network.vertex.names(net) = letters[1:10]
ggnet2(net)
networkData <- data.frame(src, target)
URL <- paste0(
"https://gist.githubusercontent.com/shawngraham/65a2c35f077605e7b99e/raw/32d4e55e272a69d6ff346f9609fb3a68cb4a7624",
"archaeogaming-map.json")
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
URL <- paste0(
"https://gist.githubusercontent.com/shawngraham/65a2c35f077605e7b99e/raw/32d4e55e272a69d6ff346f9609fb3a68cb4a7624",
"/archaeogaming-map.json")
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
Flare$children = Flare$children[1:3]
radialNetwork(List = Flare, fontSize = 10, opacity = 0.9)
URL <- paste0(
"https://gist.githubusercontent.com/shawngraham/65a2c35f077605e7b99e/raw/32d4e55e272a69d6ff346f9609fb3a68cb4a7624/archaeogaming-map.json")
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
Flare$children = Flare$children[1:3]
radialNetwork(List = Flare, fontSize = 10, opacity = 0.9)
diagonalNetwork(List = Flare, fontSize = 10, opacity = 0.9)
simpleNetwork(networkData)
simpleNetwork(List)
diagonalNetwork(List = Flare, fontSize = 10, opacity = 0.9)
simpleNetwork(List = Flare)
simpleNetwork(Flare)
simpleNetwork(URL)
archaeogamingmap <- data.frame(Flare)
simpleNetwork(archaeogamingmap)
diagonalNetwork(List = Flare, fontSize = 10, opacity = 0.9)
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
Flare$children = Flare$children[1:3]
diagonalNetwork(List = Flare, fontSize = 10, opacity = 0.9)
Flare$children = Flare$children[1:5]
diagonalNetwork(List = Flare, fontSize = 10, opacity = 0.9)
archaeogamingmap <- data.frame(Flare)
simpleNetwork(archaeogamingmap)
src <- c("Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Philosophy","Philosophy","Philosophy","Philosophy","Reception","Reception","Reception","Reception","Reception","Reception","Game Development","Game Development","Game Development","Game Development","Game Development","Game Development","Game Development","Game Development","Machine-created culture","Machine-created culture","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","Material culture","Material culture","Material culture","Material culture","Material culture")
target <- c("Real-world archaeology of video game hardware and software","Videogame or virtual world as archaeological site","Philosophy","Reception","Game Development","Machine-created culture","The archaeology of ...game title...","Material culture","Atari Burial Ground","History of use and object biography","Conservation and preservation","Establishing chronology and typology of games","Gaming spaces eg arcages","History of personal or commercial use","Archiving and Game History","Version control patches and damnatio memoriae","Tool definition and creation for in-world archaeology","Application of real-world methods to virtual spaces","Glitches as artifacts","Game as artifact or the space betwewen the hardware and the illusion of a world in game","In-world garbology","Survey Landscape Underwater Exoarchaeology","Quantum entanglement in video games","Perception","Complexity and chaos and algorithms","Deism and world-building","Archaeologists as playable characters","Archaeologists as non-playable characters or AI","In-world looting and or auctioning of in-game inventory","Public perception of archaeology and archaeologists","Developer perception and promotion of archaeology and archaeologists","In-game depictions or reenactments of real-world historical events","Archaeological consulting with studios","Archaeologists as game makers","Developer influence and design choices","Games as archaeology teaching tools","Augmented reality for play tourism or education","3d modeling and space-creation or recreations of antiquity both real or imagined","Lore and lore communities","Code and source as epigraphy and palaeography","Virtual ethnography","Procedurally generated environments and artifacts","Minecraft","Elder Scrolls","World of Warcraft","Fallout","Mass Effect","etc","Real and virtual commerce economics and numismatics","Real-world manifestation of virtual world artifacts","Cosplay and game-derived experimental archaeology","In-world museums","Real-world museums")
networkData <- data.frame(src, target)
simpleNetwork(networkData)
target <- c("Real-world archaeology of video game hardware and software","Videogame or virtual world as archaeological site","Philosophy","Reception","Game Development","Machine-created culture","The archaeology of ...game title...","Material culture","Atari Burial Ground","History of use and object biography","Conservation and preservation","Establishing chronology and typology of games","Gaming spaces eg arcages","History of personal or commercial use","Archiving and Game History","Version control patches and damnatio memoriae","Tool definition and creation for in-world archaeology","Application of real-world methods to virtual spaces","Glitches as artifacts","Game as artifact or the space betwewen the hardware and the illusion of a world in game","In-world garbology","Survey Landscape Underwater Exoarchaeology","Quantum entanglement in video games","Perception","Complexity and chaos and algorithms","Deism and world-building","Archaeologists as playable characters","Archaeologists as non-playable characters or AI","In-world looting and or auctioning of in-game inventory","Public perception of archaeology and archaeologists","Developer perception and promotion of archaeology and archaeologists","In-game depictions or reenactments of real-world historical events","Archaeological consulting with studios","Archaeologists as game makers","Developer influence and design choices","Games as archaeology teaching tools","Augmented reality for play tourism or education","3d modeling and space-creation or recreations of antiquity both real or imagined","Lore and lore communities","Code and source as epigraphy and palaeography","Virtual ethnography","Procedurally generated environments and artifacts","Minecraft","Elder Scrolls","World of Warcraft","Fallout","Mass Effect","etc","Real and virtual commerce economics and numismatics","Real-world manifestation of virtual world artifacts","Cosplay and game-derived experimental archaeology","In-world museums","Real-world museum")
archaeogamingmap <- data.frame(src, target)
Flare <- archaeogamingmap
Flare$children = Flare$children[1:5]
diagonalNetwork(List = Flare, fontSize = 10, opacity = 0.9)
simpleNetwork(networkData) + theme (text = element_text(size = 16, family = "xkcd"))
simpleNetwork(networkData)
diagonalNetwork(List = networkData, fontSize = 10, opacity = 0.9)
diagonalNetwork(networkData, fontSize = 10, opacity = 0.9)
p <- ggplot() + geom_point(aes(x=mpg, y=wt), data=mtcars) + theme (text = element_text(size = 16, family = "xkcd"))
p
simpleNetwork(networkData) + theme (text = element_text(size = 16, family = "xkcd"))
simpleNetwork(networkData) + theme ("xkcd")
URL <- paste0(
"https://cdn.rawgit.com/christophergandrud/networkD3/",
"master/JSONdata//flare.json")
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
Flare$children = Flare$children[1:3]
radialNetwork(List = Flare, fontSize = 10, opacity = 0.9)
URL <- paste0(
"https://gist.githubusercontent.com/shawngraham/5da8114b3e13cf36ceb6/raw/",
"b64a7cd4566164dcca7ca3ec2064f0108dda564a//archaeogamingmap2.json")
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
Flare$children = Flare$children[1:3]
radialNetwork(List = Flare, fontSize = 10, opacity = 0.9)
"https://gist.githubusercontent.com/shawngraham/2bfad0c10e7519a630a9/raw/",
URL <- paste0(
"https://gist.githubusercontent.com/shawngraham/2bfad0c10e7519a630a9/raw/",
"d230e753f8f164fdd2028dbdb485b62cecd97f84//archaeomap-flare.json")
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
Flare$children = Flare$children[1:3]
radialNetwork(List = Flare, fontSize = 10, opacity = 0.9)
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
radialNetwork(List = Flare, fontSize = 10, opacity = 0.9)
diagonalNetwork(List = Flare, fontSize = 10, opacity = 0.9)
URL <- paste0(
"https://gist.githubusercontent.com/shawngraham/2bfad0c10e7519a630a9/raw/",
"d230e753f8f164fdd2028dbdb485b62cecd97f84//archaeomap-flare.json")
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
radialNetwork(List = Flare, fontSize = 10, opacity = 0.9)
URL <- paste0(
"https://gist.githubusercontent.com/shawngraham/2bfad0c10e7519a630a9/raw/",
"7a7a2da8c4358a81e0dc05cc64405d7c9f975803/archaeomap-flare.json")
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
radialNetwork(List = Flare, fontSize = 10, opacity = 0.9)
diagonalNetwork(List = Flare, fontSize = 10, opacity = 0.9)
simpleNetwork(networkData)
diagonalNetwork(List = Flare, fontSize = 10, opacity = 0.9) + theme (text = element_text(size = 16, family = "xkcd"))
diagonalNetwork(List = Flare, fontSize = 10, opacity = 0.9 + theme (text = element_text(size = 16, family = "xkcd"))
diagonalNetwork(List = Flare, fontSize = 10, opacity = 0.9, theme (text = element_text(size = 16, family = "xkcd"))
diagonalNetwork(List = Flare, fontSize = 10, font = "xkcd" opacity = 0.9)
diagonalNetwork(List = Flare, fontSize = 10, font = "xkcd" opacity = 0.9)
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd" opacity = 0.9)
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9)
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, main= "Archaeogaming!")
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, label= "Archaeogaming!")
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, title= "Archaeogaming!")
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, label= "Archaeogaming!")
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, title(main= "Archaeogaming!")
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, title(main= "Archaeogaming!"))
p <- diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9)
p
plot(p)
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, label c())
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, label ="a")
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9)
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, width = 500)
ggnetw(archaeogamingmap)
ggnet2(archaeogamingmap)
ggnet2(archaeogamingmap)
volunteers <- data.frame(year=c(2007:2011),
number=c(56470, 56998,59686, 61783, 64251))
p <- ggplot() + xkcdrect(aes(xmin = year,
xmax= year +0.3,
ymin=number,
ymax = number + 3600),
volunteers,
fill="red", colour="black")
p
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, width = 500)
p <- diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, width = 500)
p <- diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, width = 500) + theme_xkcd()
p
p <- diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, width = 1200)
p
p <- diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, width = 500)
library(networkD3)
library(xkcd)
URL <- paste0(
"https://gist.githubusercontent.com/shawngraham/2bfad0c10e7519a630a9/raw/",
"7a7a2da8c4358a81e0dc05cc64405d7c9f975803/archaeomap-flare.json")
## Convert to list format
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
# Use subset of data for more readable diagram
radialNetwork(List = Flare, fontSize = 10, opacity = 0.9)
p <- diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, width = 500)
p
pdf("myfile.pdf")
pdf(p, "myfile.pdf")
pdf(p, "myfile.pdf")
pwd()
pwd()
getwd()
pdf(p, "myfile.pdf")
pdf()
install.packages("knitr")
library('knitr')
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, width = 500)
radialNetwork(List = Flare, fontSize = 10, opacity = 0.9, fontFamily = "xkcd")
URL <- paste0(
"https://gist.githubusercontent.com/shawngraham/2bfad0c10e7519a630a9/raw/",
"7a7a2da8c4358a81e0dc05cc64405d7c9f975803/archaeomap-flare.json")
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, width = 500)
URL <- paste0(
"https://gist.githubusercontent.com/shawngraham/2bfad0c10e7519a630a9/raw/",
"f0b5086f35b5322b451668c2b34ebcade297ff30/archaeomap-flare.json")
## Convert to list format
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, width = 500)
src <- c("Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Philosophy","Philosophy","Philosophy","Philosophy","Reception","Reception","Reception","Reception","Reception","Reception","Game Development","Game Development","Game Development","Game Development","Game Development","Game Development","Game Development","Game Development","Machine-created culture","Machine-created culture","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","Material culture","Material culture","Material culture","Material culture","Material culture")
target <- c("Real-world archaeology of video game hardware and software","Videogame or virtual world as archaeological site","Philosophy","Reception","Game Development","Machine-created culture","The archaeology of ...game title...","Material culture","Atari Burial Ground","History of use and object biography","Conservation and preservation","Establishing chronology and typology of games","Gaming spaces eg arcages","History of personal or commercial use","Archiving and Game History","Version control patches and damnatio memoriae","Tool definition and creation for in-world archaeology","Application of real-world methods to virtual spaces","Glitches as artifacts","Game as artifact or the space betwewen the hardware and the illusion of a world in game","In-world garbology","Survey Landscape Underwater Exoarchaeology","Quantum entanglement in video games","Perception","Complexity and chaos and algorithms","Deism and world-building","Archaeologists as playable characters","Archaeologists as non-playable characters or AI","In-world looting and or auctioning of in-game inventory","Public perception of archaeology and archaeologists","Developer perception and promotion of archaeology and archaeologists","In-game depictions or reenactments of real-world historical events","Archaeological consulting with studios","Archaeologists as game makers","Developer influence and design choices","Games as archaeology teaching tools","Augmented reality for play tourism or education","3d modeling and space-creation or recreations of antiquity both real or imagined","Lore and lore communities","Code and source as epigraphy and palaeography","Virtual ethnography","Procedurally generated environments and artifacts","Minecraft","Elder Scrolls","World of Warcraft","Fallout","Mass Effect","etc","Real and virtual commerce economics and numismatics","Real-world manifestation of virtual world artifacts","Cosplay and game-derived experimental archaeology","In-world museums","Real-world museum")
archaeogamingmap <- data.frame(src, target)
simpleNetwork(networkData)
library(networkD3)
simpleNetwork(networkData)
src <- c("Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Philosophy","Philosophy","Philosophy","Philosophy","Reception","Reception","Reception","Reception","Reception","Reception","Game Development","Game Development","Game Development","Game Development","Game Development","Game Development","Game Development","Game Development","Machine-created culture","Machine-created culture","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","Material culture","Material culture","Material culture","Material culture","Material culture")
target <- c("Real-world archaeology of video game hardware and software","Videogame or virtual world as archaeological site","Philosophy","Reception","Game Development","Machine-created culture","The archaeology of ...game title...","Material culture","Atari Burial Ground","History of use and object biography","Conservation and preservation","Establishing chronology and typology of games","Gaming spaces eg arcages","History of personal or commercial use","Archiving and Game History","Version control patches and damnatio memoriae","Tool definition and creation for in-world archaeology","Application of real-world methods to virtual spaces","Glitches as artifacts","Game as artifact or the space betwewen the hardware and the illusion of a world in game","In-world garbology","Survey Landscape Underwater Exoarchaeology","Quantum entanglement in video games","Perception","Complexity and chaos and algorithms","Deism and world-building","Archaeologists as playable characters","Archaeologists as non-playable characters or AI","In-world looting and or auctioning of in-game inventory","Public perception of archaeology and archaeologists","Developer perception and promotion of archaeology and archaeologists","In-game depictions or reenactments of real-world historical events","Archaeological consulting with studios","Archaeologists as game makers","Developer influence and design choices","Games as archaeology teaching tools","Augmented reality for play tourism or education","3d modeling and space-creation or recreations of antiquity both real or imagined","Lore and lore communities","Code and source as epigraphy and palaeography","Virtual ethnography","Procedurally generated environments and artifacts","Minecraft","Elder Scrolls","World of Warcraft","Fallout","Mass Effect","etc","Real and virtual commerce economics and numismatics","Real-world manifestation of virtual world artifacts","Cosplay and game-derived experimental archaeology","In-world museums","Real-world museum")
archaeogamingmap <- data.frame(src, target)
simpleNetwork(networkData)
if( 'xkcd' %in% fonts()) {
p <- ggplot() + geom_point(aes(x=mpg, y=wt), data=mtcars) + theme (text = element_text(size = 16, family = "xkcd"))
} else {
warning("Not xkcd fonts installed!")
p <- ggplot() + geom_point(aes(x=mpg, y=wt), data=mtcars)
}
p
src <- c("Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Archaeogaming","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Real-world archaeology of video game hardware and software","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Videogame or virtual world as archaeological site","Philosophy","Philosophy","Philosophy","Philosophy","Reception","Reception","Reception","Reception","Reception","Reception","Game Development","Game Development","Game Development","Game Development","Game Development","Game Development","Game Development","Game Development","Machine-created culture","Machine-created culture","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","The archaeology of ...game title...","Material culture","Material culture","Material culture","Material culture","Material culture")
target <- c("Real-world archaeology of video game hardware and software","Videogame or virtual world as archaeological site","Philosophy","Reception","Game Development","Machine-created culture","The archaeology of ...game title...","Material culture","Atari Burial Ground","History of use and object biography","Conservation and preservation","Establishing chronology and typology of games","Gaming spaces eg arcages","History of personal or commercial use","Archiving and Game History","Version control patches and damnatio memoriae","Tool definition and creation for in-world archaeology","Application of real-world methods to virtual spaces","Glitches as artifacts","Game as artifact or the space betwewen the hardware and the illusion of a world in game","In-world garbology","Survey Landscape Underwater Exoarchaeology","Quantum entanglement in video games","Perception","Complexity and chaos and algorithms","Deism and world-building","Archaeologists as playable characters","Archaeologists as non-playable characters or AI","In-world looting and or auctioning of in-game inventory","Public perception of archaeology and archaeologists","Developer perception and promotion of archaeology and archaeologists","In-game depictions or reenactments of real-world historical events","Archaeological consulting with studios","Archaeologists as game makers","Developer influence and design choices","Games as archaeology teaching tools","Augmented reality for play tourism or education","3d modeling and space-creation or recreations of antiquity both real or imagined","Lore and lore communities","Code and source as epigraphy and palaeography","Virtual ethnography","Procedurally generated environments and artifacts","Minecraft","Elder Scrolls","World of Warcraft","Fallout","Mass Effect","etc","Real and virtual commerce economics and numismatics","Real-world manifestation of virtual world artifacts","Cosplay and game-derived experimental archaeology","In-world museums","Real-world museum")
archaeogamingmap <- data.frame(src, target)
simpleNetwork(networkData)
simpleNetwork(archaeogamingmap)
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
radialNetwork(List = Flare, fontSize = 10, opacity = 0.9)
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, width = 500)
p
diagonalNetwork(List = Flare, fontSize = 10, fontFamily = "xkcd", opacity = 0.9, width = 500)
radialNetwork(List = Flare, fontSize = 10, opacity = 0.9)
options(java.parameters = "-Xmx5120m")
Needed <- c("tm", "SnowballCC", "RColorBrewer", "ggplot2", "wordcloud", "biclust",
"cluster", "igraph", "fpc")
cname <- file.path("/Users", "shawngraham", "atip", "tm")
cname
dir(cname)
library(tm)
docs <- Corpus(DirSource(cname))
## Preprocessing
docs <- tm_map(docs, removePunctuation) # *Removing punctuation:*
docs <- tm_map(docs, removeNumbers) # *Removing numbers:*
docs <- tm_map(docs, tolower) # *Converting to lowercase:*
docs <- tm_map(docs, removeWords, stopwords("english")) # *Removing "stopwords"
library(SnowballC)
docs <- tm_map(docs, stemDocument) # *Removing common word endings* (e.g., "ing", "es")
docs <- tm_map(docs, stripWhitespace) # *Stripping whitespace
docs <- tm_map(docs, PlainTextDocument)
## *This is the end of the preprocessing stage.*
### Stage the Data
dtm <- DocumentTermMatrix(docs)
tdm <- TermDocumentMatrix(docs)
### Explore your data
freq <- colSums(as.matrix(dtm))
length(freq)
ord <- order(freq)
m <- as.matrix(dtm)
dim(m)
write.csv(m, file="DocumentTermMatrix.csv")
### FOCUS - on just the interesting stuff...
# Start by removing sparse terms:
dtms <- removeSparseTerms(dtm, 0.1) # This makes a matrix that is 10% empty space, maximum.
### Word Frequency
head(table(freq), 20)
# The above output is two rows of numbers. The top number is the frequency with which
# words appear and the bottom number reflects how many words appear that frequently.
#
tail(table(freq), 20)
# Considering only the 20 greatest frequencies
#
# **View a table of the terms after removing sparse terms, as above.
freq <- colSums(as.matrix(dtms))
freq
# The above matrix was created using a data transformation we made earlier.
# **An alternate view of term frequency:**
# This will identify all terms that appear frequently (in this case, 50 or more times).
findFreqTerms(dtm, lowfreq=50) # Change "50" to whatever is most appropriate for your data.
#
library(ggplot2)
wf <- data.frame(word=names(freq), freq=freq)
p <- ggplot(subset(wf, freq>150), aes(word, freq))
p <- p + geom_bar(stat="identity")
p <- p + theme(axis.text.x=element_text(angle=45, hjust=1))
p
findAssocs(dtm, c("canada" , "canadian"), corlimit=0.98) # specifying a correlation limit of 0.98
library(fpc)
library(cluster)
dtms <- removeSparseTerms(dtm, 0.15) # Prepare the data (max 15% empty space)
d <- dist(t(dtms), method="euclidian")
kfit <- kmeans(d, 2)
library(timevis)
install.packages("timevis")
data <- data.frame(
id = 1:4,
content = c("Item one", "Item two",
"Ranged item", "Item four"),
start = c("2016-01-10", "2016-01-11",
"2016-01-20", "2016-02-14 15:00:00"),
end = c(NA, NA, "2016-02-04", NA)
)
timevis(data)
library(timevis)
timevis(data)
data <- data.frame(
id = 1:4,
content = c("Item one", "Item two",
"Ranged item", "Item four"),
start = c("16-01-10", "16-01-11",
"16-01-20", "16-02-14 15:00:00"),
end = c(NA, NA, "2016-02-04", NA)
)
timevis(data)
data <- data.frame(
id = 1:10,
content = c("Small emissions", "Eruption",
"Pumice begins to rain down", "Ash cloud now rises 25 km above, blocking the sun",
"Superheated mudflows bury Herculaneum",
"Volcanic plume begins to collapse & pyroclastic flow covers Herculaneum",
"Earthquakes & second pyroclastic surge covers Herculaneum",
"Third pyroclastic surge hits Pompeii's northern wall",
"Series of surges finally buries Pompeii, killing all who remain",
"Another round of surges, storms, and eruption-induced lightening; buries or destroys the tallest buildings; surge reaches Stabiae"),
start = c("79-08-24 08:00:00", "79-08-24 13:00:00",
"79-08-24 15:00:00", "79-08-24 17:00:00",
"79-08-25 01:00:00", "79-08-25 04:00:00",
"79-08-25 05:00:00", "79-08-25 06:30:00",
"79-08-25 06:30:00", "79-08-25 08:00:00"),
end = c(NA, "79-08-27"", NA, NA)
)
timevis(data)
)
''
)
)))
data <- data.frame(
id = 1:10,
content = c("Small emissions", "Eruption",
"Pumice begins to rain down", "Ash cloud now rises 25 km above, blocking the sun",
"Superheated mudflows bury Herculaneum",
"Volcanic plume begins to collapse & pyroclastic flow covers Herculaneum",
"Earthquakes & second pyroclastic surge covers Herculaneum",
"Third pyroclastic surge hits Pompeii's northern wall",
"Series of surges finally buries Pompeii, killing all who remain",
"Another round of surges, storms, and eruption-induced lightening; buries or destroys the tallest buildings; surge reaches Stabiae"),
start = c("79-08-24 08:00:00", "79-08-24 13:00:00",
"79-08-24 15:00:00", "79-08-24 17:00:00",
"79-08-25 01:00:00", "79-08-25 04:00:00",
"79-08-25 05:00:00", "79-08-25 06:30:00",
"79-08-25 06:30:00", "79-08-25 08:00:00"),
end = c(NA, "79-08-27"", NA, NA)
data <- data.frame(
id = 1:10,
content = c("Small emissions", "Eruption",
"Pumice begins to rain down", "Ash cloud now rises 25 km above, blocking the sun",
"Superheated mudflows bury Herculaneum",
"Volcanic plume begins to collapse & pyroclastic flow covers Herculaneum",
"Earthquakes & second pyroclastic surge covers Herculaneum",
"Third pyroclastic surge hits Pompeii's northern wall",
"Series of surges finally buries Pompeii, killing all who remain",
"Another round of surges, storms, and eruption-induced lightening; buries or destroys the tallest buildings; surge reaches Stabiae"),
start = c("79-08-24 08:00:00", "79-08-24 13:00:00",
"79-08-24 15:00:00", "79-08-24 17:00:00",
"79-08-25 01:00:00", "79-08-25 04:00:00",
"79-08-25 05:00:00", "79-08-25 06:30:00",
"79-08-25 06:30:00", "79-08-25 08:00:00"),
end = c(NA, "79-08-27", NA, NA, NA, NA, NA, NA, NA)
)
data <- data.frame(
id = 1:10,
content = c("Small emissions", "Eruption",
"Pumice begins to rain down", "Ash cloud now rises 25 km above, blocking the sun",
"Superheated mudflows bury Herculaneum",
"Volcanic plume begins to collapse & pyroclastic flow covers Herculaneum",
"Earthquakes & second pyroclastic surge covers Herculaneum",
"Third pyroclastic surge hits Pompeii's northern wall",
"Series of surges finally buries Pompeii, killing all who remain",
"Another round of surges, storms, and eruption-induced lightening; buries or destroys the tallest buildings; surge reaches Stabiae"),
start = c("79-08-24 08:00:00", "79-08-24 13:00:00",
"79-08-24 15:00:00", "79-08-24 17:00:00",
"79-08-25 01:00:00", "79-08-25 04:00:00",
"79-08-25 05:00:00", "79-08-25 06:30:00",
"79-08-25 06:30:00", "79-08-25 08:00:00"),
end = c(NA, "79-08-27", NA, NA, NA, NA, NA, NA, NA, NA)
)
timevis(data)
data <- data.frame(
id = 1:10,
content = c("Small emissions", "Eruption",
"Pumice begins to rain down", "Ash cloud now rises 25 km above, blocking the sun",
"Superheated mudflows bury Herculaneum",
"Volcanic plume begins to collapse & pyroclastic flow covers Herculaneum",
"Earthquakes & second pyroclastic surge covers Herculaneum",
"Third pyroclastic surge hits Pompeii's northern wall",
"Series of surges finally buries Pompeii, killing all who remain",
"Another round of surges, storms, and eruption-induced lightening; buries or destroys the tallest buildings; surge reaches Stabiae"),
start = c("0079-08-24 08:00:00", "0079-08-24 13:00:00",
"0079-08-24 15:00:00", "0079-08-24 17:00:00",
"0079-08-25 01:00:00", "0079-08-25 04:00:00",
"0079-08-25 05:00:00", "0079-08-25 06:30:00",
"0079-08-25 06:30:00", "0079-08-25 08:00:00"),
end = c(NA, "0079-08-27", NA, NA, NA, NA, NA, NA, NA, NA)
)
timevis(data)
data <- data.frame(
id = 1:10,
content = c("Small emissions",
"Pumice begins to rain down", "Ash cloud now rises 25 km above, blocking the sun",
"Superheated mudflows bury Herculaneum",
"Volcanic plume begins to collapse & pyroclastic flow covers Herculaneum",
"Earthquakes & second pyroclastic surge covers Herculaneum",
"Third pyroclastic surge hits Pompeii's northern wall",
"Series of surges finally buries Pompeii, killing all who remain",
"Another round of surges, storms, and eruption-induced lightening; buries or destroys the tallest buildings; surge reaches Stabiae"),
start = c("0079-08-24 08:00:00", "0079-08-24 13:00:00",
"0079-08-24 15:00:00", "0079-08-24 17:00:00",
"0079-08-25 01:00:00", "0079-08-25 04:00:00",
"0079-08-25 05:00:00", "0079-08-25 06:30:00",
"0079-08-25 06:30:00", "0079-08-25 08:00:00"),
end = c(NA, NA, NA, NA, NA, NA, NA, NA, NA)
)
timevis(data)
data <- data.frame(
id = 1:10,
content = c("Small emissions",
"Pumice begins to rain down", "Ash cloud now rises 25 km above, blocking the sun",
"Superheated mudflows bury Herculaneum",
"Volcanic plume begins to collapse & pyroclastic flow covers Herculaneum",
"Earthquakes & second pyroclastic surge covers Herculaneum",
"Third pyroclastic surge hits Pompeii's northern wall",
"Series of surges finally buries Pompeii, killing all who remain",
"Another round of surges, storms, and eruption-induced lightening; buries or destroys the tallest buildings; surge reaches Stabiae"),
start = c("0079-08-24 08:00:00",
"0079-08-24 15:00:00", "0079-08-24 17:00:00",
"0079-08-25 01:00:00", "0079-08-25 04:00:00",
"0079-08-25 05:00:00", "0079-08-25 06:30:00",
"0079-08-25 06:30:00", "0079-08-25 08:00:00"),
end = c(NA, NA, NA, NA, NA, NA, NA, NA, NA)
)
data <- data.frame(
id = 1:9,
content = c("Small emissions",
"Pumice begins to rain down", "Ash cloud now rises 25 km above, blocking the sun",
"Superheated mudflows bury Herculaneum",
"Volcanic plume begins to collapse & pyroclastic flow covers Herculaneum",
"Earthquakes & second pyroclastic surge covers Herculaneum",
"Third pyroclastic surge hits Pompeii's northern wall",
"Series of surges finally buries Pompeii, killing all who remain",
"Another round of surges, storms, and eruption-induced lightening; buries or destroys the tallest buildings; surge reaches Stabiae"),
start = c("0079-08-24 08:00:00", "0079-08-24 13:00:00",
"0079-08-24 15:00:00", "0079-08-24 17:00:00",
"0079-08-25 01:00:00", "0079-08-25 04:00:00",
"0079-08-25 05:00:00", "0079-08-25 06:30:00",
"0079-08-25 06:30:00", "0079-08-25 08:00:00"),
end = c(NA, NA, NA, NA, NA, NA, NA, NA, NA)
)
timevis(data)
rm(data)
data <- data.frame(
id = 1:9,
content = c("Small emissions",
"Pumice begins to rain down", "Ash cloud now rises 25 km above, blocking the sun",
"Superheated mudflows bury Herculaneum",
"Volcanic plume begins to collapse & pyroclastic flow covers Herculaneum",
"Earthquakes & second pyroclastic surge covers Herculaneum",
"Third pyroclastic surge hits Pompeii's northern wall",
"Series of surges finally buries Pompeii, killing all who remain",
"Another round of surges, storms, and eruption-induced lightening; buries or destroys the tallest buildings; surge reaches Stabiae"),
start = c("0079-08-24 08:00:00", "0079-08-24 13:00:00",
"0079-08-24 15:00:00", "0079-08-24 17:00:00",
"0079-08-25 01:00:00", "0079-08-25 04:00:00",
"0079-08-25 05:00:00", "0079-08-25 06:30:00",
"0079-08-25 06:30:00", "0079-08-25 08:00:00"),
end = c(NA, NA, NA, NA, NA, NA, NA, NA, NA)
)
timevis(data)
data <- data.frame(
id = 1:9,
content = c("Small emissions",
"Pumice begins to rain down", "Ash cloud now rises 25 km above, blocking the sun",
"Superheated mudflows bury Herculaneum",
"Volcanic plume begins to collapse & pyroclastic flow covers Herculaneum",
"Earthquakes & second pyroclastic surge covers Herculaneum",
"Third pyroclastic surge hits Pompeii's northern wall",
"Series of surges finally buries Pompeii, killing all who remain",
"Another round of surges, storms, and eruption-induced lightening; buries or destroys the tallest buildings; surge reaches Stabiae"),
start = c("0079-08-24 08:00:00", "0079-08-24 13:00:00",
"0079-08-24 15:00:00", "0079-08-24 17:00:00",
"0079-08-25 01:00:00", "0079-08-25 04:00:00",
"0079-08-25 05:00:00", "0079-08-25 06:30:00",
"0079-08-25 06:30:00", "0079-08-25 08:00:00"),
end = c(NA, NA, NA, NA, NA, NA, NA, NA, NA)
)
data <- data.frame(
id = 1:9,
content = c("Small emissions",
"Pumice begins to rain down", "Ash cloud now rises 25 km above, blocking the sun",
"Superheated mudflows bury Herculaneum",
"Volcanic plume begins to collapse & pyroclastic flow covers Herculaneum",
"Earthquakes & second pyroclastic surge covers Herculaneum",
"Third pyroclastic surge hits Pompeii's northern wall",
"Series of surges finally buries Pompeii, killing all who remain",
"Another round of surges, storms, and eruption-induced lightening; buries or destroys the tallest buildings; surge reaches Stabiae"),
start = c("0079-08-24 08:00:00",
"0079-08-24 15:00:00", "0079-08-24 17:00:00",
"0079-08-25 01:00:00", "0079-08-25 04:00:00",
"0079-08-25 05:00:00", "0079-08-25 06:30:00",
"0079-08-25 06:30:00", "0079-08-25 08:00:00"),
end = c(NA, NA, NA, NA, NA, NA, NA, NA, NA)
)
timevis(data)
library(shiny)
data <- data.frame(
id = 1:9,
content = c("Small emissions",
"Pumice begins to rain down", "Ash cloud now rises 25 km above, blocking the sun",
"Superheated mudflows bury Herculaneum",
"Volcanic plume begins to collapse & pyroclastic flow covers Herculaneum",
"Earthquakes & second pyroclastic surge covers Herculaneum",
"Third pyroclastic surge hits Pompeii's northern wall",
"Series of surges finally buries Pompeii, killing all who remain",
"Another round of surges, storms, and eruption-induced lightening; buries or destroys the tallest buildings; surge reaches Stabiae"),
start = c("0079-08-24 08:00:00",
"0079-08-24 15:00:00", "0079-08-24 17:00:00",
"0079-08-25 01:00:00", "0079-08-25 04:00:00",
"0079-08-25 05:00:00", "0079-08-25 06:30:00",
"0079-08-25 06:30:00", "0079-08-25 08:00:00"),
end = c(NA, NA, NA, NA, NA, NA, NA, NA, NA)
)
ui <- fluidPage(
timevisOutput("timeline")
)
server <- function(input, output, session) {
output$timeline <- renderTimevis({
timevis(data)
})
}
shinyApp(ui = ui, server = server)
devtools::install_github("wch/webshot"
)
install.packages("webshot::install_phantomjs()")
getwd()
setwd("github/presentations")
getwd()