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(rnoaa) | |
> noaa_stations(extent=c(34.031607,-118.168945)) | |
$meta | |
$meta$totalCount | |
[1] 12 | |
$meta$pageCount | |
[1] 25 | |
$meta$offset |
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
# Install the latest dev version | |
library(devtools) | |
install_github("ropensci/rnoaa") | |
library(rnoaa) | |
stations <- noaa_stations(extent=c(34.1046,-118.264), radius = 10, limit=60) | |
noaa_datasets(stationid = stations$data$id[7]) | |
noaa_datatypes(datasetid = "GHCND", stationid = stations$data$id[7]) | |
nd <- noaa(datasetid = "GHCND", datatypeid = 'PRCP', stationid = stations$data$id[7], | |
startdate = "2012-01-01", enddate = "2012-01-10", limit = 1000) |
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(wesanderson) | |
counts <- table(mtcars$vs, mtcars$gear) | |
barplot(counts, main="Car Distribution by Gears and VS", | |
xlab="Number of Gears", col= wes.palette(2, "Royal1"), | |
legend = rownames(counts), beside=TRUE) | |
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(rWBclimate) | |
options(kmlpath = "/tmp") | |
# A handful of basins that cover most of California | |
# Some bits of eastern sierras are missing | |
cal_basin_id <- c(365, 280, 281, 282, 273, 274, 275) | |
cal_basin <- create_map_df(cal_basin_id) | |
cal_basin_dat <- get_ensemble_temp(cal_basin_id, "annualanom", 2080, 2100) | |
cal_basin_dat <- subset(cal_basin_dat, cal_basin_dat$scenario == "a2") | |
cal_basin_dat <- subset(cal_basin_dat, cal_basin_dat$percentile == 50) | |
cal_basin_map <- climate_map(cal_basin, cal_basin_dat, return_map = T) |
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
brew info zmq | |
zeromq: stable 4.0.4, HEAD | |
http://www.zeromq.org/ | |
/usr/local/Cellar/zeromq/3.2.4 (54 files, 2.3M) | |
Built from source | |
/usr/local/Cellar/zeromq/4.0.4 (62 files, 2.8M) * | |
Built from source | |
From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/zeromq.rb | |
==> Dependencies | |
Build: pkg-config ✔ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#' Cat pics in R | |
#' | |
#' @param width Default cat width | |
#' @param height Default cat height | |
#' @export | |
#' @keywords Internet | |
#' @importFrom biOps readJpeg | |
#' @examples | |
#' kittens() |
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(rfisheries) | |
library(plyr) | |
library(reshape2) | |
species <- of_species_codes() | |
who <- c("TUX", "COD", "VET", "NPA") | |
by_species <- lapply(who, function(x) of_landings(species = x)) | |
names(by_species) <- who | |
dat <- melt(by_species, id = c("catch", "year"))[, -5] | |
write.csv(dat, file = "dat.csv") |
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(rfisheries) | |
library(plyr) | |
library(reshape2) | |
library(ggplot2) | |
species <- of_species_codes() | |
who <- c("TUX", "COD", "VET", "NPA") | |
by_species <- lapply(who, function(x) of_landings(species = x)) | |
names(by_species) <- who | |
dat <- melt(by_species, id = c("catch", "year"))[, -5] |