BaşlayınÜcretsiz Başlayın

State vs. private launches

Based on the previous graphic, it seems that, aside from China, there has been a decline in launches. Is this true? Or has the space race reached the private market? In this exercise, your task is to explore this question by comparing the number of launches by states and private companies over time.

The plotly, crosstalk, and dplyr packages are already loaded.

Bu egzersiz

Intermediate Interactive Data Visualization with plotly in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Create a new SharedData object from the launches_by_year data frame.
  • Create a line chart to represent the number of launches over time (launch_year) by agency_type. Use color to represent agency_type.
  • Enable selection (i.e. highlighting) of an agency_type.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# table of launches by year and agency type
launches_by_year <- launches %>% count(launch_year, agency_type)

# create a ShareData object for plotting
shared_launches <- launches_by_year %>% ___(key = ___)

# create a line chart displaying launches by agency type, with highlighting
shared_launches %>%
  ___(___, ___, ___) %>%
  ___() %>%
  ___()
Kodu Düzenle ve Çalıştır