Today, I want to write about “data challenges”, where participants partake in a series of prompts designed for a variety of skill sets and levels. These challenges are opportunities to practice programming skills, work on algorithmic efficiency, or learn something new. Often, participants share the code for their submissions, teaching others their processes and techniques.
The challenges test the participants’ tenacity with time-bound but flexible prompts. TidyTuesday was originally borne out of the R4DS Online Learning Community and the R for Data Science textbook. RStudio’s Tom Mock shares a dataset every Tuesday. The challenge is to explore the dataset and create a chart within seven days. Participants decide what variables to focus on and how to best visualize them.
Using a recent TidyTuesday dataset, Moriah Taylor visualizes alternative fueling stations in the U.S. The stacked tilted maps communicate relationships, density, and location while demonstrating beautiful design.
#plot tilted maps plot <- plot_tiltedmaps(maps_list, layer = c("value", "value", "value", "value"), palette = c("magma", "magma", "magma", "magma"))
Data challenges can also be language-agnostic. Genuary encourages participants to create works of generative art with the programming language of their choice. R users apply their coding skills and tools in imaginative ways. On Day 6 of genuary, Ryan Timpe “destroys the square”:
Taking a look at the code, we learn how to plot a square in R with the tidyr and dplyr packages:
library(tidyverse) set.seed(12238) #The square square_size = 400 the_square <- expand_grid( x=1:square_size, y=1:square_size ) %>% mutate( color = "#87ceeb" ) plot(the_square$x, the_square$y)
We can also see how Ryan inserts randomness to ‘destroy’ the square through the strategic use of functions like
circ_origin_size = square_size * runif(1, 2/4, 3/4)
Interested in participating in a data challenge? The 30 Day Chart Challenge is coming up. The organizers offer different chart types for you to visualize in April. Showcase your R skills, test your perseverance, and use the hashtag
#30DayChartChallenge to share your work with other participants.
We started to compile a list of other data challenges to join. Please leave a comment if you are aware of others.
|April||30 Day Chart Challenge||https://twitter.com/30DayChartChall|
|November||30 Day Map Challenge||https://github.com/tjukanovt/30DayMapChallenge|
|December||Advent of Code||https://adventofcode.com/|
|Thursday, Summer Months||Recreation Thursday||https://github.com/sharlagelfand/RecreationThursday|
|Ongoing||100 Days of Code||https://www.100daysofcode.com/|