Skip to content

Commit b7508b9

Browse files
authored
Merge pull request #6 from tidy-survey-r/getting-started
Initial Getting Started Slides
2 parents cb934d9 + f32c375 commit b7508b9

File tree

6 files changed

+4972
-524
lines changed

6 files changed

+4972
-524
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
.Ruserdata
55

66
/.quarto/
7-
/_site/
7+
/_site/
8+
9+
*.html

_brand.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,4 @@ typography:
5050
background-color: lightblue2
5151
link:
5252
decoration: underline
53-
54-
defaults:
55-
bootstrap:
56-
# bootstrap variable definitions
57-
quarto:
58-
format:
59-
# basic format-specific settings
60-
html:
61-
revealjs:
62-
shiny:
63-
# shiny specific settings
53+

getting-started_exercises.qmd

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
title: "Getting Started Exercises"
3+
format: html
4+
---
5+
6+
# Set-up
7+
8+
## Load necessary packages
9+
10+
```{r}
11+
#| label: set-up-00
12+
library(tidyverse)
13+
library(gt)
14+
```
15+
16+
## Preview data
17+
18+
```{r}
19+
#| label: towny-preview-00
20+
glimpse(towny)
21+
```
22+
23+
# Exercises
24+
25+
1. How many different types of CSD (`csd_type`) are there in the dataset?
26+
27+
```{r}
28+
#| label: exercise-00-01
29+
30+
```
31+
32+
33+
2. How many different types of CSD and status (`status`) are there in the dataset?
34+
35+
```{r}
36+
#| label: exercise-00-02
37+
38+
```
39+
40+
41+
3. What is the proportion of each type of CSD?
42+
43+
```{r}
44+
#| label: exercise-00-03
45+
46+
```
47+
48+
4. What is the proportion of each status within type of CSD?
49+
50+
```{r}
51+
#| label: exercise-00-04
52+
53+
```
54+
55+
5. What is the mean population of all of the municipalities in 2021?
56+
57+
```{r}
58+
#| label: exercise-00-05
59+
60+
```
61+
62+
6. What is the mean population by CSD Type in 2021?
63+
64+
```{r}
65+
#| label: exercise-00-06
66+
67+
```
68+
69+
7. What is the mean population of all of the municipalities in 1996, 2001, 2006, 2011, 2016, and 2021? Try to use the across function.
70+
71+
```{r}
72+
#| label: exercise-00-07
73+
74+
```
75+
76+
8. Run a simple t-test to see if the average population in 1996 is different from the average population in 2016.
77+
78+
```{r}
79+
#| label: exercise-00-08
80+
81+
```

images/towny.png

1.5 MB
Loading

0 commit comments

Comments
 (0)