This week’s coding goals

  1. Working through Week 2’s Data Visualisation videos
  2. Become more coding-literate / coding-savvy
  3. Go through the exercises included in Danielle’s videos to help with Goal 2

The Dataset

  • I was planning to use a new dataset to explore with in R, but after struggling to follow along with the videos, I decided to just use the same datasets that Danielle used and attempt to recreate them

How did I go?

Successes

  1. I achieved Goals 1 and 3
  • Goal 1 = watched all of Week 2’s videos
  • Goal 3 = completed all the exercises (though it did take a while)
  1. I was able to recreate the graphs and follow along with Danielle’s videos

Challenges

  • Small mistakes when tidying up the code like spacing and mismatching parentheses so the code kept outputting wrong or getting error messages

  • Did not achieve Goal 2 of becoming more coding-literate.

    • I struggled with recreating and understanding what was happening in Week 2’s videos

Some highlights

Dino exercise

I was able to follow along with this dataset. Further, when I attempted to recreate it a couple of days later, I was able to do it without having to consult my notes!

library(tidyverse)

dino <- read_csv("data_dino.csv")

print(dino)

picture <- ggplot(data = dino) +
  geom_point(mapping = aes(x = horizontal, y = vertical))
  
plot(picture)

Here is the recreated dino:

Forensic exercise

I struggled with this dataset so instead of experimenting with the dataset and trying new variables, I simply attempted to follow along with the videos.

Here’s what I did:

forensic <- read_csv("data_forensic.csv")

print(forensic)

picture <- ggplot(data = forensic) +
  geom_boxplot(mapping = aes(x = band, y = est, fill = band)) +
  facet_wrap(vars(handwriting_expert))
  
plot(picture)

Here is what it looks like:

I changed the themes and the axis labels:


pic1 <- picture + theme_minimal() +
  scale_x_discrete(name = NULL, labels = NULL) +
  scale_y_continuous(name = NULL)

plot(pic1)

Here’s what it looks like:

I added a title:

pic2 <- pic1 + ggtitle("Estimated frequency of handwriting features") 

plot(pic2)

Here’s what it looks like:

What’s the next step?

  1. Understand what’s happening in RStudio by going through the videos again and redoing the exercises without looking at the notes

  2. Play around with different datasets to more fully explore RStudio

  3. If I can achieve those first 2 steps, and feel more confident, then I’ll move to the next step of going through Week 3’s videos