D3.js small multiple bar charts with tooltips. Follows Mike Bostocks's small multiples example. Tooltip code from here.
forked from officeofjane's block: Small multiple bar charts with tooltips
country | lifeExp | |
---|---|---|
Afghanistan | 43.828 | |
Albania | 76.423 | |
Algeria | 72.301 | |
Angola | 42.731 | |
Argentina | 75.32 | |
Australia | 81.235 | |
Austria | 79.829 | |
Bahrain | 75.635 | |
Bangladesh | 64.062 |
D3.js small multiple bar charts with tooltips. Follows Mike Bostocks's small multiples example. Tooltip code from here.
forked from officeofjane's block: Small multiple bar charts with tooltips
### Earnings Dumbbell Chart | |
library(ggplot2) | |
library(tidyr) | |
library(dplyr) | |
library(scales) | |
schoolearnings <- read.csv("schoolearnings.csv", stringsAsFactors=FALSE) | |
df <- schoolearnings %>% gather(gender,value,2:3) |
library(tidyverse) | |
library(engsoccerdata) | |
england %>% | |
filter(tier==1) %>% | |
homeaway() %>% | |
group_by(team) %>% | |
arrange(Date) %>% | |
filter(venue=="away") %>% | |
mutate(gameno = row_number())%>% |
expandrows <- function(df){ | |
library(splitstackshape) | |
library(data.table) | |
temp <- cSplit(cSplit(cbind(id = 1:nrow(df), df), | |
"Actor", ",", "long"), | |
"Recipient", ",", "long") | |
license: mit |
### Comparing Arsenal Points per N games over time | |
library(engsoccerdata) | |
library(tidyverse) | |
rollpts <- function(teamname=NULL, N=10){ | |
rbind(england,england_current()) %>% | |
homeaway() %>% | |
filter(team==teamname) %>% | |
mutate(pts = ifelse(gf>ga, 3, ifelse(gf<ga, 0, 1)), |
license: mit |
Built with blockbuilder.org
Timestamp | Actor | Behavior | Recipient | Location | Observer | Notes | |
---|---|---|---|---|---|---|---|
10/14/2014 11:57:16 | Start | Start | Start | Start | CW | NA | |
10/14/2014 12:03:10 | 6 | Mounting | 10 | NB4 | CW | NA | |
10/14/2014 12:04:16 | 6 | Fighting | 5 | NB5 | CW | NA | |
10/14/2014 12:19:27 | 3 | Fighting | 4 | ML | CW | NA | |
10/14/2014 12:28:05 | 4 | Subordinate | 10 | LL | CW | NA | |
10/14/2014 12:30:49 | 4 | Fighting | 2 | NB1 | CW | NA | |
10/14/2014 12:34:39 | 4 | Fighting | 2 | NB5 | CW | NA | |
10/14/2014 12:40:36 | 4 | Subordinate | 1 | NB5 | CW | NA | |
10/14/2014 12:44:08 | 4 | Chasing | 11 | LL, LR | CW | NA |