This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
path { | |
fill: #ccc; | |
stroke: #000; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# quick example of creating a plot like that at the link below | |
# http://www.visualisingdata.com/index.php/2015/01/make-grey-best-friend/ | |
x<-1:10 | |
y<-x^2 | |
z<-x | |
radius<-x/5 | |
dat<-data.frame(x=x, y=y, z=z, radius=radius) | |
ggplot(dat, aes(x,y))+ | |
geom_ribbon(aes(ymin=y-radius, ymax=y+radius), alpha=0.5, fill="grey", color="grey", size=1)+ |
We can't make this file beautiful and searchable because it's too large.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"","word","word_count","corpus","corpus_date" | |
"1","hive",1,"loverscomplaint",1609 | |
"2","plaintful",1,"loverscomplaint",1609 | |
"3","Are",1,"loverscomplaint",1609 | |
"4","Than",1,"loverscomplaint",1609 | |
"5","attended",1,"loverscomplaint",1609 | |
"6","That",7,"loverscomplaint",1609 | |
"7","moisture",1,"loverscomplaint",1609 | |
"8","praised",1,"loverscomplaint",1609 | |
"9","particular",1,"loverscomplaint",1609 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jshint browser:true, indent:2, globalstrict: true, laxcomma: true, laxbreak: true */ | |
/*global d3:true */ | |
/* | |
* colorlegend | |
* | |
* This script can be used to draw a color legend for a | |
* [d3.js scale](https://github.com/mbostock/d3/wiki/Scales) | |
* on a specified html div element. | |
* [d3.js](http://mbostock.github.com/d3/) is required. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In response to a question on our ggplot2/mapping post | |
# (http://zevross.com/blog/2014/07/16/mapping-in-r-using-the-ggplot2-package/) | |
# this is an example of using ggplot2's built-in | |
# borders() function and an external shapefile | |
# The shapefile used in that blog post is a projected shapefile | |
# but by default the borders() function uses unprojected | |
# boundaries so you will need to "unproject" the shapefile | |
# for the borders to match. An alternative would be to assign | |
# a projection with map() arguments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>R crash course</title> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>R crash course</title> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>R crash course</title> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>R crash course</title> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> | |
<link rel="stylesheet" href="http://slidifylibraries2.googlecode.com/git/inst/libraries/frameworks/revealjs/css/reveal.min.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(knitr) | |
opts_chunk$set(collapse=TRUE, echo=TRUE, | |
error=FALSE, message=FALSE, | |
warning=FALSE, cache=FALSE) | |
s0 <- knitr::knit_hooks$get('source') | |
o0 <- knitr::knit_hooks$get('output') | |
p0 <- knitr::knit_hooks$get('plot') | |
knitr::knit_hooks$set( |