Skip to content

Commit

Permalink
A Long Version of the Challenger Data Set
Browse files Browse the repository at this point in the history
  • Loading branch information
oduerr committed Jun 4, 2024
1 parent 6e47e1c commit d418543
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions data/challenger_long.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: "Challenger Dataset (long Version)"
---

## Description

The long version of the Challenger Dataset.

```{r data, echo=FALSE, eval=FALSE}
# A longer version of the Challenger data
library(alr4)
library(mosaic)
library(DT)
library(pander)
datatable(Challeng)
date = rownames(Challeng)
Challeng = rename(Challeng, c("Temp" = "temp"))
Challeng$Date = as.Date(date, format = "%m/%d/%y")
write.csv(Challeng, "challenger_long.csv", row.names = FALSE)
```

## Comparison
```{r comparison, echo=TRUE, eval=TRUE}
library(edudat)
ds = load_data("challenger.csv")
dl = load_data("challenger_long.csv")
data.frame(dl$fail, ds$Fail) #Same failures
```


## Plot
```{r plot, echo=TRUE, eval=TRUE}
library(ggplot2)
library(edudat)
data <- load_data("challenger_long.csv")
# Create the plot
ggplot(data, aes(x = Temp, y = fail, col=Date)) +
geom_point() +
labs(title = "Temperature vs Failures with Dates",
x = "Temperature (F)",
y = "Failures") +
theme_minimal()
plot(data)
```


0 comments on commit d418543

Please sign in to comment.