This file contains hidden or 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
# data source: http://web.mta.info/developers/turnstile.html | |
library(ggplot2) | |
library(dplyr) | |
library(tidyr) | |
library(readr) | |
# define read function with schema ---- | |
read_data <- function(url) { | |
readr::read_csv(url, |
This file contains hidden or 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
# load packages ---- | |
library(RSocrata) | |
library(tidycensus) | |
library(dplyr) | |
library(mapview) | |
library(leaflet) | |
library(sp) | |
# read & wrangle turnstile data ---- | |
stations <- read.socrata("https://data.cityofchicago.org/resource/8pix-ypme.json") |
This file contains hidden or 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
<html> | |
<body> | |
<style> | |
li { | |
color: gray; | |
} | |
.last-highlight>li:last-of-type { | |
color: black; | |
} |
This file contains hidden or 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(ggplot2) | |
# sample data for plot ---- | |
points <- | |
data.frame( | |
x = rep(1:10,3), | |
y = rep(1:10,3), | |
z = sort(rep(letters[1:2], 15)), | |
w = rep(letters[3:4], 15) | |
) | |
# ggplot using many theme options ---- |
This file contains hidden or 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
--- | |
title: "Untitled" | |
author: "Emily Riederer" | |
date: "5/15/2019" | |
output: html_document | |
--- | |
```{r} | |
# dummy data | |
data <- data.frame( |
This file contains hidden or 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(testthat) | |
# define code chunks ---- | |
scss <- c("$font-stack: Helvetica, sans-serif;", "$primary-color: #333;", | |
"", "body {", " font: 100% $font-stack;", " color: $primary-color;", | |
"}") | |
sass <- c("$font-stack: Helvetica, sans-serif", "$primary-color: #333", | |
"", "body", " font: 100% $font-stack", " color: $primary-color") | |
output_compressed <- '<style type=\"text/css\">\nbody{font:100% Helvetica,sans-serif;color:#333}\n</style>\n' |