Skip to content

Instantly share code, notes, and snippets.

View gastonstat's full-sized avatar

Gaston Sanchez gastonstat

View GitHub Profile
@gastonstat
gastonstat / hurricanes_RPub.md
Created June 30, 2012 21:24
My first RPub about visualizing hurricane trajectories

Visualizing Hurricane Trajectories

by: Gaston Sanchez

This RPub shows how to visualize some hurricane trajectories in R. (Thanks a lot to all the RStudio team for your awesome job!)

Description

Inspired by Aaron Koblin's flight patterns and by Mapped British Shipping, I decided to play with a different data about storms (i.e. hurricanes) and try to map their trajectories.

@gastonstat
gastonstat / hurricanes.R
Created June 30, 2012 19:24
Visualizing Hurricane Trajectories
##################################################################################
# Description: Visualize Hurricane Trajectories in North America
# Data: International Best Track Archive for Climate Stewardship (IBTrACS)
# http://www.ncdc.noaa.gov/oa/ibtracs/index.php?name=wmo-data
# (files in csv format)
# ftp://eclipse.ncdc.noaa.gov/pub/ibtracs/v03r03/wmo/csv/basin/
# Copyright: Copyright (c) 2011, under the Simplified BSD License
# Author: Gaston Sanchez
# url: www.gastonsanchez.com
##################################################################################
@gastonstat
gastonstat / bart_ridership.R
Created June 30, 2012 18:57
Visualizing Bart Ridership 2011
########################################################################
# Description: Visualize Bart fares with networks (i.e. graphs)
# Data: BART data reports
# http://www.bart.gov/about/reports/index.aspx
# Annual exits 2011 (excel file)
# http://www.bart.gov/docs/BART_Ridership_FY73_FY11.xlsx
# Copyright: Copyright (c) 2011, under the Simplified BSD License
# Author: Gaston Sanchez
# url: www.gastonsanchez.com
########################################################################
@gastonstat
gastonstat / bart_fares.R
Created June 30, 2012 18:04
Visualizing Bart fares
########################################################################
# Description: Visualize Bart fares with networks (i.e. graphs)
# Data: Data available from BART API
# http://api.bart.gov/api/
# Copyright: Copyright (c) 2011, under the Simplified BSD License
# Author: Gaston Sanchez
# url: www.gastonsanchez.com
########################################################################
# required packages
@gastonstat
gastonstat / earthquakes.R
Created June 30, 2012 17:39
Visualizaing earthquakes in northern CA 2008-2011
########################################################################
# Description: Visualize earthquakes in northern CA 2008-2011
# Data: Geological data from USGS catalog
# http://quake.geo.berkeley.edu/ncedc/catalog-search.html
# Copyright: Copyright (c) 2011, under the Simplified BSD License
# Author: Gaston Sanchez
# url: www.gastonsanchez.com
########################################################################
# load packages
@gastonstat
gastonstat / bike_accidents.R
Created June 29, 2012 22:30
Analyzing bike accidents in the bay area
########################################################################
# Description: Analyze bike accidents in the bay area
# Data: Bike Accident Tracker 2.0 from 'The Bay Citizen'
# http://www.baycitizen.org/data/bike-accidents/raw-data
# Copyright: Copyright (c) 2011, under the Simplified BSD License
# Author: Gaston Sanchez
# url: www.gastonsanchez.com
########################################################################
# load required packages
@gastonstat
gastonstat / climbing_ropes.R
Created June 29, 2012 21:55
Principal Components Analysis of climbing ropes
########################################################################
# Description: Apply PCA on climbing-ropes data and visualize them
# Data: Climbing ropes dataset available at
# https://docs.google.com/spreadsheet/ccc?key=0AjoVnZ9iB261dGkybXJVS0x0aUpkMjFjT3kwZk9td2c#gid=0
# Copyright: Copyright (c) 2011, under the Simplified BSD License
# Author: Gaston Sanchez
# url: www.gastonsanchez.com
########################################################################
# Skip this step if you already have installed the package FactoMineR
@gastonstat
gastonstat / human_evolution_wordcloud.R
Created June 29, 2012 21:43
Wordcloud from papers about Human Evolution in PubMed
########################################################################
# Description: Create a word cloud in R of papers about Human Evolution
# Data: Articles from pubmed database (online)
# Copyright: Copyright (c) 2011, under the Simplified BSD License
# Author: Gaston Sanchez
# url: www.gastonsanchez.com
########################################################################
# load required packages
library(XML) # for parsing websites
@gastonstat
gastonstat / swimming1500.R
Created June 29, 2012 21:05
Progression of 1500m freestyle records
###################################################################################
# Description: Code in R to visualize the progression
# of the world record in 1500m freestyle
# Data: http://en.wikipedia.org/wiki/World_record_progression_1500_metres_freestyle
# Copyright: Copyright (c) 2011, under the Simplified BSD License
# Author: Gaston Sanchez
# URL: www.gastonsanchez.com
###################################################################################
# load library XML