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
Guinea Worm Cases by Year per Country |
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
#Package Wes Anderson colours R package https://github.com/karthik/wesanderson#wes-anderson-palettes | |
#His Box Office http://www.boxofficemojo.com/people/chart/?id=wesanderson.htm | |
#His IMDB http://www.imdb.com/name/nm0027572/ | |
# wes csv is | |
#Name,IMDB,Earn,Year,Era | |
#The Grand Budapest Hotel,8.1,62,2014,later | |
#Moonrise Kingdom,7.8,50,2012,later | |
#Fantastic Mr. Fox,7.8,23,2009,mid | |
#The Darjeeling Limited,7.2,15,2007,mid | |
#The Life Aquatic with Steve Zissou,7.3,33,2004,mid |
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
mydata = read.csv("output.csv", encoding="UTF-8", header=TRUE) | |
#book_id title rating num_ratings num_reviews book_id x.x x.y cover_rating | |
attach(mydata) | |
plot(rating,num_reviews,main="Number of Ratings Number Reviews") | |
cor(num_ratings,num_reviews) | |
> cor(num_ratings,num_reviews) | |
[1] 0.9597442 |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
Year Panels webpage name drag weight | |
1930 12 http://worldcupballs.info/world-cup-balls/1930-uruguay/1930-world-cup-ball-t-model.html | |
1934 13 http://worldcupballs.info/world-cup-balls/1934-italy/1934-world-cup-ball-federale-102.html | |
1938 13 http://worldcupballs.info/world-cup-balls/1938-france/1938-world-cup-ball-allen.html | |
1950 12 http://worldcupballs.info/world-cup-balls/1950-brazil/1950-world-cup-ball-superball.html | |
1954 18 http://worldcupballs.info/world-cup-balls/1954-switzerland/1954-world-cup-ball-swiss-world-champion.html | |
1958 24 http://worldcupballs.info/world-cup-balls/1958-sweden/1958-world-cup-ball-top-star.html | |
1962 18 http://worldcupballs.info/world-cup-balls/1962-chile/1962-world-cup-ball-crack.html | |
1966 25 http://worldcupballs.info/world-cup-balls/1966-england/1966-world-cup-ball-slazenger-challenge.html 14 - 16 ounces | |
1970 32 |
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
#This is inspired by this piral animation of the same dataset | |
#http://www.climate-lab-book.ac.uk/2016/spiralling-global-temperatures/ | |
#and this R code to produce the animation | |
#https://gist.github.com/jebyrnes/b34930da0052a86f5ffe254ce9900357 | |
# It also uses elements of this http://www.r-bloggers.com/making-faceted-heatmaps-with-ggplot2/ | |
# and this https://rpubs.com/bradleyboehmke/weather_graphic graphic | |
library(dplyr) | |
library(tidyr) | |
library(ggplot2) |
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
#Dataset is cetml1659on.dat from hadcet [here](http://www.metoffice.gov.uk/hadobs/hadcet/data/download.html) | |
mydata = read.csv("cetml1659on.csv", header=TRUE) | |
gg<- ggplot(mydata, aes(x=Date, y=YEAR)) + | |
geom_point(shape=1) + # Use hollow circles | |
geom_smooth(method=lm) | |
plot.title = 'England Temperatures Since 1659' | |
plot.subtitle = 'HadCET Data. Correlation of Year and Temp .41 @iamreddave' | |
gg <- gg + ggtitle(bquote(atop(.(plot.title), atop(italic(.(plot.subtitle)), "")))) |
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> | |
<head> | |
<meta charset="utf-8"> | |
<style>svg { position: relative; left: 315px; }</style> | |
</head> | |
<body> | |
<div id="frame"></div> |
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> | |
<head> | |
<meta charset="utf-8"> | |
<style>svg { position: relative; left: 315px; }</style> | |
</head> | |
<body> | |
<div id="frame"></div> |
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
install.packages("choroplethr") | |
install.packages("choroplethrMaps") | |
library(choroplethr); | |
library(choroplethrMaps) | |
library(ggplot2) | |
data(country.map) | |
data(country.regions) | |
a<-c(29,25,4,4,7,11,11,8,7,4,6,9,3,8,6,3,17,3,8,4,12,18,10,10,7,7,5,3,10,23,31,17,6,9,5,4,5,8,16,24,9) |
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
#code is based on this animation https://gist.github.com/jebyrnes/b34930da0052a86f5ffe254ce9900357 | |
#and this visualisation on this data http://www.realclimate.org/images/nsidc4.txt | |
#1. load libraries | |
library(dplyr) | |
library(tidyr) | |
library(ggplot2) | |
library(animation) | |
#2. get data in right format |