Introduction

This report analyzes bike prices from the bikes.xlsx dataset.
We look at the most expensive models and those priced above the average.

Load Libraries

library(tidyverse)
library(readxl)
library(writexl)
bikes <- read_excel("bikes.xlsx")
bikes %>%
  select(model, price) %>%
  arrange(desc(price)) %>%
  head(10)
## # A tibble: 10 × 2
##    model                          price
##    <chr>                          <dbl>
##  1 Supersix Evo Black Inc.        12790
##  2 Scalpel-Si Black Inc.          12790
##  3 Habit Hi-Mod Black Inc.        12250
##  4 F-Si Black Inc.                11190
##  5 Supersix Evo Hi-Mod Team       10660
##  6 Synapse Hi-Mod Disc Black Inc.  9590
##  7 Scalpel-Si Race                 9060
##  8 F-Si Hi-Mod Team                9060
##  9 Trigger Carbon 1                8200
## 10 Supersix Evo Hi-Mod Dura Ace 1  7990
bikes %>%
  select(model, price) %>%
  filter(price > mean(price, na.rm = TRUE))
## # A tibble: 35 × 2
##    model                          price
##    <chr>                          <dbl>
##  1 Supersix Evo Black Inc.        12790
##  2 Supersix Evo Hi-Mod Team       10660
##  3 Supersix Evo Hi-Mod Dura Ace 1  7990
##  4 Supersix Evo Hi-Mod Dura Ace 2  5330
##  5 Supersix Evo Hi-Mod Utegra      4260
##  6 CAAD12 Black Inc                5860
##  7 CAAD12 Disc Dura Ace            4260
##  8 Synapse Hi-Mod Disc Black Inc.  9590
##  9 Synapse Hi-Mod Disc Red         7460
## 10 Synapse Hi-Mod Dura Ace         5860
## # ℹ 25 more rows
bikes %>%
  summarise(
    average_price = mean(price, na.rm = TRUE),
    min_price = min(price, na.rm = TRUE),
    max_price = max(price, na.rm = TRUE),
    n_models = n()
  )
## # A tibble: 1 × 4
##   average_price min_price max_price n_models
##           <dbl>     <dbl>     <dbl>    <int>
## 1         3954.       415     12790       97