Get startedGet started for free

Introduction to the space launches data

1. Introduction to the space launches data

Now that you're familiar with animation and linked views, let's work on a case study.

2. Launches data set

The dataset that you'll explore contains information about individual space launches, including launches by both governments and private companies, such as SpaceX. I'll take a few minutes to introduce the data, and then you'll have a chance to apply your new toolkit. The data come from Jonathan McDowell's JSR Launch Vehicle Database by way of the Economist's GitHub repository. The data can also be found in R for data science's Tidy Tuesday GitHub repository. The data set represents an attempt to provide a complete list of all orbital launches: including both successful and failed launches.

3. Launches data set

The data set consists of 5,726 launches occurring between 1957 and 2018, on which eleven variables were recorded.

4. Variables

Key variables for this case study will include: The year of the launch, the launching agency, the state code, the success status of the launch, and the type of agency; that is, whether it was a state or private company.

5. Exploring the space race

Throughout this chapter you will use the launches dataset to explore how the space race has unfolded over time, and how it has been reshaped with the emergence of private companies entering the race. To do this, you'll use the tools you've learned in this course. For example, you'll create this animation of how the space race by governments has evolved.

6. R package downloads

Before we launch into our exploration of the space race, let's review how to create ShareData objects. To do this, we'll create a time series plot displaying the monthly CRAN downloads of four interactive data viz packages in R: plotly, ggvis, highcharter, and rbokeh. Further, we'll enable grouped brushing by R package.

7. CRAN download logs

The monthly logs dataset consists of the number of downloads of each R package at the end of each month. If the package wasn't downloaded that month, then it doesn't appear in the dataset.

8. Grouped brushing

To enable grouped brushing, we first need to create a SharedData object. Here we define shared underscore logs by piping in the monthly_logs data frame into the command SharedData$new. To enable grouped brushing by package, we add the argument key equals tilde package. Recall that without the key argument, you would be able to select individual points rather than groups of points. To create the brushable time series plot, we pipe shared_logs into the plotting pipeline rather than the original data frame. Finally, we add the highlight() command to the end of the plotting pipeline to enable grouped brushing.

9. Let's practice!

Now that you understand the key variables in the launches data set and remember how grouped brushing works in plotly, it's time to begin exploring the launches data set.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.