Skip to content

erictleung/bbggplots

Repository files navigation

bbggplots

R Build Status License CC0 Project Type Toy Badge

R data package to explore the cherry blossoms at the Brooklyn Botanic Garden

Installation

You can install the development version of bbggplots from GitHub with:

remotes::install_github("erictleung/bbggplots")

Example

library(bbggplots)

bbgdata
#> # A tibble: 11,534 × 5
#>    date       alt                        tree              id    bloom   
#>    <date>     <chr>                      <chr>             <chr> <chr>   
#>  1 2016-03-16 Prunus ‘Kanzan’            kanzan            50    Prebloom
#>  2 2016-03-16 Prunus ‘Snow Goose’        prunus_snow_goose 147   Prebloom
#>  3 2016-03-16 Prunus × sieboldii         sieboldii         161   Prebloom
#>  4 2016-03-16 Prunus × sieboldii         sieboldii         160   Prebloom
#>  5 2016-03-16 Prunus × subhirtella       subhirtella       159   Prebloom
#>  6 2016-03-16 Prunus ‘Ukon’              ukon              158   Prebloom
#>  7 2016-03-16 Prunus serrulata ‘Horinji’ horinji           157   Prebloom
#>  8 2016-03-16 Prunus × yedoensis         yedoensis         156   Prebloom
#>  9 2016-03-16 Prunus ‘Ariake’            ariake            154   Prebloom
#> 10 2016-03-16 Prunus ‘Shirotae’          shirotae          153   Prebloom
#> # ℹ 11,524 more rows
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union

# Number of data points per year
bbgdata |>
  mutate(year = substr(date, 1, 4)) |>
  count(year, tree, id, name = "days_of_data") |>
  count(year, days_of_data, name = "number_of_trees") |>
  mutate(data_points = days_of_data * number_of_trees) |>
  group_by(year) |>
  mutate(
    total_trees = sum(number_of_trees),
    pct_trees = number_of_trees / sum(number_of_trees) * 100
  )
#> # A tibble: 8 × 6
#> # Groups:   year [4]
#>   year  days_of_data number_of_trees data_points total_trees pct_trees
#>   <chr>        <int>           <int>       <int>       <int>     <dbl>
#> 1 2016             4               2           8         155     1.29 
#> 2 2016            10               3          30         155     1.94 
#> 3 2016            14             150        2100         155    96.8  
#> 4 2018             7             151        1057         151   100    
#> 5 2025             6               1           6         152     0.658
#> 6 2025            22             151        3322         152    99.3  
#> 7 2026            28               1          28         152     0.658
#> 8 2026            33             151        4983         152    99.3

Documentation

You can find information about the data sets and more here. And, a list of vignettes showcasing some analyses you can do with this package can be found here.

Data

This data here within is not constrained to exploring just within R.

Here are direct links to each data set.

https://raw.githubusercontent.com/erictleung/bbggplots/main/data-raw/bbg_tree_blooms/bbg_tree_bloom_2016.csv
https://raw.githubusercontent.com/erictleung/bbggplots/main/data-raw/bbg_tree_blooms/bbg_tree_bloom_2018.csv
https://raw.githubusercontent.com/erictleung/bbggplots/main/data-raw/bbg_tree_blooms/bbg_tree_bloom_2019.csv
https://raw.githubusercontent.com/erictleung/bbggplots/main/data-raw/bbg_tree_blooms/bbg_tree_bloom_2025.csv
https://raw.githubusercontent.com/erictleung/bbggplots/main/data-raw/bbg_tree_blooms/bbg_tree_bloom_2026.csv

Feedback

If you have any feedback or suggestions on other data that can be added, please file an issue here.

Code of Conduct

Please note that the {bbggplots} project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Acknowledgments

About

🌸 Data for cherry blossom status at the Brooklyn Botanic Garden

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors