Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/main/10. Applied Data Science Capstone/02. Data Wrangling/02. Data Wrangling.ipynb
Views: 4598
Space X Falcon 9 First Stage Landing Prediction
Lab 2: Data wrangling
Estimated time needed: 60 minutes
In this lab, we will perform some Exploratory Data Analysis (EDA) to find some patterns in the data and determine what would be the label for training supervised models.
In the data set, there are several different cases where the booster did not land successfully. Sometimes a landing was attempted but failed due to an accident; for example, True Ocean
means the mission outcome was successfully landed to a specific region of the ocean while False Ocean
means the mission outcome was unsuccessfully landed to a specific region of the ocean. True RTLS
means the mission outcome was successfully landed to a ground pad False RTLS
means the mission outcome was unsuccessfully landed to a ground pad.True ASDS
means the mission outcome was successfully landed on a drone ship False ASDS
means the mission outcome was unsuccessfully landed on a drone ship.
In this lab we will mainly convert those outcomes into Training Labels with 1
means the booster successfully landed 0
means it was unsuccessful.
Falcon 9 first stage will land successfully
Several examples of an unsuccessful landing are shown here:
Objectives
Perform exploratory Data Analysis and determine Training Labels
Exploratory Data Analysis
Determine Training Labels
Import Libraries and Define Auxiliary Functions
We will import the following libraries.
Data Analysis
Load Space X dataset, from last section.
Identify and calculate the percentage of the missing values in each attribute
Identify which columns are numerical and categorical:
TASK 1: Calculate the number of launches on each site
The data contains several Space X launch facilities: Cape Canaveral Space Launch Complex 40 VAFB SLC 4E , Vandenberg Air Force Base Space Launch Complex 4E (SLC-4E), Kennedy Space Center Launch Complex 39A KSC LC 39A .The location of each Launch Is placed in the column LaunchSite
Next, let's see the number of launches for each site.
Use the method value_counts()
on the column LaunchSite
to determine the number of launches on each site:
Each launch aims to an dedicated orbit, and here are some common orbit types:
LEO: Low Earth orbit (LEO)is an Earth-centred orbit with an altitude of 2,000 km (1,200 mi) or less (approximately one-third of the radius of Earth),[1] or with at least 11.25 periods per day (an orbital period of 128 minutes or less) and an eccentricity less than 0.25.[2] Most of the manmade objects in outer space are in LEO [1].
VLEO: Very Low Earth Orbits (VLEO) can be defined as the orbits with a mean altitude below 450 km. Operating in these orbits can provide a number of benefits to Earth observation spacecraft as the spacecraft operates closer to the observation[2].
GTO A geosynchronous orbit is a high Earth orbit that allows satellites to match Earth's rotation. Located at 22,236 miles (35,786 kilometers) above Earth's equator, this position is a valuable spot for monitoring weather, communications and surveillance. Because the satellite orbits at the same speed that the Earth is turning, the satellite seems to stay in place over a single longitude, though it may drift north to south,” NASA wrote on its Earth Observatory website [3] .
SSO (or SO): It is a Sun-synchronous orbit also called a heliosynchronous orbit is a nearly polar orbit around a planet, in which the satellite passes over any given point of the planet's surface at the same local mean solar time
ES-L1 :At the Lagrange points the gravitational forces of the two large bodies cancel out in such a way that a small object placed in orbit there is in equilibrium relative to the center of mass of the large bodies. L1 is one such point between the sun and the earth [5] .
HEO A highly elliptical orbit, is an elliptic orbit with high eccentricity, usually referring to one around Earth [6].
ISS A modular space station (habitable artificial satellite) in low Earth orbit. It is a multinational collaborative project between five participating space agencies: NASA (United States), Roscosmos (Russia), JAXA (Japan), ESA (Europe), and CSA (Canada) [7]
MEO Geocentric orbits ranging in altitude from 2,000 km (1,200 mi) to just below geosynchronous orbit at 35,786 kilometers (22,236 mi). Also known as an intermediate circular orbit. These are "most commonly at 20,200 kilometers (12,600 mi), or 20,650 kilometers (12,830 mi), with an orbital period of 12 hours [8]
HEO Geocentric orbits above the altitude of geosynchronous orbit (35,786 km or 22,236 mi) [9]
GEO It is a circular geosynchronous orbit 35,786 kilometres (22,236 miles) above Earth's equator and following the direction of Earth's rotation [10]
PO It is one type of satellites in which a satellite passes above or nearly above both poles of the body being orbited (usually a planet such as the Earth [11]
some are shown in the following plot:
TASK 2: Calculate the number and occurrence of each orbit
Use the method .value_counts()
to determine the number and occurrence of each orbit in the column Orbit
TASK 3: Calculate the number and occurence of mission outcome per orbit type
Use the method .value_counts()
on the column Outcome
to determine the number of landing_outcomes
.Then assign it to a variable landing_outcomes.
True Ocean
means the mission outcome was successfully landed to a specific region of the ocean while False Ocean
means the mission outcome was unsuccessfully landed to a specific region of the ocean. True RTLS
means the mission outcome was successfully landed to a ground pad False RTLS
means the mission outcome was unsuccessfully landed to a ground pad.True ASDS
means the mission outcome was successfully landed to a drone ship False ASDS
means the mission outcome was unsuccessfully landed to a drone ship. None ASDS
and None None
these represent a failure to land.
We create a set of outcomes where the second stage did not land successfully:
TASK 4: Create a landing outcome label from Outcome column
Using the Outcome
, create a list where the element is zero if the corresponding row in Outcome
is in the set bad_outcome
; otherwise, it's one. Then assign it to the variable landing_class
:
This variable will represent the classification variable that represents the outcome of each launch. If the value is zero, the first stage did not land successfully; one means the first stage landed Successfully
We can use the following line of code to determine the success rate:
We can now export it to a CSV for the next section,but to make the answers consistent, in the next lab we will provide data in a pre-selected date range.
Authors
Joseph Santarcangelo has a PhD in Electrical Engineering, his research focused on using machine learning, signal processing, and computer vision to determine how videos impact human cognition. Joseph has been working for IBM since he completed his PhD.
Nayef Abou Tayoun is a Data Scientist at IBM and pursuing a Master of Management in Artificial intelligence degree at Queen's University.
Change Log
Date (YYYY-MM-DD) | Version | Changed By | Change Description |
---|---|---|---|
2021-08-31 | 1.1 | Lakshmi Holla | Changed Markdown |
2020-09-20 | 1.0 | Joseph | Modified Multiple Areas |
2020-11-04 | 1.1. | Nayef | updating the input data |
2021-05-026 | 1.1. | Joseph | updating the input data |
Copyright © 2021 IBM Corporation. All rights reserved.