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
http://zevross.com/blog/2014/08/04/beautiful-plotting-in-r-a-ggplot2-cheatsheet-3/ |
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
http://stackoverflow.com/questions/2162131/how-can-i-learn-to-create-beautiful-infographics-with-connection-to-my-r-knowle |
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(rethinking) #requries rstan, inline, Rcpp | |
# Predict: y in [0,1] | |
# With: x | |
m_glm <- glm(y ~ x, data = your_data, family = binomial) #binomial dist assumes a logit link. This is essentially the same as Emilio's model, except Emilio included a green effect qualifier | |
# Mathematical form: | |
# y_i ~ bonimial( 1, p_i) ; | |
# logit(p_i) = a + b*x_i |
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(SmarterPoland) | |
library(riverplot) | |
library(RColorBrewer) | |
library(graphics) | |
library(reshape2) | |
library(plyr) | |
library(stringr) | |
library(countrycode) | |
# DOWNLOAD THE DATA |
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
# All of my times are in mm/dd/yyyy hh:mm:ss | |
# From a character string (read in from read.csv(stringsAsFactors = FALSE)) | |
# By far the easiest way is with lubridate::mdy_hms() | |
#Ex: | |
options(stringsAsFactors = FALSE) | |
Sys.timezone(location = FALSE) | |
Sys.setenv(TZ = "Pacific/Pitcairn") |
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
Karen's D3 Example: | |
http://karenyng.github.io/HW4_Stat250_W14/ | |
It's from a template: http://square.github.io/crossfilter/ (you can fork the repo from the link on the page). | |
Part 1: How to host a visualization on github | |
For people to be able to see your visualization, you have to actually host it on a server somewhere. The free, easy way is on GitHub. | |
1. For any visualization you want to host, first create a github repository for it. This will be the master branch. |
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(rvest) | |
library(dplyr) | |
library(stringr) | |
toMatch <- "Matt Lieber is" | |
# Try with first page | |
url <- "https://gimletmedia.com/show/reply-all/episodes/" | |
pgfull <- read_html(url) | |
texts <- pgfull %>% |
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
/** | |
* A simple theme for myfanwy.github.io | |
* | |
* reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se | |
*/ | |
<link href='http://fonts.googleapis.com/css?family=Megrim' rel='stylesheet' type='text/css'> | |
<link href='http://fonts.googleapis.com/css?family=Raleway:300,400,700' rel='stylesheet' type='text/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
--- | |
layout: page | |
title: Davis R-Users Group Calendar | |
permalink: /calendar/ | |
type: info | |
header_text: Davis R-Users Group Calendar | |
calendar: true | |
--- | |
<div class="span3"> | |
<h3>Davis R-Users Group Events</h3> |
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(tidyverse) | |
tt <- structure(list(TagID = c(2051L, 2051L, 2052L, 2055L, 2055L, 2057L, | |
2057L, 2058L, 2058L, 2059L, 2059L, 2061L, 2062L, 2063L, 2063L, | |
2064L, 2064L, 2066L, 2066L, 2067L, 2067L, 2068L, 2069L, 2070L, | |
2070L, 2071L, 2072L, 2073L, 2074L, 2075L, 2075L, 2076L, 2076L, | |
2077L, 2117L, 2117L), ttime = structure(c(17.0865856481481, 17.0865856481481, | |
5.9287037037037, 14.2212037037037, 14.2212037037037, 5.84836805555556, | |
5.84836805555556, 14.3217361111111, 14.3217361111111, 11.6971759259259, |
OlderNewer