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
bigrams <- function(text){ | |
word.vec <- strsplit(text, "\\s+")[[1]] | |
word.vec.length <- length(word.vec) | |
lapply(1:(word.vec.length-1), function(x)c(word.vec[x], word.vec[x+1])) | |
} |
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
is.name <- function(bigram){ | |
has.last.name <- tolower(bigram[2]) %in% tolower(last.names$name) | |
if(has.last.name){ | |
has.first.name <- tolower(bigram[1]) %in% tolower(first.names) | |
isname <- has.first.name & has.last.name | |
}else{ | |
isname <- has.last.name | |
} | |
return(isname) | |
} |
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'> | |
<html> | |
<head> | |
<link rel='stylesheet' href='http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.css'> | |
<script src='http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js' type='text/javascript'></script> | |
<script src='https://rawgithub.com/leaflet-extras/leaflet-providers/gh-pages/leaflet-providers.js' type='text/javascript'></script> | |
<script src='http://harrywood.co.uk/maps/examples/leaflet/leaflet-plugins/layer/vector/KML.js' type='text/javascript'></script> | |
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
pandoc -S -f markdown_github -t epub -o beyondtransparency.epub --epub-cover-image cover.png part-0.md part-1-chapter-0.md part-1-chapter-01.md part-1-chapter-02.md part-1-chapter-03.md part-1-chapter-04.md part-1-chapter-05.md part-2-chapter-0.md part-2-chapter-06.md part-2-chapter-07.md part-2-chapter-08.md part-2-chapter-09.md part-2-chapter-10.md part-3-chapter-0.md part-3-chapter-11.md part-3-chapter-12.md part-3-chapter-13.md part-3-chapter-14.md part-4-chapter-0.md part-4-chapter-15.md part-4-chapter-16.md part-4-chapter-17.md part-4-chapter-18.md part-5-chapter-0.md part-5-chapter-19.md part-5-chapter-20.md part-5-chapter-21.md part-5-chapter-22.md part-5-chapter-99.md |
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'> | |
<html> | |
<head> | |
<script src='http://code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script> | |
<script src='http://code.highcharts.com/highcharts.js' type='text/javascript'></script> | |
<script src='http://code.highcharts.com/highcharts-more.js' type='text/javascript'></script> | |
<script src='http://code.highcharts.com/modules/exporting.js' type='text/javascript'></script> | |
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'> | |
<html> | |
<head> | |
<script src='http://code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script> | |
<script src='http://code.highcharts.com/highcharts.js' type='text/javascript'></script> | |
<script src='http://code.highcharts.com/highcharts-more.js' type='text/javascript'></script> | |
<script src='http://code.highcharts.com/modules/exporting.js' type='text/javascript'></script> | |
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
cs <-c("13-10-30 12:30:00", "13-10-30 12:35:00", "13-10-30 12:40:00", | |
"13-10-30 12:45:00", "13-10-30 12:50:00", "13-10-30 12:55:00") | |
x <-strptime(cs, "%y-%m-%d %H:%M:%S") | |
dfr <-data.frame(date=as.POSIXct(x,origin="1970-01-01"), | |
value1=c(1.5,1.25,.75,2.1,1.3,1.4), | |
value2=c(3.5,3.25,1.75,.1,6.3,2.4)) | |
h1 <- Highcharts$new() | |
h1$chart(type = "scatter") | |
h1$chart(zoomType = "xy") | |
h1$xAxis(type = "datetime", data=as.POSIXct(dfr$date,origin="1970-01-01")) |
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
server.R.... | |
output$plot2 <- renderText({ | |
date1 <- as.POSIXct(c(1400702085, 1400702385, 1400702685, 1400702985, 1400703285, | |
1400703585, 1400703885, 1400704185, 1400704485, 1400704785), | |
origin="1970-01-01") | |
df <- data.frame(date=date1, c1=runif(10,2, 5), c2 = runif(10, 50, 100), | |
c3 = runif(10, 400, 500)) | |
df$date2 <- format(df$date, "Date.UTC(%Y,%m,%d,%H,%M)") | |
temp.json <- toJSONArray2(cbind(df$date2, df$c1), json = T, names = F) |
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'> | |
<html> | |
<head> | |
<link rel='stylesheet' href='http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.css'> | |
<script src='http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js' type='text/javascript'></script> | |
<script src='https://rawgithub.com/leaflet-extras/leaflet-providers/gh-pages/leaflet-providers.js' type='text/javascript'></script> | |
<script src='http://harrywood.co.uk/maps/examples/leaflet/leaflet-plugins/layer/vector/KML.js' type='text/javascript'></script> | |
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'> | |
<html> | |
<head> | |
<link rel='stylesheet' href='http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.css'> | |
<script src='http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js' type='text/javascript'></script> | |
<script src='https://rawgithub.com/leaflet-extras/leaflet-providers/gh-pages/leaflet-providers.js' type='text/javascript'></script> | |
<script src='http://harrywood.co.uk/maps/examples/leaflet/leaflet-plugins/layer/vector/KML.js' type='text/javascript'></script> | |
OlderNewer