Space Mission ML Project - Part 1(EDA)
Published: 2023-10-19 07:15:31

**About the Dataset**

The Kaggle Dataset today we'll be using for this machine learning project is the space mission launch dataset. This dataset is about the status, cost, rocket status, etc. of the Space missions launched by different space organizations over time. 
You can download the dataset from the link below.
Link of the Kaggle Dataset: https://www.kaggle.com/datasets/sefercanapaydn/mission-launches


**About the Project**

The Machine Learning Project we are going to create today is about exploring how the space mission cost has changed over time, which space organization has seen the most success or failures over time etc., and will create a predictive model to predict the success/failure of the future space missions. We are going to use some amazingly useful Python libraries and Python to create meaningful stories from the data.


## Unleashing the Magic from the Data Begins

**Importing the Essential Libraries**

In this part of the project, we'll be importing just the libraries we are going to use for the data analysis ( the ML libraries will be introduced in the 3rd part of the project).


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3dpuy9wj5ny9ffzotb43.png)
( don't freak out right now, I'll explain everything about the libraries and when to use which one )


**Accessing the Data**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ux027sl3fcvgvfw1jtb.png)
Here we have read the CSV Data file and restructured the data into a pandas DataFrame. Using the head() method we are trying to see the first 5 rows/entries of the dataset. This shows us what and how the datapoints are present in the dataframe. 


**Cleansing and Filtering the Data**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jrp11i3id58zx3nxk7n.png)
We are dropping the two unnamed columns using the drop(inplace=True) (inplace=True represents that we are dropping the columns from the original dataframe) method as they are not providing much value to the dataset. Then we'll check the head() of the dataframe again just to ensure that the columns are no longer in the dataframe.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqnw8ecia33bzjcitm8f.png)
The info() method returns the non-null datapoints account and types of the datapoints.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fio2urov080w235o3ouo.png)
the isna() method shows us whether there are null values or not. We usually drop the null values when there are very few of them but in this case, the Price column is carrying a large amount of null values so we'll handle the null entries differently. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/21ibxxme22kez3xw5kv0.png)
here we can see from the info that the price column is carrying non-numeric values so we are converting the prices into numeric data. 


**Let's see what the Data is telling us**

We have organized details about all of the missions each organization has launched. Let's see the first 10 entries here:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yr5gpvmiew0u570geryo.png)

Here we are trying to see total number of missions of each organization and the organization name with the maximum missions :


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/giwbrdalh7ou0lqv07oc.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gjiylaw2eyfqc8le4caj.png)

Now we'll see how many missions have been successful, how many have failed, and how many have prelaunch and partial failures for each organization. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6j9p1vpg5elnx62zom07.png)

As we know a space mission's success or failure is a significant parameter in an organization's space research history so we need to know the name of the organization with the maximum successful missions.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/15e8dbbor7thbr3lyxq9.png)

To know more and all of the details about an organization we are trying to filter out the data by organizations. Enter a space organization's name and their space mission details will be shown. (here we have printed the Data for ISRO. Go and try it out for SpaceX)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l3ncfxpaq8gvncol088k.png)

Here we are trying to know the status of the rockets of each organization.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jawlkw0zwc1amgorko7t.png)