Skip to content

derekmichaelwright/agData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agData R Package

agData: an R package containing various agricultural data sets


Installation

devtools::install_github("derekmichaelwright/agData")
library(agData)

Vignettes

agData Vignettes


Data Sources


Data sets

STATCAN


FAO


USDA


ISAAA


Other


agData_Colors

agData_Colors: a color pallette for the agData package

# Prep data
xx <- data.frame(
  Color = factor(agData_Colors, levels = agData_Colors),
  Number = 1:length(agData_Colors),
  Row = rep(1:10, each = 10, length.out = length(agData_Colors)),
  Col = rep(1:10, times = 10, length.out = length(agData_Colors)) )
# Plot
mp <- ggplot(xx, aes(x = Row, y = Col)) +
  geom_tile(aes(fill = Color)) +
  geom_label(aes(label = paste(Number, Color, sep = " - "))) +
  scale_fill_manual(values = agData_Colors) +
  scale_y_reverse() +
  theme_void() +
  theme(legend.position = "none")
ggsave("man/figures/agData_Colors.png", mp, width = 9, height = 9)

© Derek Michael Wright

Releases

No releases published

Packages

No packages published

Languages