Biggest title

Smaller one

Even smaller 😊

This is just a normal text

Example of bold text

Example of italic text

  • Bullet point

“This is a quote”

Displayed name for the link

A picture :

Tweet :

Just copy the embed code :

Gif :

Just copy the embed code :

Chunks :

Library loading + theme setting :

library(tinytex)
library(tidyverse)
library(here)
library(readxl)
library(skimr)
library(beeswarm)
library(RColorBrewer)
library(janitor)

theme_set(theme_classic())

Table reading and assignation :

beaches <- read_csv(here("Data", "sydneybeaches.csv"))

Column cleaning

beaches <- beaches %>%
            clean_names() %>%
            rename(beachbugs=enterococci_cfu_100ml)

Data exploration :

summary(beaches)
##     beach_id        region            council              site          
##  Min.   :22.00   Length:3690        Length:3690        Length:3690       
##  1st Qu.:24.00   Class :character   Class :character   Class :character  
##  Median :26.00   Mode  :character   Mode  :character   Mode  :character  
##  Mean   :25.87                                                           
##  3rd Qu.:27.40                                                           
##  Max.   :29.00                                                           
##                                                                          
##    longitude        latitude          date             beachbugs      
##  Min.   :151.3   Min.   :-33.98   Length:3690        Min.   :   0.00  
##  1st Qu.:151.3   1st Qu.:-33.95   Class :character   1st Qu.:   1.00  
##  Median :151.3   Median :-33.92   Mode  :character   Median :   5.00  
##  Mean   :151.3   Mean   :-33.93                      Mean   :  33.92  
##  3rd Qu.:151.3   3rd Qu.:-33.90                      3rd Qu.:  17.00  
##  Max.   :151.3   Max.   :-33.89                      Max.   :4900.00  
##                                                      NA's   :29

Ggplot :

display.brewer.all()

beaches%>%
  summarise(mean_beachbugs = mean(beachbugs, na.rm = TRUE),
            site,
            .by = site)%>%
  ggplot(aes(x= reorder(site, -mean_beachbugs),
             y = mean_beachbugs, 
             fill = mean_beachbugs)) +
    geom_col() +
    scale_fill_gradient(name = "Beachbug values", 
                        low = "green", 
                        high = "red")+
    coord_flip()+
    labs(title = "Mean beachbugs value \nBy site",
         subtitle = "Just a test", 
         caption = "Data available online on Australian GOV",
         x = "Site",
         y= " Beachbug value")