Skip to content

Instantly share code, notes, and snippets.

View felixgrunberger's full-sized avatar

Felix Grünberger felixgrunberger

View GitHub Profile
@felixgrunberger
felixgrunberger / animated_bargraph.R
Last active December 18, 2017 12:53
Animated bar graphs in R. How a simple animation can (maybe) contribute to a better understanding of data
# 1. step: Load all packages we need ----------------------------------------------------------------------------
library(data.table) #order/add/modify/delete data
library(gganimate) #create easy animations with ggplot2
library(RColorBrewer) #Provides color schemes
library(ggplot2) #A system for 'declaratively' creating graphics
# 2. step: Toy example ------------------------------------------------------------------------------------------
#toy example data
#-----------------------------------------------------------------------------------------------------------------#
# load function html to text
# Author: Tony Breyal
# Date: 2011-11-18
# Modified: 2011-11-18
# Description: Extracts all text from a webpage (aims to extract only the text you would see in a web browser)
# Packages Used: RCurl, XML