Using ggplot2 and R to recreate a data journalist's figure about Michigan wages (CC321)

Поділитися
Вставка
  • Опубліковано 4 гру 2024

КОМЕНТАРІ • 12

  • @moviezone8130
    @moviezone8130 День тому +1

    Thanks again for yet another video which rises the bar high! I gained a lot of valuable lessons. I do have one suggestion to you, would you please start a lesson on the programming aspect of R programming from basics to advanced level in a structured way by doing you your channel will stand out from the rest of the crowd sir. By the way I am following you from Ethiopia, Addis Ababa.

    • @Riffomonas
      @Riffomonas  День тому +1

      Thanks for watching and your suggestion! My struggle with covering basic programming concepts is that it's hard to create a story out of the lesson that I think is interesting enough. I'll keep it in mind though for the future.

  • @alenesia_
    @alenesia_ 2 дні тому

    I loved your presentation!
    Your fresh perspective on data visualization is really inspiring.
    Thanks for sharing your knowledge!

  • @belantaribrahim850
    @belantaribrahim850 2 дні тому

    Great video as always 💯...thank you.
    These past days I have been diving into diversity in ecology (alpha, beta, gamma, Shannon, Simpson...), since I don't have a lot of experience in statistics with ecological data I am learning as I go, and when it comes to R I always turn to your videos 😅.
    I found your previous code club videos about dissimilarity matrices, NMDS, Mantel...very helpful of course, but in my research I came across Hill numbers and "hill.div" package...it would be so great if you make some videos about the package and the Hill numbers.
    Thank you again...always keep making these videos🤗🤗

    • @Riffomonas
      @Riffomonas  2 дні тому +1

      My pleasure - thanks for watching! I'll add hill numbers to the list of things to cover in the future

  • @Sabin625
    @Sabin625 2 дні тому

    So good, love to see you work. For me a lot of job is now being done by Calude. I think it is ruining my skills in terms of thinking how to do it.

    • @Riffomonas
      @Riffomonas  2 дні тому

      There's only one AI that I encourage people to use: *ACTUAL* intelligence 🤓

  • @wolfgangr.9593
    @wolfgangr.9593 День тому

    Great work, but I'm not a huge fan of this heavy use of annotations. They won't change when your data changes.
    Instead you could use something like:
    ...
    scale_y_continuous(labels = scales::label_currency())+
    coord_cartesian(ylim = c(0, NA),
    xlim = c(-0.6, 6.6), clip = "off", expand = FALSE) +
    ...
    theme(
    ...
    axis.text.y = element_text(hjust = 0, vjust = -0.3, size = 13, face = "bold", margin = margin(r = -58)),
    ...
    )
    The definition of margin is not ideal (it's hardcoded and might need adaption) but I think it's overall a more "robust" solution

    • @Riffomonas
      @Riffomonas  День тому

      Thanks for your code! It's great to see people riffing off of what I'm sharing 🤓. To get yours to match mine, I had to adjust the margin (mainly the left) since the gridlines were going all the way to the left edge of the figure...
      axis.text.y = element_text(hjust = 0, vjust = -0.3,
      size = 13, face = "bold", margin = margin(l = 10, r = -40)),
      I think I still prefer the annotate() approach since the meaning of the x and y positions are a bit more clear than the units on the margin and the vjust. For what it's worth, I tried adding fake 2024 data and I don't think it would take much/any fiddling to get it to look right. Thanks again for sharing - there's certainly multiple ways to do this