Exploratory Analysis of NASA Astronauts

Tools used in this project
Exploratory Analysis of NASA Astronauts

About this project


In this project, I am going to analyze NASA astronauts using the provided dataset. My task involves data cleaning, exploration, and information extraction using Python and MySQL. The dataset includes astronaut details like names, birthdates, gender, education, military history, space missions, and more. Learning about NASA astronauts is like going on a thrilling space adventure packed with amazing stories and big accomplishments. These astronauts come from different backgrounds and know a lot because they've spent years learning and working hard.


We're going to look at where astronauts studied, their military ranks, branches they were in, gender distribution, life expectancy, graduate majors among astronauts, who flew to space the most, and who spent the most time up there. It's like uncovering the secrets behind the astronauts' stories, and I'm excited to share what I find!

Exploring the data set


Data Cleaning and Preprocessing

The first phase of the project involved data cleaning and preprocessing to ensure the dataset's quality and consistency. Several steps were taken, including:

  • Handling missing values
  • Correcting data types
  • Removing duplicates
  • Renaming columns
  • Dealing with inconsistencies

Connecting Python to MySQL

Proficiently loaded the SQL extension, established a connection to MySQL


Astronauts Status

SQL was utilized to count and group astronauts based on their status, indicating whether they are currently active, retired, or or fall under other classifications.


Exploring Astronauts Military branch diversity

looking at the diversity of military branches among these space heroes. It seems like the US Air Force and US Navy produce the most Astronauts.


Top Military Ranks Among Astronauts

Building upon the exploration of military backgrounds, identified the ranks that astronauts held in their respective armed forces, showcasing the highest-rank.

undefinedMany of them were/are very high ranking members in the Military.

Gender Insights

Finding the gender insights. The majority astronauts were/are male but females do not be discouraged!.


Female and Male Astronauts - Life Expectancy

Calculating the average life expectancy for female and male astronauts, acknowledging the dedication and contributions of each gender to space exploration.


Top Graduate Majors of Astronauts

Identifying the top ten graduate majors among astronauts, offering a glimpse into the academic diversity of the astronaut corps.

undefinedAstronauts and their degrees

Providing an overview of astronauts' educational background, including the total number, those with undergraduate degrees, and those with graduate degrees.


Astronaut's Space Flights and Spacewalks

Exploring how often astronauts have traveled into space and participated in spacewalks. The query calculates the average number of space flights and spacewalks undertaken by astronauts in the dataset. The results tell us about the typical frequency of these extraordinary activities.


Key Takeaways

  • Aeronautical Engineering, Aerospace Engineering, Physics, and Medicine are among the top graduate majors of astronauts.
  • On average, astronauts have completed 2.40 space flights and 1.27 spacewalks.
  • Predominantly, astronauts hold the ranks of Colonel, Captain, Commander, Lieutenant Colonel, and Major General.
  • The top two branches, US Air Force (Retired) and US Navy (Retired), produce the most astronauts.
  • Average life expectancy is 70 years for male astronauts and 60 years for female astronauts.
  • The dataset exhibits a gender ratio of approximately 6:1, with 301 male astronauts to 49 female astronauts.


The project successfully explored and analyzed NASA astronaut data, revealing insights into the demographics and experiences of astronauts. It also brought attention to data quality and completeness challenges. These findings contribute to a better understanding of the astronaut community and lay the foundation for further research and analysis.

Additional project images

Discussion and feedback(0 comments)
2000 characters remaining