Motivation There are some things that I always forget how to do in R. I have decided to add some of those code snippets to this blog so I that I can look them up when I need them. Droping variables using a vector of names I often have a pre-specified vector of variables names that I use frequently and sometimes I want to drop those variables. The trick is to use one_of around the vector with variable names.
Background Back in March I wrote a blog post about my favourite board game Settlers of Catan. The code generates a random catan board but there is no interactivity for when you want to create a different random board. You can read it in its entirety here and somewhere in that post I promised to actually create an app so you can create your own board. I tried when I wrote the original blog post but I struggled with Shiny.
Gender pay gap hackathon (part 2) This is part 2 of my blog about the gender pay gap hack that I went to. You can read part 1 here. Reflections It has taken me a long time to write the second part of my experience of the hackathon. I think this is partly because I was unsure how/whether to show the dashboard. This was my first attempt at a shiny dashboard and I did not focus on picking the best metrics for the graphs so I don’t feel like I am showing anything useful and I don’t like the thought of sharing graphs that I am not sure are displaying the data in an appropriate way.
Gender pay gap hackathon Last weekend I went to my first hackathon. It was organised by the AI club for gender minorities, codebar and ellpha. We used data on the gender pay gap available here. I had a great time so I wanted to share my experience. This is the first part of my first hackathon. The deep dive team There were different tables with different themes and I picked deep dive.
Tidy Tuesday I have seen some cool graphs on twitter created for Tidy Tuesday. I wanted to join in on the fun so I downloaded the data from week 3 and started playinh. The data are from our world in data and I downloaded the data file from github. mortality <- readxl::read_excel(here::here("global_mortality.xlsx")) glimpse(mortality) ## Observations: 6,156 ## Variables: 35 ## $ country <chr> "Afghanistan", "Afg... ## $ country_code <chr> "AFG", "AFG", "AFG".
Settlers of catan In our living room there is an old chest hiding some real treasures. Every now and again we will get Settlers of Catan out. I never grow tired of playing it as the board changes every time. The game has 19 hexagon shaped tiles that are placed at random. Eighteen tiles are linked to different resources -wheat, rock, wood, sheep and clay- and the 19th is the desert where the much feared robber lives.
The code that never really worked This post is the result of hours and hours of me trying to write some code but never getting it quite right. I think that one of the worst things that you can do to yourself is to be scared to admit that you are struggling because you will end up never trying anything new. That is why I am publishing what I have got so far despite not being very happy with it.