---
title: "Pengiun visualisation"
author: "Team ASTA"
output: html_document
---

## Introduction

The aim of this exercise is to investigate the penguin data through visualisation.
You should modify and add both some lines of narrative text and R code chunks in the sections below such that you in the end have a small report about the penguin data.
Your report should as a minimum include histogram(s), boxplots(s), and scatterplot(s).
**Feel free to write your narrative text in Danish.**

First we load the relevant packages (notice `message=FALSE` in the chunk option to avoid a lot of uninteresting messages when loading the packages):
```{r message=FALSE}
library(mosaic)
library(palmerpenguins)
```

Then we read in data and omit any `NA` values (you don't have to worry about the details of this):
```{r}
pingviner <- penguins %>% filter(!is.na(sex))
```

## Histogram

Try to make histograms of different variables in the dataset and comment very briefly on them. Also try changing the value of `bins`. Below is an example for bill length
and you should make something similar for other variable choices (both a plot and a few lines of narrative):

```{r}
gf_histogram(~bill_length_mm, data = pingviner, bins = 30)
```

We see that the bill length mostly is between 35 mm and 55 mm, but there are a few penguins outside this range.
The frequency goes strangely up and down.
Maybe this is due to different species and sexes? 
Maybe we can split the visualisation into several histograms to look closer?
Please try this if you can figure out how to do it.
Otherwise simply investigate with boxplots below.

## Boxplot

Try to make boxplots of variables of your choice to illustrate differences for each group and comment very briefly on them.

## Scatterplot

Try to make scatterplots to illustrate the relationship between variables of your choice and comment very briefly on them. 
Possibly include colors and split the plots in different panels.

## Scatterplot with categorical variables

```{r}
gf_point(species ~ island, data = pingviner)
```

- Why does this scatterplot have so few points?
- What can you say about the species distribution on the different islands?
- Try to use the function `gf_count` (and **not** `gf_counts`) for these variables. 
What can you see from this plot?
