Giter VIP home page Giter VIP logo

gardenr's Introduction

gardenR

The gardenR package contains data collected by Lisa Lendway from her vegetable garden in the summer of 2020. The data were used in her Introduction to Data Science course at Macalester College to introduce many concepts. For examples, see the tutorials for the course.

If you’d like a visual tour of the garden, check out this YouTube video.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("llendway/gardenR")

Datasets

garden_harvest: Each row is a “harvest” of a particular vegetable variety. So, each time she harvested a particular vegetable/variety combination, she weighed the entire harvest. There could be multiple harvests of a vegetable/variety combination in a single day. There are two exceptions: all pumpkin and winter squash (vegetable = “squash”) were weighed individually.

garden_spending: summarizes how much was spent on gardening materials.

garden_planting: The rows represent the planting of a vegetable variety. There could be multiple rows for the same vegetable variety, if they were planted on the same day in different plots or on different days.

garden_coords: This dataset gives coordinates for the vertices of the plots in the garden.

Example

Here is a representation of the plots in the garden - like a bird’s eye view of the garden.

library(gardenR)
library(tidyverse)

for_labs <- garden_coords %>% 
  group_by(plot) %>% 
  summarize(x = mean(x),
            y = mean(y))

garden_coords %>% 
  ggplot(aes(x = x, y = y, group = plot)) +
  geom_polygon() +
  geom_text(data = for_labs, 
            aes(x = x, y = y, label = plot), 
            color = "hotpink",
            size = 5) +
  theme_void() +
  theme(panel.background = element_rect(fill = "lightgray"))

Here is one example plot, using the garden_harvest data.

garden_harvest %>% 
  filter(vegetable == "tomatoes") %>% 
  group_by(date) %>% 
  summarize(daily_wt_g = sum(weight)) %>% 
  ggplot(aes(x = date, y = daily_wt_g)) +
  geom_point(color = "darkred") +
  geom_line(color = "darkred") +
  labs(title = "2020 daily tomato harvest (g)",
       x = "",
       y = "") +
  theme_minimal()

gardenr's People

Contributors

llendway avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.