This project analyzes data from 5,000 Inc. 5000 companies to identify business patterns and generate useful insights.
The analysis includes data cleaning, exploratory data analysis (EDA), visualization, and business insights.
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('../data/inc5000_companies.csv')
df.head()
_input _num _widgetName _source _resultNumber \
0 NaN 1 Inc5000 Company List Inc5000 Company List 1
1 NaN 2 Inc5000 Company List Inc5000 Company List 2
2 NaN 3 Inc5000 Company List Inc5000 Company List 3
3 NaN 4 Inc5000 Company List Inc5000 Company List 4
4 NaN 5 Inc5000 Company List Inc5000 Company List 5
_pageUrl id rank workers \
0 http://www.inc.com/inc5000list/json/inc5000_20... 22890 1 227
1 http://www.inc.com/inc5000list/json/inc5000_20... 25747 2 191
2 http://www.inc.com/inc5000list/json/inc5000_20... 25643 3 145
3 http://www.inc.com/inc5000list/json/inc5000_20... 26098 4 62
4 http://www.inc.com/inc5000list/json/inc5000_20... 26182 5 92
company url state_l state_s \
0 Fuhu fuhu California CA
1 Quest Nutrition quest-nutrition California CA
2 Reliant Asset Management reliant-asset-management Virginia VA
3 Superfish superfish California CA
4 Acacia Communications acacia-communications Massachusetts MA
city metro growth revenue \
0 El Segundo Los Angeles 158956.9106 195640000
1 El Segundo Los Angeles 57347.9246 82640563
2 Arlington Washington DC 55460.1646 85076502
3 Palo Alto San Jose 26042.9630 35293000
4 Maynard Boston 20690.4578 77652360
industry yrs_on_list
0 Consumer Products & Services 2
1 Food & Beverage 1
2 Business Products & Services 1
3 Software 1
4 Telecommunications 1 The dataset was reviewed and cleaned to improve data quality and remove unnecessary metadata.
df.info()
<class 'pandas.DataFrame'> RangeIndex: 5000 entries, 0 to 4999 Data columns (total 19 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 _input 0 non-null float64 1 _num 5000 non-null int64 2 _widgetName 5000 non-null str 3 _source 5000 non-null str 4 _resultNumber 5000 non-null int64 5 _pageUrl 5000 non-null str 6 id 5000 non-null int64 7 rank 5000 non-null int64 8 workers 5000 non-null int64 9 company 5000 non-null str 10 url 5000 non-null str 11 state_l 5000 non-null str 12 state_s 5000 non-null str 13 city 5000 non-null str 14 metro 4942 non-null str 15 growth 5000 non-null float64 16 revenue 5000 non-null int64 17 industry 5000 non-null str 18 yrs_on_list 5000 non-null int64 dtypes: float64(2), int64(7), str(10) memory usage: 742.3 KB
df_clean = df.copy()
df_clean.isnull().sum()
_input 5000 _num 0 _widgetName 0 _source 0 _resultNumber 0 _pageUrl 0 id 0 rank 0 workers 0 company 0 url 0 state_l 0 state_s 0 city 0 metro 58 growth 0 revenue 0 industry 0 yrs_on_list 0 dtype: int64
df_clean.columns
Index(['_input', '_num', '_widgetName', '_source', '_resultNumber', '_pageUrl',
'id', 'rank', 'workers', 'company', 'url', 'state_l', 'state_s', 'city',
'metro', 'growth', 'revenue', 'industry', 'yrs_on_list'],
dtype='str')id="7x2kqf"
df_clean = df_clean.drop(columns=[
'_input',
'_num',
'_widgetName',
'_source',
'_resultNumber',
'_pageUrl',
'url'
])
df_clean.columns
df_clean.shape
(5000, 12)
df_clean[df_clean['metro'].isnull()][['company', 'city', 'state_l', 'metro']]
company city \
117 Intelligent Audit Rochelle Park
135 Project Management Academy West Lafayette
162 Marathon TS Kilmarnock
187 Paramount Lodging Advisors Chicago
267 Allegheny Science & Technology Bridgeport
296 Bio Soil Enhancers Hattiesburg
701 Wellness Corporate Solutions Bethesda
731 TeleWorld Solutions Chantilly
793 The Hermitage Club West Dover
1134 Veterans Enterprise Technology Solutions Clarksville
1362 ActivEngage Orlando
1403 MD Molding Wayland
1436 Taylor Group Insurance Chicago
1475 Precision Precast Erectors Worley
1547 Elevate Technology Solutions Rockland
1679 Five Star Franchising Spanish Fork
1702 Tanga Chandler
1740 LPS Integration Nashville
1834 Infusionsoft Chandler
1883 WideNet Consulting Group Bellevue
2106 VinoPRO Santa Rosa
2107 Sunshine Shuttle & Limousine Santa Rosa Beach
2273 BlueGrace Logistics Riverview
2276 Tapestry Technologies Chambersburg
2381 3D Corporate Solutions Monett
2388 AB Staffing Solutions Gilbert
2436 Involta Cedar Rapids
2690 National Collegiate Scouting Association Chicago
2830 Cambria Solutions Sacramento
2832 DLA+ Architecture & Interior Design Pittsburgh
2868 The Cellular Connection Marion
2902 Panamerica Computers Luray
2967 Integrated Insight The Villages
3198 ComplianceSigns Chadwick
3274 i9 Sports Riverview
3289 ReTouch Design-Build-Renovate Overland Park
3368 Red Monkey Foods Mount Vernon
3371 Headwind Consumer Products Syracuse
3650 New Ravenna Exmore
3763 Isagenix International Chandler
3849 Secure Banking Solutions Madison
3928 Kasa Companies Salina
4067 Therapeutic Interventions Belle Haven
4144 Bar Harbor Foods Whiting
4173 Camellia Healthcare Hattiesburg
4176 The Seaton Companies Chicago
4290 Positive Management Leadership Greenwood
4296 TriCore Robbinsville
4302 IMS Technology Services Garnet Valley
4312 Primatics Financial McLean
4314 Express Diagnostics Int'l Blue Earth
4359 Productive Dentist Academy Anacortes
4487 TENS Rx Montgomery
4520 SmartLinx Solutions Manalapan
4541 Current Medical Services Sylva
4702 Elastec Carmi
4741 Dr. Shrink Manistee
4852 MD Orthopaedics Wayland
state_l metro
117 New Jersey NaN
135 Indiana NaN
162 Virginia NaN
187 Illinois NaN
267 West Virginia NaN
296 Mississippi NaN
701 Maryland NaN
731 Virginia NaN
793 Vermont NaN
1134 Virginia NaN
1362 Florida NaN
1403 Iowa NaN
1436 Illinois NaN
1475 Idaho NaN
1547 Massachusetts NaN
1679 Utah NaN
1702 Arizona NaN
1740 Tennessee NaN
1834 Arizona NaN
1883 Washington NaN
2106 California NaN
2107 Florida NaN
2273 Florida NaN
2276 Pennsylvania NaN
2381 Missouri NaN
2388 Arizona NaN
2436 Iowa NaN
2690 Illinois NaN
2830 California NaN
2832 Pennsylvania NaN
2868 Indiana NaN
2902 Virginia NaN
2967 Florida NaN
3198 Illinois NaN
3274 Florida NaN
3289 Kansas NaN
3368 Missouri NaN
3371 Nebraska NaN
3650 Virginia NaN
3763 Arizona NaN
3849 South Dakota NaN
3928 Kansas NaN
4067 Virginia NaN
4144 Maine NaN
4173 Mississippi NaN
4176 Illinois NaN
4290 South Carolina NaN
4296 New Jersey NaN
4302 Pennsylvania NaN
4312 Virginia NaN
4314 Minnesota NaN
4359 Washington NaN
4487 Texas NaN
4520 New Jersey NaN
4541 North Carolina NaN
4702 Illinois NaN
4741 Michigan NaN
4852 Iowa NaN df_clean['company'].duplicated().sum()
np.int64(0)
df_clean.dtypes
id int64 rank int64 workers int64 company str state_l str state_s str city str metro str growth float64 revenue int64 industry str yrs_on_list int64 dtype: object
df_clean[['workers','growth','revenue','yrs_on_list']].describe()
workers growth revenue yrs_on_list count 5000.000000 5000.000000 5.000000e+03 5000.000000 mean 208.969800 516.439892 4.305818e+07 2.744400 std 1074.600125 2786.061791 1.818559e+08 1.999067 min 0.000000 42.447000 1.953000e+06 1.000000 25% 24.000000 84.208250 4.876791e+06 1.000000 50% 50.000000 151.722800 1.072208e+07 2.000000 75% 125.000000 347.652825 2.695213e+07 4.000000 max 34219.000000 158956.910600 5.528203e+09 12.000000
df_clean[df_clean['workers'] == 0][['company', 'workers', 'revenue', 'industry']]
company workers revenue \
597 MileStone Community Builders 0 88777494
1057 Fruitables Pet Food 0 5022478
1243 GTN Technical Staffing 0 21830995
1635 Subzero Engineering 0 9429145
2187 LabConnect 0 12878653
2922 Sorriso Technologies 0 2919195
3174 Phydeaux 0 6575960
3344 Health Advocate 0 86092370
4125 Automation & Control 0 7559026
4407 American Sensor Technologies 0 19722422
4521 General Networks 0 12079727
4751 Blue Star Partners 0 4151560
4827 Polsinelli 0 324500000
industry
597 Real Estate
1057 Food & Beverage
1243 Human Resources
1635 Manufacturing
2187 Health
2922 Software
3174 Retail
3344 Health
4125 Engineering
4407 Manufacturing
4521 IT Services
4751 Business Products & Services
4827 Business Products & Services df_clean.loc[df_clean['workers'] == 0,'workers'] = pd.NA
df_clean['workers'].isnull().sum()
np.int64(13)
df_clean['id'].duplicated().sum()
np.int64(0)
The dataset was analyzed to identify patterns and generate meaningful business insights.
df_clean['industry'].value_counts()
industry IT Services 733 Advertising & Marketing 453 Business Products & Services 435 Health 377 Software 338 Financial Services 278 Consumer Products & Services 230 Government Services 212 Manufacturing 212 Retail 200 Human Resources 199 Construction 198 Telecommunications 135 Food & Beverage 132 Logistics & Transportation 132 Real Estate 131 Energy 116 Education 78 Security 68 Insurance 67 Engineering 66 Travel & Hospitality 62 Media 60 Environmental Services 54 Computer Hardware 34 Name: count, dtype: int64
df_clean[['company', 'state_l', 'state_s', 'city', 'industry']].apply(
lambda col: col.str.strip().ne(col).sum()
)
company 0 state_l 0 state_s 0 city 0 industry 0 dtype: int64
df_clean['industry'].value_counts()
industry IT Services 733 Advertising & Marketing 453 Business Products & Services 435 Health 377 Software 338 Financial Services 278 Consumer Products & Services 230 Government Services 212 Manufacturing 212 Retail 200 Human Resources 199 Construction 198 Telecommunications 135 Food & Beverage 132 Logistics & Transportation 132 Real Estate 131 Energy 116 Education 78 Security 68 Insurance 67 Engineering 66 Travel & Hospitality 62 Media 60 Environmental Services 54 Computer Hardware 34 Name: count, dtype: int64
df_clean.groupby('industry')['revenue'].sum().sort_values(ascending =False)
industry Health 22022876049 Energy 21602659306 IT Services 19363587015 Business Products & Services 17175083779 Financial Services 12212242543 Human Resources 12174441948 Logistics & Transportation 11208388344 Consumer Products & Services 10746810431 Construction 10342377737 Telecommunications 9336973728 Real Estate 8886571850 Retail 8361870250 Manufacturing 7466296462 Advertising & Marketing 7317073720 Software 7205033140 Food & Beverage 6481046076 Government Services 6345931528 Insurance 4550304954 Travel & Hospitality 3644726185 Security 3288637477 Engineering 1341559405 Education 1181235155 Computer Hardware 1149110342 Media 1097032891 Environmental Services 789041496 Name: revenue, dtype: int64
df_clean[['company', 'industry', 'revenue']].sort_values(
'revenue', ascending=False
).head(10)
company industry revenue 2662 Pacific Union Real Estate Real Estate 5528202691 4949 ABC Supply Construction 4911166514 3690 Eco-Energy Global Biofuels Energy 4138790000 1982 EnvisionRxOptions Health 3644869906 256 Bridger Energy 3487872233 4618 Prime Therapeutics Health 2511716640 4203 Flyers Energy Energy 1977921907 3425 Sun Coast Resources Energy 1868964476 3240 Carahsoft Technology Government Services 1724988401 3820 TriNet Human Resources 1644275000
df_clean['state_l'].value_counts().head(10)
state_l California 694 Texas 404 New York 335 Florida 303 Virginia 284 Illinois 238 Georgia 209 Pennsylvania 191 Massachusetts 174 Ohio 171 Name: count, dtype: int64
df_clean[['company', 'industry', 'growth']].sort_values(
'growth', ascending=False
).head(10)
company industry growth 0 Fuhu Consumer Products & Services 158956.9106 1 Quest Nutrition Food & Beverage 57347.9246 2 Reliant Asset Management Business Products & Services 55460.1646 3 Superfish Software 26042.9630 4 Acacia Communications Telecommunications 20690.4578 5 Provider Power Energy 19876.5169 6 Crescendo Bioscience Health 18375.0693 7 Plexus Worldwide Health 16457.6529 8 Vacasa Travel & Hospitality 16192.0610 9 Go Energies Energy 16006.8013
df_clean[['workers','revenue']].corr()
workers revenue workers 1.000000 0.265797 revenue 0.265797 1.000000
The following visualizations highlight key patterns and relationships identified during the analysis.
industry_counts = df_clean['industry'].value_counts().head(10)
industry_counts.plot(kind='bar', figsize=(10, 6))
plt.title('Top 10 Industries by Number of Companies')
plt.xlabel('Industry')
plt.ylabel('Number of Companies')
plt.xticks(rotation=45, ha='right')
plt.tight_layout()
plt.show()
revenue_by_industry = df_clean.groupby('industry')['revenue'].sum().sort_values(ascending=False).head(10)
revenue_by_industry.plot(kind='bar', figsize=(10, 6))
plt.title('Top 10 Industries by Total Revenue')
plt.xlabel('Industry')
plt.ylabel('Total Revenue')
plt.xticks(rotation=45, ha='right')
plt.tight_layout()
plt.show()
state_counts = df_clean['state_l'].value_counts().head(10)
state_counts.plot(kind='bar', figsize=(10, 6))
plt.title('Top 10 States by Number of Companies')
plt.xlabel('State')
plt.ylabel('Number of Companies')
plt.xticks(rotation=45, ha='right')
plt.tight_layout()
plt.show()
top_revenue = df_clean[['company', 'industry', 'revenue']].sort_values(
'revenue', ascending=True
).tail(10)
top_revenue.plot(
x='company',
y='revenue',
kind='barh',
figsize=(10, 6),
legend=False
)
plt.title('Top 10 Companies by Revenue')
plt.xlabel('Revenue')
plt.ylabel('Company')
plt.tight_layout()
plt.show()
plt.figure(figsize=(10, 6))
plt.scatter(
df_clean['workers'],
df_clean['revenue']
)
plt.title('Relationship Between Employees and Revenue')
plt.xlabel('Number of Employees')
plt.ylabel('Revenue')
plt.tight_layout()
plt.show()
The following insights summarize the key findings from the analysis.
Aspiring Data Analyst & Software Developer · Cairo, Egypt
CS & Statistics student at Helwan University, sharpening data skills through DEPI. I turn messy datasets into clear insights and love building things from scratch.
Helwan University, Faculty of Science
First year completed · in progress
Data Science Track · in progress
CRISP-DM, Python, statistical modeling
Python (OOP, file handling, data structures) · Probability & Statistics · Discrete Mathematics · CRISP-DM Methodology
Analyzed 5,000 Inc. 5000 companies to uncover industry trends, revenue patterns, top states by company count, and the relationship between company size and revenue.
Built web pages from scratch covering semantic structure, responsive CSS styling, and interactivity.
Hands-on practice with Python fundamentals: data types, loops, functions, and object-oriented programming.
Supported the sales team by engaging prospective clients and assisting with outreach and follow-up.
Taught Arabic and English to young children through structured, inclusive lesson planning.
Open to entry-level roles in data analysis & software development.
📍 Cairo, Egypt