Get startedGet started for free

Build an Alien Sightings Dashboard

1. Build an Alien Sightings Dashboard

Ever wondered about how many aliens have been sighted since 1910 in the United States? In this lesson, you'll build a dashboard tracking them and find out!

2. Alien Sightings Dashboard

In this chapter, you're going to build four apps using everything you've learned so far in the course. The first will be an alien sightings dashboard. The National UFO Reporting Center collects details about alien sightings from all over the world.The dashboard you're going to build with their data is a subset of what is currently available online. For size reasons, it's only the data from the United States, but after the course concludes I encourage you to download it and make your own app including other countries. The app will allow users to choose a US state, using a drop down selector, then a time period, which is implemented using a dateRangeInput. The dashboard utilizes a tab layout. The first tab is a bar chart of the number of aliens sighted by shape in the selected state and time period. This will change greatly based on the state and date range selected. You can go as far back as 1910, all the way up through 2014, so definitely play with the app to examine the graphs.

3. Choices, choices...

You might be exhausted thinking about having to create a vector that contains the names of all 50 U.S. states. Luckily, there's a trick you can use instead of creating that manually. When using selectInput and you need a large number of possible choices which are available in the dataset, you can use the unique function to create the huge number of choices dynamically. If you have a factor, you can use alternatively the levels function. Here, we'd use usa_ufo_sightings $ shape if we were going to create a selectInput with every shape available in the sightings data.

4. Alien Sightings Dashboard, tab 2

The second tab of the dashboard is a summary table, by shape, of the average, median, minimum, and maximum duration of the sighting for the selected inputs. It also includes the number of each shape seen, which is good practice when you report summary statistics like this. There's a lot of other data available you could use to extend the app with on your own, such as latitude and longitude of the sightings. After the course, you could use leaflet to build a map of sightings.

5. Let's practice!

Now, jump in and build that alien sightings dashboard!

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.