---
title: "7CS034 - Data Science Assessment"
author: "Gregory Ogbili - 2526253"
format: html
editor: visual
---

## Introduction
This report based on the uploaded dataset explores the data collected during a household census conducted in England in 2021. The report will identify patterns betweeen age, education level, gender, and annual income. Data analytics and visualisation will be done with R and the tidyverse library.


::: {.cell}

```{.r .cell-code}
library(tidyverse)
```

::: {.cell-output .cell-output-stderr}

```
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.1     ✔ stringr   1.5.2
✔ ggplot2   4.0.0     ✔ tibble    3.3.0
✔ lubridate 1.9.4     ✔ tidyr     1.3.1
✔ purrr     1.1.0     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
```


:::

```{.r .cell-code}
df <- tibble(
  Age = c(20, 35, 40, 55),
  INC = c(15000, 30000, 40000, 60000)
)

summary(df)
```

::: {.cell-output .cell-output-stdout}

```
      Age             INC       
 Min.   :20.00   Min.   :15000  
 1st Qu.:31.25   1st Qu.:26250  
 Median :37.50   Median :35000  
 Mean   :37.50   Mean   :36250  
 3rd Qu.:43.75   3rd Qu.:45000  
 Max.   :55.00   Max.   :60000  
```


:::

```{.r .cell-code}
ggplot(df, aes(x = Age, y = INC)) +
  geom_point() +
  geom_smooth(method = "lm", se = FALSE)
```

::: {.cell-output .cell-output-stderr}

```
`geom_smooth()` using formula = 'y ~ x'
```


:::

::: {.cell-output-display}
![](2526253_files/figure-html/unnamed-chunk-1-1.png){width=672}
:::
:::

Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see https://quarto.org.

Running Code

When you click the Render button a document will be generated that includes both content and the output of embedded code. You can embed code like this:

1 + 1
[1] 2

You can add options to executable code like this

[1] 4

The echo: false option disables the printing of code (only output is displayed).