-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.qmd
More file actions
57 lines (38 loc) · 2.35 KB
/
Copy pathindex.qmd
File metadata and controls
57 lines (38 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
title: "Baltimore Data Day 2024"
---
This activity is meant to guide you through some R fundamentals so you can get started on your data journey!
## Installing R and RStudio
You will need to install R. RStudio is a development environment for running R. It comes with a lot of cool features.
- [Download and Install R](http://cran.us.r-project.org/).
- [Downlaod and Install RStudio](https://posit.co/download/rstudio-desktop/).
If you work on a Windows machine, you might also need to install [R Tools](https://cran.r-project.org/bin/windows/Rtools/).
## Navigate RStudio
Locate the following in RStudio:
- **Console**. This is where code is run.
- **Environment**. This shows you objects R can work with.
```{r, out.width = "60%", echo = FALSE}
knitr::include_graphics("img/console.png")
```
```{r, out.width = "60%", echo = FALSE}
knitr::include_graphics("img/environment.png")
```
Read more about the RStudio user interface [here](https://docs.posit.co/ide/user/ide/guide/ui/ui-panes.html).
## Organize your files
We will create an "R Project" to stay organized. You can create many more later.
- Go to File > New Project...
- Select "New Directory".
- Select "New Project".
- Provide a Directory name, such as "Intro to R".
- Pick a reasonable location, such as your Documents folder.
## Intro to R Activity
Now we will transition to the activities, which are actually in the code files!
- Download [This file](https://www.avahoffman.com/BDD24/BDD.Rmd).
- Download [This BNIA data about library cards](https://www.avahoffman.com/BDD24/Number_of_Persons_with_Library_Cards_per_1,000_Residents_-_Community_Statistical_Area.csv). [(source)](https://vital-signs-bniajfi.hub.arcgis.com/datasets/bniajfi::number-of-persons-with-library-cards-per-1000-residents-1/explore?layer=0&location=39.309794%2C-76.594879%2C13.82)
- Move the downloaded files to the directory you created above.
- Open `BDD.Rmd` in RStudio (File > Open File or simply double-click).
## Tidycensus Activity
- Download [This file](https://www.avahoffman.com/BDD24/start_using_tidycensus.Rmd).
- Move the downloaded files to the directory you created above.
- Open `start_using_tidycensus.Rmd` in RStudio (File > Open File or simply double-click).
- You will need a free Census API key, this lets your computer communicate with Census. A key can be obtained from <http://api.census.gov/data/key_signup.html>.