knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  eval = FALSE
)
library(tableauchangementstemporels)

observations <- get_data()

top_ten <- find_top_ten(observations)

top_ten_julday <- count_taxa_julday(observations)

filtered_by_top <- filter_julday_by_top(count_taxa = top_ten_julday, top_spp = top_ten)


gantt_observations <- convert_julian_to_gantt(filtered_by_top)
library(dplyr)
gantt_observations %>% 
  filter(NOM_PROV_N == "Les Appalaches")


filter_plot_gantt("Les Appalaches", gantt_observations)
top_n_data <- select_top_n()

format_for_count_figure(top_n_data)

sorting out the groups

c("amphibiens", "mammifères", "oiseaux", "poissons", "reptiles", 
"") 
glimpse(observations)
# plants are a kingdom 

unique(observations$taxon_kingdom_name)


unique(observations$taxon_phylum_name)


unique(observations$taxon_phylum_name)

observations %>% 
  mutate(taxon_group = 
           case_when(
             taxon_kingdom_name == "Plantae" ~ 
           ))

divide into coarser groups

birds plants other animals

library(tidyverse)
tableauchangementstemporels::data_with_region %>% 
  glimpse
library(dplyr)
tableauchangementstemporels::data_with_region %>% 
  mutate(taxon_group = case_when(
    taxon_class_name == "Aves" ~ "bird",
    taxon_class_name == "Mammalia" ~ "mammal",
    TRUE ~ "other"
  ))


# however tis information doesn't survive
sample_data <- tableauchangementstemporels:::select_top_n_df_input(
  tableauchangementstemporels::data_with_region,
  .how_many_top = 7)


ReseauBiodiversiteQuebec/tableauchangementstemporels documentation built on April 29, 2022, 4:02 p.m.