Skip to content

Instantly share code, notes, and snippets.

View omarbenites's full-sized avatar
:octocat:
open data tools for the agronomy world 🍠 🌽 🍅

Omar Benites Alfaro omarbenites

:octocat:
open data tools for the agronomy world 🍠 🌽 🍅
  • METRIKA
  • Lima-Peru
View GitHub Profile
@zmeers
zmeers / ggparliament_example.R
Created July 12, 2018 22:14
ggparliament example
# ggparliament example
# Zoe Meers
# 12 July 2018
#
library(tidyverse)
library(ggparliament) # download from github using devtools.
# predictions from NY Times -- see https://www.nytimes.com/interactive/2018/03/26/us/elections/house-races-midterms.html
# Regarding order -- from the POV of the speaker, Republicans sit to the left of the chamber and Democrats to the right.
library(ggplot2) # devtools::install_github("hadley/ggplot2") or subtitles won't work
library(tidyr)
library(dplyr)
library(readr)
library(scales)
URL <- "https://static01.nyt.com/newsgraphics/2016/04/21/undervote/ad8bd3e44231c1091e75621b9f27fe31d116999f/data.tsv"
fil <- "nytimes_vote.tsv"
if (!file.exists(fil)) download.file(URL, fil)
@pssguy
pssguy / global.R
Created March 19, 2013 19:06
Upload Example in Shiny App. Takes Pupil's term marks and does some analyses
# load required libraries
library(shiny)
library(plyr)
library(ggplot2)
library(googleVis)
library(reshape2)
####creation of example data on local directory for uploading####