MySQL - World Layoffs

About This Dataset

This dataset, titled "Layoffs Dataset" is available for download from Kaggle in CSV format. Dataset

The data covers the period from March 11, 2020, to March 6, 2023. The dataset owner on Kaggle noted that some information, such as sources, the list of laid-off employees, and dates of addition, has been omitted. The complete dataset can be found on Layoffs.fyi.

Dataset Context

Large companies and organizations worldwide are grappling with the economic slowdown. Factors such as sluggish consumer spending, higher interest rates imposed by central banks, and a strong dollar abroad are signaling a potential recession, leading companies to begin laying off employees. This dataset was created to examine, analyze, and uncover valuable insights into this trend.

Data Cleaning

Data cleaning is an essential step in  analytics because raw data often comes with inconsistencies, errors, or missing values that can lead to misleading insights.   For this project, I began by identifying the steps I was going to take, to ensure that I had the best quality data available for further analysis.  

1. Staging

After creating a new schema and adding the tables, I duplicated them to preserve the raw data, ensuring that any issues during the cleaning process wouldn’t affect the original dataset. This approach aligns with industry best practices for data integrity and reliability.

2. Duplicates

Early observations revealed multiple duplicate entries that needed to be removed. To facilitate this, we added a new column called row_num, which helped identify and eliminate potential duplicates.  We used  a common table expressions (CTE) to perform a multi-level aggregation.

3. Standardisation

The raw data contained inconsistencies, such as the same company name appearing in three different formats and missing industry labels. These issues were resolved by comparing problematic rows with complete entries that shared similar attributes.

4. Null Values & Column / Row Removal

The raw data contained a significant number of null values. To ensure proper data cleaning, we removed rows where both total_laid_off and percentage_laid_off were null. Additionally, we dropped the row_num column, which was previously used to identify duplicates.

Exploratory Data Analysis

Exploratory data analysis (EDA) is a preliminary method of data analysis used to help us analyse, understand, characterise, and summarise data.  After familiarising ourselves with the data during in the data clean, we had began  to understand some of the question we wanted to ask of it.  for example:

 

1. What are the biggest layoffs by company, industry and country?

2. Were there patterns when looking at layoffs in conjunction with dates?

3. When was the single largest layoff events and by whom?

4. What is the rolling total of layoffs per month?

5. Which companies had 100% layoffs (Probably meaning closure)

 

 

Export Cleaned Table

Finally, we export the final version of our cleaned data for visual analysis

Data Visualisation.

Findings

This project was initiated to understand the driving forces behind mass layoffs across industries over the specified date range. Several key factors have likely contributed to these trends, including COVID-19 disruptions, rapid technological advancements, and shifts in global trade. The data clearly highlights a period of significant layoffs, particularly within the tech industry.

1. United States: The Epicenter of Layoffs

  • The United States has been disproportionately affected, with layoffs exceeding 10 times that of India, the second-highest country on the list.

  • This may be partly attributed to the high concentration of multinational corporations headquartered in the U.S. and the rapid shift in workforce strategies post-pandemic.

  • Notably, 1.5 million Indian employees work for American companies, meaning that job cuts in the U.S. could also indirectly affect Indian professionals.

3. Industry-Wide Impact

  • Layoffs have been widespread across multiple sectors, with the highest job losses occurring in consumer services, retail, transportation, and finance.

  • These industries often face fluctuating market demand and are prone to economic downturns that force workforce reductions.

2. Technology Sector Under Pressure

  • Despite increased dependence on technology, companies in this sector have been forced to downsize heavily.

  • AI and automation are playing a growing role in operational efficiency, allowing businesses to maintain or even increase output with fewer employees.

  • Major layoffs from companies like Amazon, Google, Meta, and Microsoft reflect industry-wide cost-cutting strategies.

4. Global Distribution of Layoffs

  • While the U.S. leads in job losses, countries like India, the Netherlands, Sweden, Brazil, and Germany have also been significantly impacted.

  • This suggests that economic uncertainty and restructuring efforts extend beyond the U.S., affecting a wide range of global markets.

Conclusion

The data highlights a transformation in workforce dynamics, where companies are increasingly leveraging technology to optimize operations. While layoffs may be cost-cutting measures, they also signal a broader shift in the way industries are evolving. Moving forward, it will be crucial to monitor how businesses balance automation with human employment and how displaced workers transition into new roles in an increasingly tech-driven economy.

Tech Stack:

Python : MySQL Workbench, Tableau