390.Can SAS Predict Airline Disasters Before They Happen?

 Can SAS Predict Airline Disasters Before They Happen?

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

HERE IN THIS PROJECT WE USED THESE SAS STATEMENTS —
DATA STEP | PROC SQL |  PROC PRINT | PROC SGPLOT | MACROS | PROC CORR | PROC MEANS | PROC FREQ | PROC UNIVARIATE | APPEND | PROC SORT | MERGE | PROC DATASETS DELETE | DATA FUNCTIONS

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

INTRODUCTION

The airline industry operates in one of the most time-sensitive and safety-critical environments in the world. Every day, thousands of aircraft take off and land across global airspace, and behind each flight is a complex system of human scheduling, regulatory compliance, and fatigue management.

Among all operational components, airline crew scheduling is one of the most crucial and sensitive functions. Pilots, co-pilots, and cabin crew must follow strict regulations regarding:

·       Maximum allowable flight hours

·       Minimum mandatory rest hours

·       Fatigue and stress thresholds

·       Aircraft type certifications

·       Regulatory compliance with aviation authorities

Any failure in this system can result in:

·       Flight delays and cancellations

·       Crew burnout and attrition

·       Regulatory penalties and audits

·       Severe safety risks and reputational damage

Therefore, modern airlines rely heavily on data analytics systems to monitor and optimize crew schedules in real time.

This project simulates a real-world airline crew analytics platform built using SAS, where we design and analyze a crew scheduling dataset using:

·       PROC SQL

·       PROC MEANS

·       PROC UNIVARIATE

·       PROC FREQ

·       PROC CORR

·       PROC SGPLOT

·       SAS Macros

·       Date functions (MDY, INTCK, INTNX)

·       Data integration (SET, MERGE, APPEND, TRANSPOSE)

·       Data quality functions (character and numeric functions)

The system not only performs statistical analysis but also implements business logic for fatigue detection, utilization classification, and fraud/risk flagging, exactly as used in real airline operations.

 

BUSINESS CONTEXT

In real airline companies such as Air India, Emirates, Indigo, Qatar Airways, Lufthansa, and British Airways, crew management departments continuously answer critical questions like:

·       Which crews are overworked?

·       Are minimum rest hours being violated?

·       Which aircraft types generate more fatigue?

·       Is any crew member manipulating duty logs?

·       How does flight load impact human performance?

These questions cannot be answered manually. They require:

·       Automated data pipelines

·       Statistical monitoring

·       Visualization dashboards

·       Compliance alerts

·       Risk analytics

This SAS project acts as a mini airline operations control center where management can:

·       Monitor fatigue levels

·       Detect unsafe schedules

·       Compare utilization patterns

·       Identify high-risk crews

·       Ensure regulatory compliance

 

TABLE OF CONTENTS

1.     Introduction

2.     Business Context

3.     Dataset Design

4.     Variable Definitions

5.     Data Creation in SAS

6.     Date Handling and Formats

7.     Utilization Classification Macro

8.     Fraud and Fatigue Detection Macro

9.     PROC SQL – Summary Analytics

10.  PROC MEANS – Descriptive Statistics

11.  PROC UNIVARIATE – Distribution Analysis

12.  PROC FREQ – Categorical Insights

13.  PROC CORR – Relationship Analysis

14.  PROC SGPLOT – Visualization

15.  Data Integration (SET, MERGE, APPEND)

16.  Data Reshaping (TRANSPOSE)

17.  Character Functions Usage

18.  Numeric Functions Usage

19.  Data Cleaning and Deletion

20.  Conclusion

Why this project is realistic

This project exactly mirrors how airline analytics systems are built in real companies like:

·       Emirates

·       Indigo

·       Air India

·       Qatar Airways

Crew management teams track:

·       Working hours

·       Rest time

·       Fatigue levels

·       Regulatory compliance

·       Fraud or data manipulation


Dataset design logic

Each variable has operational meaning:

Variable

Meaning

Crew_ID

Unique employee ID

Name

Crew member name

Aircraft_Type

Aircraft certification

Duty_Date

Date of duty

Flight_Hours

Total flying hours

Rest_Hours

Total rest hours

Delay_Incidents

Delays caused

Fatigue_Score

Human performance metric

Utilization_Pct

Productivity ratio

Utilization_Status

High/Medium/Low

Fraud_Flag

Risk indicator

 

STEP 1 – CREATE MAIN DATASET

data crew_schedule;

    input Crew_ID $ Name:$13. Aircraft_Type $ Duty_Date :date9.  

          Flight_Hours Rest_Hours Delay_Incidents Fatigue_Score;

          Utilization_Pct = Flight_Hours / 12;

    format Duty_Date date9. Utilization_Pct percent8.2;

    datalines;

C001 Ramesh_A320 A320 01JAN2026 8 10 1 60

C002 Sita_B737 B737 02JAN2026 10 8 2 75

C003 Arjun_A320 A320 03JAN2026 6 12 0 45

C004 Meera_A350 A350 04JAN2026 11 7 3 85

C005 Kiran_B787 B787 05JAN2026 9 9 1 65

C006 Pooja_A320 A320 06JAN2026 12 6 4 90

C007 Rahul_B737 B737 07JAN2026 7 11 0 50

C008 Neha_A350 A350 08JAN2026 10 8 2 70

C009 Vinay_B787 B787 09JAN2026 5 13 0 40

C010 Kavya_A320 A320 10JAN2026 9 9 1 68

C011 Ajay_B737 B737 11JAN2026 11 7 3 82

C012 Divya_A350 A350 12JAN2026 8 10 1 60

C013 Sanjay_B787 B787 13JAN2026 12 6 4 92

C014 Anu_A320 A320 14JAN2026 6 12 0 48

C015 Rohit_B737 B737 15JAN2026 10 8 2 75

C016 Sneha_A350 A350 16JAN2026 7 11 0 55

;

run;

proc print data=crew_schedule;

run;

OUTPUT:

ObsCrew_IDNameAircraft_TypeDuty_DateFlight_HoursRest_HoursDelay_IncidentsFatigue_ScoreUtilization_Pct
1C001Ramesh_A320A32001JAN202681016066.67%
2C002Sita_B737B73702JAN202610827583.33%
3C003Arjun_A320A32003JAN202661204550.00%
4C004Meera_A350A35004JAN202611738591.67%
5C005Kiran_B787B78705JAN20269916575.00%
6C006Pooja_A320A32006JAN2026126490100.0%
7C007Rahul_B737B73707JAN202671105058.33%
8C008Neha_A350A35008JAN202610827083.33%
9C009Vinay_B787B78709JAN202651304041.67%
10C010Kavya_A320A32010JAN20269916875.00%
11C011Ajay_B737B73711JAN202611738291.67%
12C012Divya_A350A35012JAN202681016066.67%
13C013Sanjay_B787B78713JAN2026126492100.0%
14C014Anu_A320A32014JAN202661204850.00%
15C015Rohit_B737B73715JAN202610827583.33%
16C016Sneha_A350A35016JAN202671105558.33%

STEP 2 – UTILIZATION CLASSIFICATION MACRO

%macro utilization_class;

data crew_schedule;

    set crew_schedule;

    length Utilization_Status $8.;

    if Flight_Hours >= 10 then Utilization_Status = "HIGH";

    else if Flight_Hours >= 7 then Utilization_Status = "MEDIUM";

    else Utilization_Status = "LOW";

run;

proc print data=crew_schedule;

 var Crew_ID Name Aircraft_Type Flight_Hours Utilization_Status;

run;

%mend;


%utilization_class;

OUTPUT:

ObsCrew_IDNameAircraft_TypeFlight_HoursUtilization_Status
1C001Ramesh_A320A3208MEDIUM
2C002Sita_B737B73710HIGH
3C003Arjun_A320A3206LOW
4C004Meera_A350A35011HIGH
5C005Kiran_B787B7879MEDIUM
6C006Pooja_A320A32012HIGH
7C007Rahul_B737B7377MEDIUM
8C008Neha_A350A35010HIGH
9C009Vinay_B787B7875LOW
10C010Kavya_A320A3209MEDIUM
11C011Ajay_B737B73711HIGH
12C012Divya_A350A3508MEDIUM
13C013Sanjay_B787B78712HIGH
14C014Anu_A320A3206LOW
15C015Rohit_B737B73710HIGH
16C016Sneha_A350A3507MEDIUM

Airlines classify crew into:

·       Overworked (HIGH)

·       Normal (MEDIUM)

·       Underused (LOW)


STEP 3 – FATIGUE / FRAUD DETECTION MACRO

%macro fraud_detection;

data crew_schedule;

    set crew_schedule;

    

    if Fatigue_Score > 80 and Rest_Hours < 8 then Fraud_Flag = "YES";

    else Fraud_Flag = "NO";

run;

proc print data=crew_schedule;

 var Crew_ID Name Aircraft_Type Fatigue_Score Rest_Hours Fraud_Flag;

run;

%mend;


%fraud_detection;

OUTPUT:

ObsCrew_IDNameAircraft_TypeFatigue_ScoreRest_HoursFraud_Flag
1C001Ramesh_A320A3206010NO
2C002Sita_B737B737758NO
3C003Arjun_A320A3204512NO
4C004Meera_A350A350857YES
5C005Kiran_B787B787659NO
6C006Pooja_A320A320906YES
7C007Rahul_B737B7375011NO
8C008Neha_A350A350708NO
9C009Vinay_B787B7874013NO
10C010Kavya_A320A320689NO
11C011Ajay_B737B737827YES
12C012Divya_A350A3506010NO
13C013Sanjay_B787B787926YES
14C014Anu_A320A3204812NO
15C015Rohit_B737B737758NO
16C016Sneha_A350A3505511NO

In real systems:

Some crew manipulate logs to:

·       Avoid night shifts

·       Claim overtime

·       Hide fatigue

Hence:

If fatigue is high + rest is low → flag


STEP 4 – PROC SQL ANALYSIS

proc sql;

    create table summary_sql as

    select Aircraft_Type,

           avg(Flight_Hours) as Avg_Flight,

           avg(Rest_Hours) as Avg_Rest,

           sum(Delay_Incidents) as Total_Delays

    from crew_schedule

    group by Aircraft_Type;

quit;

proc print data=summary_sql;

run;

OUTPUT:

ObsAircraft_TypeAvg_FlightAvg_RestTotal_Delays
1A3208.200009.800006
2A3509.000009.000006
3B7379.500008.500007
4B7878.666679.333335

SQL is used for:

·       Dashboards

·       KPI reports

·       Management decisions


STEP 5 – PROC MEANS

proc means data=crew_schedule mean min max std;

    var Flight_Hours Rest_Hours Fatigue_Score;

run;

OUTPUT:

The MEANS Procedure

VariableMeanMinimumMaximumStd Dev
Flight_Hours
Rest_Hours
Fatigue_Score
8.8125000
9.1875000
66.2500000
5.0000000
6.0000000
40.0000000
12.0000000
13.0000000
92.0000000
2.1975365
2.1975365
16.2090510

These are risk models:

·       High mean fatigue → unsafe operations

·       High variance → inconsistent scheduling

STEP 6 – PROC UNIVARIATE

proc univariate data=crew_schedule;

    var Fatigue_Score;

    histogram;

run;

OUTPUT:

The UNIVARIATE Procedure

Variable: Fatigue_Score

Moments
N16Sum Weights16
Mean66.25Sum Observations1060
Std Deviation16.209051Variance262.733333
Skewness0.04293774Kurtosis-1.0626313
Uncorrected SS74166Corrected SS3941
Coeff Variation24.466492Std Error Mean4.05226274
Basic Statistical Measures
LocationVariability
Mean66.25000Std Deviation16.20905
Median66.50000Variance262.73333
Mode60.00000Range52.00000
  Interquartile Range26.00000

Note: The mode displayed is the smallest of 2 modes with a count of 2.

Tests for Location: Mu0=0
TestStatisticp Value
Student's tt16.34889Pr > |t|<.0001
SignM8Pr >= |M|<.0001
Signed RankS68Pr >= |S|<.0001
Quantiles (Definition 5)
LevelQuantile
100% Max92.0
99%92.0
95%92.0
90%90.0
75% Q378.5
50% Median66.5
25% Q152.5
10%45.0
5%40.0
1%40.0
0% Min40.0
Extreme Observations
LowestHighest
ValueObsValueObs
4097515
4538211
4814854
507906
55169213

The UNIVARIATE Procedure

Histogram for Fatigue_Score

These are risk models:

·       High mean fatigue → unsafe operations

·       High variance → inconsistent scheduling

STEP 7 – PROC FREQ

proc freq data=crew_schedule;

    tables Utilization_Status Fraud_Flag Fatigue_Score;

run;

OUTPUT:

The FREQ Procedure

Utilization_StatusFrequencyPercentCumulative
Frequency
Cumulative
Percent
HIGH743.75743.75
LOW318.751062.50
MEDIUM637.5016100.00
Fraud_FlagFrequencyPercentCumulative
Frequency
Cumulative
Percent
NO1275.001275.00
YES425.0016100.00
Fatigue_ScoreFrequencyPercentCumulative
Frequency
Cumulative
Percent
4016.2516.25
4516.25212.50
4816.25318.75
5016.25425.00
5516.25531.25
60212.50743.75
6516.25850.00
6816.25956.25
7016.251062.50
75212.501275.00
8216.251381.25
8516.251487.50
9016.251593.75
9216.2516100.00

STEP 8 – PROC CORR

proc corr data=crew_schedule;

    var Flight_Hours Rest_Hours Fatigue_Score;

run;

OUTPUT:

The CORR Procedure

3 Variables:Flight_Hours Rest_Hours Fatigue_Score
Simple Statistics
VariableNMeanStd DevSumMinimumMaximum
Flight_Hours168.812502.19754141.000005.0000012.00000
Rest_Hours169.187502.19754147.000006.0000013.00000
Fatigue_Score1666.2500016.20905106040.0000092.00000
Pearson Correlation Coefficients, N = 16
Prob > |r| under H0: Rho=0
 Flight_HoursRest_HoursFatigue_Score
Flight_Hours
1.00000
 
-1.00000
<.0001
0.99148
<.0001
Rest_Hours
-1.00000
<.0001
1.00000
 
-0.99148
<.0001
Fatigue_Score
0.99148
<.0001
-0.99148
<.0001
1.00000
 

This tells management:

Does more flying cause fatigue?

If correlation is strong → reschedule crews.

STEP 9 – PROC SGPLOT

proc sgplot data=crew_schedule;

    scatter x=Flight_Hours y=Fatigue_Score;

    reg x=Flight_Hours y=Fatigue_Score;

run;

OUTPUT:

The SGPlot Procedure

Executives do not read tables.

They want graphs:

Flight hours vs fatigue visually proves burnout.


STEP 10 – DATE FUNCTIONS

data crew_dates;

    set crew_schedule;

    

    Next_Duty = intnx('day', Duty_Date, 2);

    Gap_Days = intck('day', Duty_Date, Next_Duty);

run;

proc print data=crew_dates;

run;

OUTPUT:

ObsCrew_IDNameAircraft_TypeDuty_DateFlight_HoursRest_HoursDelay_IncidentsFatigue_ScoreUtilization_PctUtilization_StatusFraud_FlagNext_DutyGap_Days
1C001Ramesh_A320A32001JAN202681016066.67%MEDIUMNO241092
2C002Sita_B737B73702JAN202610827583.33%HIGHNO241102
3C003Arjun_A320A32003JAN202661204550.00%LOWNO241112
4C004Meera_A350A35004JAN202611738591.67%HIGHYES241122
5C005Kiran_B787B78705JAN20269916575.00%MEDIUMNO241132
6C006Pooja_A320A32006JAN2026126490100.0%HIGHYES241142
7C007Rahul_B737B73707JAN202671105058.33%MEDIUMNO241152
8C008Neha_A350A35008JAN202610827083.33%HIGHNO241162
9C009Vinay_B787B78709JAN202651304041.67%LOWNO241172
10C010Kavya_A320A32010JAN20269916875.00%MEDIUMNO241182
11C011Ajay_B737B73711JAN202611738291.67%HIGHYES241192
12C012Divya_A350A35012JAN202681016066.67%MEDIUMNO241202
13C013Sanjay_B787B78713JAN2026126492100.0%HIGHYES241212
14C014Anu_A320A32014JAN202661204850.00%LOWNO241222
15C015Rohit_B737B73715JAN202610827583.33%HIGHNO241232
16C016Sneha_A350A35016JAN202671105558.33%MEDIUMNO241242

Aviation runs on time. Without proper dates:

·       You cannot calculate rest periods

·       You cannot validate duty cycles

·       You cannot schedule shifts

Hence:

·       MDY() builds dates

·       INTCK() calculates gaps

·       INTNX() predicts future duties

STEP 11 – CHARACTER FUNCTIONS

data char_demo;

    set crew_schedule;

    

    Clean_Name = propcase(lowcase(strip(Name)));

    Full_Label = catx("-", upcase(Crew_ID), Aircraft_Type);

run;

proc print data=char_demo;

run;

OUTPUT:

ObsCrew_IDNameAircraft_TypeDuty_DateFlight_HoursRest_HoursDelay_IncidentsFatigue_ScoreUtilization_PctUtilization_StatusFraud_FlagClean_NameFull_Label
1C001Ramesh_A320A32001JAN202681016066.67%MEDIUMNORamesh_a320C001-A320
2C002Sita_B737B73702JAN202610827583.33%HIGHNOSita_b737C002-B737
3C003Arjun_A320A32003JAN202661204550.00%LOWNOArjun_a320C003-A320
4C004Meera_A350A35004JAN202611738591.67%HIGHYESMeera_a350C004-A350
5C005Kiran_B787B78705JAN20269916575.00%MEDIUMNOKiran_b787C005-B787
6C006Pooja_A320A32006JAN2026126490100.0%HIGHYESPooja_a320C006-A320
7C007Rahul_B737B73707JAN202671105058.33%MEDIUMNORahul_b737C007-B737
8C008Neha_A350A35008JAN202610827083.33%HIGHNONeha_a350C008-A350
9C009Vinay_B787B78709JAN202651304041.67%LOWNOVinay_b787C009-B787
10C010Kavya_A320A32010JAN20269916875.00%MEDIUMNOKavya_a320C010-A320
11C011Ajay_B737B73711JAN202611738291.67%HIGHYESAjay_b737C011-B737
12C012Divya_A350A35012JAN202681016066.67%MEDIUMNODivya_a350C012-A350
13C013Sanjay_B787B78713JAN2026126492100.0%HIGHYESSanjay_b787C013-B787
14C014Anu_A320A32014JAN202661204850.00%LOWNOAnu_a320C014-A320
15C015Rohit_B737B73715JAN202610827583.33%HIGHNORohit_b737C015-B737
16C016Sneha_A350A35016JAN202671105558.33%MEDIUMNOSneha_a350C016-A350

Real data is dirty:

  • Extra spaces
  • Inconsistent cases
  • Poor labeling

Functions clean data for:

  • Reporting
  • Merging
  • Integration

STEP 12 – TRANSPOSE

proc transpose data=crew_schedule out=crew_t;

    var Flight_Hours Rest_Hours Fatigue_Score;

    id Crew_ID;

run;

proc print data=crew_t;

run;

OUTPUT:

Obs_NAME_C001C002C003C004C005C006C007C008C009C010C011C012C013C014C015C016
1Flight_Hours81061191271059118126107
2Rest_Hours10812796118139710612811
3Fatigue_Score60754585659050704068826092487555

Used for:

  • Excel exports
  • Regulatory forms
  • Cross-sectional layouts

STEP 13 – APPEND

Creating New Data

data crew_newday;

    input Crew_ID $ Name $13. Aircraft_Type $ Duty_Date :date9.

          Flight_Hours Rest_Hours Delay_Incidents Fatigue_Score;

          Utilization_Pct = Flight_Hours / 12;

    format Duty_Date date9. Utilization_Pct percent8.2;

    datalines;

C017 Aman_A320 A320 17JAN2026 9 9 1 67

C018 Riya_B737 B737 17JAN2026 11 7 3 83

C019 Mohan_A350 A350 17JAN2026 8 10 1 60

C020 Tara_B787 B787 17JAN2026 12 6 4 91

;

run;

proc print data=crew_newday;

run;

OUTPUT:

ObsCrew_IDNameAircraft_TypeDuty_DateFlight_HoursRest_HoursDelay_IncidentsFatigue_ScoreUtilization_Pct
1C017Aman_A320 A32017JAN20269916775.00%
2C018Riya_B737 B73717JAN202611738391.67%
3C019Mohan_A350 A35017JAN202681016066.67%
4C020Tara_B787 B78717JAN2026126491100.0%

proc append base=crew_schedule 

            data=crew_newday force;

run;

proc print data=crew_schedule;

run;

OUTPUT:

ObsCrew_IDNameAircraft_TypeDuty_DateFlight_HoursRest_HoursDelay_IncidentsFatigue_ScoreUtilization_PctUtilization_StatusFraud_Flag
1C001Ramesh_A320A32001JAN202681016066.67%MEDIUMNO
2C002Sita_B737B73702JAN202610827583.33%HIGHNO
3C003Arjun_A320A32003JAN202661204550.00%LOWNO
4C004Meera_A350A35004JAN202611738591.67%HIGHYES
5C005Kiran_B787B78705JAN20269916575.00%MEDIUMNO
6C006Pooja_A320A32006JAN2026126490100.0%HIGHYES
7C007Rahul_B737B73707JAN202671105058.33%MEDIUMNO
8C008Neha_A350A35008JAN202610827083.33%HIGHNO
9C009Vinay_B787B78709JAN202651304041.67%LOWNO
10C010Kavya_A320A32010JAN20269916875.00%MEDIUMNO
11C011Ajay_B737B73711JAN202611738291.67%HIGHYES
12C012Divya_A350A35012JAN202681016066.67%MEDIUMNO
13C013Sanjay_B787B78713JAN2026126492100.0%HIGHYES
14C014Anu_A320A32014JAN202661204850.00%LOWNO
15C015Rohit_B737B73715JAN202610827583.33%HIGHNO
16C016Sneha_A350A35016JAN202671105558.33%MEDIUMNO
17C017Aman_A320 A32017JAN20269916775.00%  
18C018Riya_B737 B73717JAN202611738391.67%  
19C019Mohan_A350 A35017JAN202681016066.67%  
20C020Tara_B787 B78717JAN2026126491100.0%  

Simulates daily data inflow.

Airlines get new records every day.


STEP 14 – SORT & MERGE

proc sort data=crew_schedule;by Aircraft_Type;run;

proc print data=crew_schedule;

run;

OUTPUT:

ObsCrew_IDNameAircraft_TypeDuty_DateFlight_HoursRest_HoursDelay_IncidentsFatigue_ScoreUtilization_PctUtilization_StatusFraud_Flag
1C017Aman_A320 A32017JAN20269916775.00%  
2C019Mohan_A350 A35017JAN202681016066.67%  
3C018Riya_B737 B73717JAN202611738391.67%  
4C020Tara_B787 B78717JAN2026126491100.0%  
5C001Ramesh_A320A32001JAN202681016066.67%MEDIUMNO
6C003Arjun_A320A32003JAN202661204550.00%LOWNO
7C006Pooja_A320A32006JAN2026126490100.0%HIGHYES
8C010Kavya_A320A32010JAN20269916875.00%MEDIUMNO
9C014Anu_A320A32014JAN202661204850.00%LOWNO
10C004Meera_A350A35004JAN202611738591.67%HIGHYES
11C008Neha_A350A35008JAN202610827083.33%HIGHNO
12C012Divya_A350A35012JAN202681016066.67%MEDIUMNO
13C016Sneha_A350A35016JAN202671105558.33%MEDIUMNO
14C002Sita_B737B73702JAN202610827583.33%HIGHNO
15C007Rahul_B737B73707JAN202671105058.33%MEDIUMNO
16C011Ajay_B737B73711JAN202611738291.67%HIGHYES
17C015Rohit_B737B73715JAN202610827583.33%HIGHNO
18C005Kiran_B787B78705JAN20269916575.00%MEDIUMNO
19C009Vinay_B787B78709JAN202651304041.67%LOWNO
20C013Sanjay_B787B78713JAN2026126492100.0%HIGHYES

proc sort data=summary_sql;by Aircraft_Type;run;

proc print data=summary_sql;

run;

OUTPUT:

ObsAircraft_TypeAvg_FlightAvg_RestTotal_Delays
1A3208.200009.800006
2A3509.000009.000006
3B7379.500008.500007
4B7878.666679.333335

data merged_data;

    merge crew_schedule 

          summary_sql;

    by Aircraft_Type;

run;

proc print data=merged_data;

run;

OUTPUT:

ObsCrew_IDNameAircraft_TypeDuty_DateFlight_HoursRest_HoursDelay_IncidentsFatigue_ScoreUtilization_PctUtilization_StatusFraud_FlagAvg_FlightAvg_RestTotal_Delays
1C017Aman_A320 A32017JAN20269916775.00%  ...
2C019Mohan_A350 A35017JAN202681016066.67%  ...
3C018Riya_B737 B73717JAN202611738391.67%  ...
4C020Tara_B787 B78717JAN2026126491100.0%  ...
5C001Ramesh_A320A32001JAN202681016066.67%MEDIUMNO8.200009.800006
6C003Arjun_A320A32003JAN202661204550.00%LOWNO8.200009.800006
7C006Pooja_A320A32006JAN2026126490100.0%HIGHYES8.200009.800006
8C010Kavya_A320A32010JAN20269916875.00%MEDIUMNO8.200009.800006
9C014Anu_A320A32014JAN202661204850.00%LOWNO8.200009.800006
10C004Meera_A350A35004JAN202611738591.67%HIGHYES9.000009.000006
11C008Neha_A350A35008JAN202610827083.33%HIGHNO9.000009.000006
12C012Divya_A350A35012JAN202681016066.67%MEDIUMNO9.000009.000006
13C016Sneha_A350A35016JAN202671105558.33%MEDIUMNO9.000009.000006
14C002Sita_B737B73702JAN202610827583.33%HIGHNO9.500008.500007
15C007Rahul_B737B73707JAN202671105058.33%MEDIUMNO9.500008.500007
16C011Ajay_B737B73711JAN202611738291.67%HIGHYES9.500008.500007
17C015Rohit_B737B73715JAN202610827583.33%HIGHNO9.500008.500007
18C005Kiran_B787B78705JAN20269916575.00%MEDIUMNO8.666679.333335
19C009Vinay_B787B78709JAN202651304041.67%LOWNO8.666679.333335
20C013Sanjay_B787B78713JAN2026126492100.0%HIGHYES8.666679.333335

Combines operational data with:

  • Summaries
  • Benchmarks
  • Targets

STEP 15 – DELETE USING PROC DATASETS

proc datasets library=work;

    delete char_demo crew_t;

quit;

LOG:

NOTE: Deleting WORK.CHAR_DEMO (memtype=DATA).
NOTE: Deleting WORK.CREW_T (memtype=DATA).

Professional hygiene:

  • Free memory
  • Avoid confusion
  • Speed processing

THIS PROJECT COVERS

This single project prepares you for:

Topic

Covered

Base SAS

YES

SQL

YES

Macros

YES

Dates

YES

Character functions

YES

Numeric functions

YES

Reporting

YES

Visualization

YES

Data integration

YES

Business logic

YES


FINAL BUSINESS IMPACT

If this system runs in real life:

Airline gets:

·       Safer operations

·       Lower accident risk

·       Better crew morale

·       Lower regulatory penalties

·       Higher efficiency

This is exactly what aviation analytics teams do daily.


FUTURE ENHANCEMENTS

This system can be expanded with:

·       Weather impact analysis

·       Time zone adjustments

·       Multi-leg flight modeling

·       Predictive machine learning

·       Real-time streaming data

·       Integration with HR systems


CONCLUSION

The Airline Crew Schedules Analytics System demonstrates how SAS can be used as a complete operational intelligence platform in a highly regulated, safety-critical industry.

This project is not a simple academic exercise. It reflects how real airlines:

·       Collect operational data

·       Apply business rules

·       Detect risks

·       Visualize patterns

·       Support decision making

·       Ensure regulatory compliance

By using:

·       PROC SQL for summarization

·       PROC MEANS and UNIVARIATE for statistics

·       PROC CORR for relationship analysis

·       PROC SGPLOT for visualization

·       SAS Macros for automation

·       Date functions for scheduling logic

·       Character and numeric functions for data quality

This system becomes a fully functional airline analytics framework.



INTERVIEW QUESTIONS FOR YOU

·  What is the difference between CAT, CATS, and CATX?

·  What is the difference between TRIM and STRIP?

·  What is SCAN function?

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

About the Author:

SAS Learning Hub is a data analytics and SAS programming platform focused on clinical, financial, and real-world data analysis. The content is created by professionals with academic training in Pharmaceutics and hands-on experience in Base SAS, PROC SQL, Macros, SDTM, and ADaM, providing practical and industry-relevant SAS learning resources.


Disclaimer:

The datasets and analysis in this article are created for educational and demonstration purposes only. They do not represent Airline Crew data.


Our Mission:

This blog provides industry-focused SAS programming tutorials and analytics projects covering finance, healthcare, and technology.


This project is suitable for:

·  Students learning SAS

·  Data analysts building portfolios

·  Professionals preparing for SAS interviews

·  Bloggers writing about analytics and smart cities

·  EV and energy industry professionals

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Follow Us On : 


 
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--->Follow our blog for more SAS-based analytics projects and industry data models.

---> Support Us By Following Our Blog..

To deepen your understanding of SAS analytics, please refer to our other data science and industry-focused projects listed below:

1.Can we analyze planets using SAS like NASA scientists?

2.Can SAS Compare How 3 Different Families Live in Their Homes?

3.Can SAS Help Us Choose the Most Efficient Cooler?

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

About Us | Contact Privacy Policy

Comments

Popular posts from this blog

379.CAN SAS DELIVER END-TO-END TLF (TABLES, LISTINGS, AND FIGURES) FOR INSURANCE CLAIMS ANALYSIS?

184.HOW TO CREATE MOCK SHELLS AND CLINICAL DATA LISTINGS IN SAS USING DATA NULL | PROC PRINT | PROC REPORT | PROC SORT | PROC COMPARE | ODS PDF | ODS RTF | ODS EXCEL | A COMPLETE STEP-BY-STEP GUIDE FOR CLINICAL SAS PROGRAMMERS

383.Which Pharma Distributors Are High-Risk? Can SAS Detect Delays, Temperature Violations, and Fraud?