TidyTuesday
    • About TidyTuesday
    • Datasets
      • 2025
      • 2024
      • 2023
      • 2022
      • 2021
      • 2020
      • 2019
      • 2018
    • Useful links

    On this page

    • Ninja Warrior
      • Get the data here
      • Data Dictionary
    • ninja_warrior.csv
      • Cleaning Script

    Ninja Warrior

    The data this week comes from Data.World and originally from sasukepedia. Ninja Warrior and the continuation as American Ninja Warrior:

    is an American sports entertainment competition based on the Japanese television series Sasuke. It features hundreds of competitors attempting to complete series of obstacle courses of increasing difficulty in various cities across the United States, in hopes of advancing to the national finals on the Las Vegas Strip and becoming the season’s “American Ninja Warrior.”

    A description of each obstacle and pictures of them can be found at: sasukepedia.

    Get the data here

    # Get the Data
    
    # Read in with tidytuesdayR package 
    # Install from CRAN via: install.packages("tidytuesdayR")
    # This loads the readme and all the datasets for the week of interest
    
    # Either ISO-8601 date or year/week works!
    
    tuesdata <- tidytuesdayR::tt_load('2020-12-15')
    tuesdata <- tidytuesdayR::tt_load(2020, week = 51)
    
    ninja_warrior <- tuesdata$ninja_warrior
    
    # Or read in the data manually
    
    ninja_warrior <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/main/data/2020/2020-12-15/ninja_warrior.csv')

    Data Dictionary

    ninja_warrior.csv

    variable class description
    season double Season Number
    location character Season location
    round_stage character Round stage
    obstacle_name character Name of obstacle
    obstacle_order double Obstacle Order (number)

    Cleaning Script

    library(tidyverse)
    library("httr")
    library("readxl")
    
    GET("https://query.data.world/s/satoodylrno77fbjmxxenx7nrehbkd", write_disk(tf <- tempfile(fileext = ".xlsx")))
    df <- read_excel(tf)
    
    out_df <- df %>% 
      janitor::clean_names()
    
    write_csv(out_df, "2020/2020-12-15/ninja_warrior.csv")