Plant.Pop: A simulated dataset of a population of plants.

Description Usage Format Examples

Description

The plants are in a 100 x 100 grid and display a moderate amount of clustering. The grid is divided into 16 25x25 Quadrats, or 100 10x10 Plots. The data is give as the number of individual plants in a 1x1 grid cell.

Usage

1

Format

A data frame with 10,000 rows and 6 variables:

x

The x coordinate of a 1x1 grid cell.

y

The y coordinate of a 1x1 grid cell.

Quadrant

Which 25x25 quadrant the grid cell is in [a-p].

Plot

Which 10x10 plot the grid cell is in [1-100].

Site

A unique identifier of the 1x1 grid cell [1 - 10,000].

count

The number of plants within a site.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
library(ggplot2)
library(dplyr)
data(Plant.Pop)

NonZero <- Plant.Pop %>% filter( count >= 1 )
ggplot( NonZero, aes(x=x, y=y, color=count)) + 
  geom_point(alpha=.3)

# Aggregate over quadrants
Plant.Quads <- Plant.Pop %>%
  group_by(Quadrant) %>%
  summarize(x=mean(x),
            y=mean(y),
            count=sum(count))   
ggplot(Plant.Quads, aes(x=x, y=y)) +
  geom_point(data=Plant.Pop, alpha=.3, aes(color=count)) +
  geom_text(aes(label=Quadrant))  
  
# Aggregate over plots
Plant.Plots <- Plant.Pop %>%
  group_by(Plot) %>%
  summarize(x=mean(x),
            y=mean(y),
            count=sum(count))   
ggplot(Plant.Plots, aes(x=x, y=y)) +
  geom_point(data=Plant.Pop, alpha=.3, aes(color=count)) +
  geom_text(aes(label=Plot))  

dereksonderegger/dsData documentation built on Nov. 22, 2020, 5:15 p.m.