You are on page 1of 25

"Data Analysis using

Pandas and Matplot


"Visualizing SpaceX Mission Data"
Submitting to, Prof.
Somesh Nandi
Students Involved
• Avikshith
Kulenady(1RV22AS008)
• HemendraSingh
Rathod(1RV22AS020)
• Arjun Sahu(1RV22AS006)
• Introduction to data analysis
• Loading data with Pandas
• Analyzing launch success
• Visualizing payload

"Agenda" distribution
• Exploring booster
reusability
• Analyzing cost relationships
• Investigating launch site
distribution
• Data analysis is a fundamental
process in extracting valuable
insights from data. It involves
examining, cleaning,
"Introduction transforming, and visualizing
to Data data to make informed
decisions. In this presentation,
Analysis" we will explore the world of
data analysis using Pandas, a
powerful Python library, and
apply it to real-world data from
SpaceX missions.
• To perform data analysis, we
start by loading our dataset. In
"Loading this presentation, we use a
dataset containing information
the about SpaceX missions. We use
Dataset" the ‘pd.read_csv()’ function from
Pandas to load the data into a
data frame.
import pandas as pd
“Loading import matplotlib.pyplot as plt

the
# Load the CSV dataset into a
Dataset DataFrame

Code” df = pd.read_csv(r'C:\Users\Arjun\
Desktop\Space x data 1.csv')
Payload Mission
Mission Launch Launch Payload Payload Launch Booster Reusabilit Payload Cost Cost
Name Date Site Name Type Orbit Success Type y Mass (kg) (USD) (USD)
Falcon 1 -
March 24, Kwajalein Communi Single Single
Maiden RatSat LEO Failure 165 6 6.7
2006 Atoll cation Use Use
Flight
Falcon 1 - July 28, Kwajalein Single Single
FalconSat Scientific LEO Failure 165 6 6.7
FalconSat 2006 Atoll Use Use
Falcon 1 -
March 21, Kwajalein Single Single
Demoflig N/A N/A N/A Failure N/A N/A 7.5
2007 Atoll Use Use
ht 2
Earth
Falcon 1 - Septembe Kwajalein RazakSA Single Single
Observati SSO Failure 200 10 10.9
Flight 4 r 28, 2008 Atoll T Use Use
on
Falcon 1 - July 14, Kwajalein Single Single
N/A N/A N/A Failure N/A N/A 8
Flight 5 2009 Atoll Use Use
Falcon 9 -
COTS December Cape
Dragon Resupply LEO Success Reused Reused 525 50 278
Demo 8, 2010 Canaveral
Flight 1
Falcon 9 -
COTS October Cape
Dragon Resupply LEO Success Reused Reused 500 50 185
Demo 8, 2012 Canaveral
Flight 2
Falcon 9 - October Cape
Dragon Resupply LEO Success Reused Reused 400 60 197
CRS-1 7, 2012 Canaveral
"Plot 1: Launch
Success vs. Failure"

• We begin our analysis by exploring the


success and failure rates of SpaceX
launches.
• A bar chart is created to visualize the
number of successful and failed
launches.
• This chart helps us understand the
company's track record in terms of
mission success.
Plot 1: Launch Success vs.
Failure Code

launch_success_counts = df['Launch
Success'].value_counts()
launch_success_counts.plot(kind='bar', rot=0)
plt.title('Launch Success vs. Failure')
plt.xlabel('Launch Status')
plt.ylabel('Count')
plt.xticks([0, 1], ['Failure', 'Success'])
plt.show()
"Plot 2: Payload Mass
Distribution"

• Payload mass is an important factor


in space missions.
• To understand the distribution of
payload masses, we use a
histogram.
• The histogram provides insights
into the range and frequency of
payload masses, which can
influence mission planning.
plt.hist(df['Payload Mass (kg)'],
bins=20, edgecolor='k')
"Plot 2: plt.title('Payload Mass
Payload Mass Distribution')
Distribution
plt.xlabel('Payload Mass (kg)')
Code
plt.ylabel('Frequency')
plt.show()
"Plot 3: Booster
Reusability"
• SpaceX is known for its efforts in
booster reusability, which can
significantly reduce mission costs.
• We visualize booster reusability
using a pie chart to see the
distribution of reused and single-use
boosters.
• This chart highlights SpaceX's
commitment to reusability.
booster_reusability_counts =
df['Booster
"Plot 3: Reusability'].value_counts()
Booster booster_reusability_counts.plot(kin
d='pie', autopct='%1.1f%%')
Reusability
plt.title('Booster Reusability')
Code”
plt.ylabel('')
plt.show()
"Plot 4: Payload Cost vs.
Mission Cost"

• Analyzing the cost structure of


space missions is crucial.
• We use a scatter plot to examine
the relationship between payload
cost and mission cost.
• This analysis provides insights
into cost dynamics in different
missions.
"Plot 4: • plt.scatter(df['Payload Cost
(USD)'], df['Mission Cost
Payload (USD)'], alpha=0.5)
Cost vs. • plt.title('Payload Cost vs. Mission
Cost')
Mission • plt.xlabel('Payload Cost (USD)')
Cost • plt.ylabel('Mission Cost (USD)')
Code” • plt.show()
"Plot 5: Launch Site
Distribution"
• SpaceX conducts launches from
various launch sites.
• To understand the distribution of
launches, we create a bar chart
that displays the count of launches
from each site.
• This chart helps identify the most
frequently used launch sites.
launch_site_counts = df['Launch
Site'].value_counts()
"Plot 5: launch_site_counts.plot(kind='bar',
Launch Site rot=45)
Distribution plt.title('Launch Site Distribution')
Code” plt.xlabel('Launch Site')
plt.ylabel('Count')
plt.show()
"Conclusion"
• Data analysis is a powerful tool for extracting
insights from complex datasets.
• Through our analysis of SpaceX mission data, we've
gained valuable insights into launch success, payload
distribution, booster reusability, cost relationships,
and launch site distribution.
• Data analysis plays a crucial role in decision-making
and optimizing processes.
References
1. SpaceX Official Website:
1. Website: SpaceX
2. Source of official information about SpaceX missions and activities.

2. Kaggle Datasets:
1. Website: Kaggle Datasets
2. Kaggle hosts a wide range of datasets, including space-related data, that can be used for data analysis and research.

3. Python Pandas Documentation:


1. Website: Pandas Documentation
2. The official documentation for Pandas provides in-depth information on data manipulation and analysis using Pandas.

4. Matplotlib Documentation:
1. Website: Matplotlib Documentation
2. The official documentation for Matplotlib contains detailed resources for creating data visualizations.
"Thank
You"

You might also like