392.How Can SAS Analytics Transform E-Waste Recycling Facilities into Sustainable and Efficient Operations?

How Can SAS Analytics Transform E-Waste Recycling Facilities into Sustainable and Efficient Operations? 

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

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 DATASETS DELETE | DATA FUNCTIONS

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

1. INTRODUCTION

Electronic waste (E-Waste) is one of the fastest-growing waste streams globally. Devices like mobile phones, laptops, televisions, and batteries contribute heavily to environmental pollution if not recycled properly.

E-waste recycling facilities play a crucial role in:

·       Recovering valuable materials

·       Preventing toxic contamination

·       Ensuring sustainable industrial practices

This SAS project simulates real-world operational data for E-Waste Recycling Facilities and applies advanced analytics techniques using Base SAS, SQL, Macros, and Statistical Procedures.


2. BUSINESS CONTEXT

Why this project matters:

Companies, governments, and NGOs need:

·       Facility efficiency tracking

·       Hazard compliance monitoring

·       Sustainability performance measurement

·       Fraud and anomaly detection

·       Cost vs recovery optimization

This dataset and analysis helps answer:

·       Which facilities are efficient?

·       Which ones pose high hazard risks?

·       Are reported recovery rates realistic?

·       Are operational costs aligned with output?


3. PROJECT OBJECTIVES

 Create a realistic dataset with 15+ observations
 Apply date formats, percentages, numeric metrics
 Implement utilization classification macro
 Implement fraud detection logic macro
 Use PROC SQL, MEANS, UNIVARIATE, CORR, FREQ, SGPLOT
 Apply SET, MERGE, APPEND, TRANSPOSE
 Use INTCK, INTNX, MDY
 Use character and numeric functions
 Provide deep explanations for interviews


4. DATASET DESIGN

Dataset Name:

ewaste_facilities

Observations:

18 facilities

Geographic Coverage:

India, USA, Germany, Japan, China, UK, Canada, Australia


5. VARIABLE DEFINITIONS

Variable

Description

Facility_Name

Name of recycling facility

Country

Facility country

Waste_Processed_Tons

Total e-waste processed

Recovery_Rate

% of material recovered

Hazard_Level

LOW / MEDIUM / HIGH

Operating_Cost

Annual operating cost

Sustainability_Score

Internal sustainability rating

Start_Date

Facility operational start date

Report_Date

Reporting date

Utilization_Class

Macro-derived classification

Fraud_Flag

Fraud detection indicator


6. DATE HANDLING STRATEGY

We will use:

·       MDY() – create SAS dates

·       INTCK() – calculate duration

·       INTNX() – project future review dates

·       SAS date formats (date9.)


7. DATASET CREATION

data ewaste_facilities;

    length Facility_Name $30 Country $15 Hazard_Level $10;

    input Facility_Name $ Country $ Waste_Processed_Tons Recovery_Rate Hazard_Level $

          Operating_Cost Sustainability_Score Start_Date :date9. Report_Date :date9.;

    format Start_Date Report_Date date9.;

    datalines;

EcoCycle_India India 12000 85 LOW 4500000 88 01JAN2015 01JAN2025

GreenLoop_USA USA 18000 92 MEDIUM 8200000 91 15MAR2012 01JAN2025

ReTech_Germany Germany 15000 89 LOW 6100000 90 10FEB2014 01JAN2025

UrbanRecycle_UK UK 11000 78 HIGH 4000000 72 05MAY2016 01JAN2025

Ecoreclaim_Japan Japan 17000 94 LOW 7500000 95 12JUN2011 01JAN2025

WasteRenew_China China 30000 60 HIGH 5000000 55 20AUG2018 01JAN2025

EcoNova_Canada Canada 13000 88 MEDIUM 5300000 87 18SEP2013 01JAN2025

RecycleHub_Aus Australia 9000 82 MEDIUM 3900000 80 11NOV2017 01JAN2025

GreenEarth_India India 14000 90 LOW 5200000 92 09APR2014 01JAN2025

TechWaste_USA USA 21000 58 HIGH 8700000 60 07JUL2019 01JAN2025

EcoSphere_UK UK 12500 86 MEDIUM 4600000 85 03MAR2015 01JAN2025

ZeroWaste_Japan Japan 16000 91 LOW 6800000 94 25DEC2010 01JAN2025

CleanCircuit_Germany Germany 14500 88 MEDIUM 6000000 89 14JAN2013 01JAN2025

RecycleMax_India India 20000 62 HIGH 7100000 65 02FEB2020 01JAN2025

EcoFuture_USA USA 15500 87 MEDIUM 5900000 88 06JUN2016 01JAN2025

UrbanGreen_Canada Canada 13500 84 MEDIUM 5100000 86 19SEP2014 01JAN2025

GreenMetal_China China 28000 65 HIGH 5400000 58 21OCT2018 01JAN2025

EcoLoop_Aus Australia 9500 83 LOW 3700000 82 13NOV2016 01JAN2025

;

run;

proc print data=ewaste_facilities;

run;

OUTPUT:

ObsFacility_NameCountryHazard_LevelWaste_Processed_TonsRecovery_RateOperating_CostSustainability_ScoreStart_DateReport_Date
1EcoCycle_IndiaIndiaLOW120008545000008801JAN201501JAN2025
2GreenLoop_USAUSAMEDIUM180009282000009115MAR201201JAN2025
3ReTech_GermanyGermanyLOW150008961000009010FEB201401JAN2025
4UrbanRecycle_UKUKHIGH110007840000007205MAY201601JAN2025
5Ecoreclaim_JapanJapanLOW170009475000009512JUN201101JAN2025
6WasteRenew_ChinaChinaHIGH300006050000005520AUG201801JAN2025
7EcoNova_CanadaCanadaMEDIUM130008853000008718SEP201301JAN2025
8RecycleHub_AusAustraliaMEDIUM90008239000008011NOV201701JAN2025
9GreenEarth_IndiaIndiaLOW140009052000009209APR201401JAN2025
10TechWaste_USAUSAHIGH210005887000006007JUL201901JAN2025
11EcoSphere_UKUKMEDIUM125008646000008503MAR201501JAN2025
12ZeroWaste_JapanJapanLOW160009168000009425DEC201001JAN2025
13CleanCircuit_GermanyGermanyMEDIUM145008860000008914JAN201301JAN2025
14RecycleMax_IndiaIndiaHIGH200006271000006502FEB202001JAN2025
15EcoFuture_USAUSAMEDIUM155008759000008806JUN201601JAN2025
16UrbanGreen_CanadaCanadaMEDIUM135008451000008619SEP201401JAN2025
17GreenMetal_ChinaChinaHIGH280006554000005821OCT201801JAN2025
18EcoLoop_AusAustraliaLOW95008337000008213NOV201601JAN2025

·  length defines character size to prevent truncation

·  format date9. ensures readable dates

·  MDY-style dates entered as SAS date literals

·  18 realistic observations created

·  Numeric + percentage + categorical mix

8. DATA CLEANING & CHARACTER FUNCTIONS

data ewaste_clean;

    set ewaste_facilities;

    Facility_Name = propcase(strip(Facility_Name));

    Country = upcase(trim(Country));

    Facility_ID = catx('_', Country, substr(Facility_Name,1,5));

run;

proc print data=ewaste_clean;

 var Facility_Name Country Facility_ID;

run;

OUTPUT:

ObsFacility_NameCountryFacility_ID
1Ecocycle_indiaINDIAINDIA_Ecocy
2Greenloop_usaUSAUSA_Green
3Retech_germanyGERMANYGERMANY_Retec
4Urbanrecycle_ukUKUK_Urban
5Ecoreclaim_japanJAPANJAPAN_Ecore
6Wasterenew_chinaCHINACHINA_Waste
7Econova_canadaCANADACANADA_Econo
8Recyclehub_ausAUSTRALIAAUSTRALIA_Recyc
9Greenearth_indiaINDIAINDIA_Green
10Techwaste_usaUSAUSA_Techw
11Ecosphere_ukUKUK_Ecosp
12Zerowaste_japanJAPANJAPAN_Zerow
13Cleancircuit_germanyGERMANYGERMANY_Clean
14Recyclemax_indiaINDIAINDIA_Recyc
15Ecofuture_usaUSAUSA_Ecofu
16Urbangreen_canadaCANADACANADA_Urban
17Greenmetal_chinaCHINACHINA_Green
18Ecoloop_ausAUSTRALIAAUSTRALIA_Ecolo

·  strip() removes leading/trailing spaces

·  trim() cleans end spaces

·  propcase() improves readability

·  upcase() standardizes values

·  coalesce() handles missing hazard levels

·  catx() builds business IDs

9. UTILIZATION CLASSIFICATION MACRO

%macro utilization_class;

data ewaste_util;

    set ewaste_clean;

length Utilization_Class $8.;

    if Waste_Processed_Tons >= 18000 then Utilization_Class='HIGH';

    else if Waste_Processed_Tons >= 12000 then Utilization_Class='MEDIUM';

    else Utilization_Class='LOW';

run;

proc print data=ewaste_util;

run;

%mend;


%utilization_class;

OUTPUT:

ObsFacility_NameCountryHazard_LevelWaste_Processed_TonsRecovery_RateOperating_CostSustainability_ScoreStart_DateReport_DateFacility_IDUtilization_Class
1Ecocycle_indiaINDIALOW120008545000008801JAN201501JAN2025INDIA_EcocyMEDIUM
2Greenloop_usaUSAMEDIUM180009282000009115MAR201201JAN2025USA_GreenHIGH
3Retech_germanyGERMANYLOW150008961000009010FEB201401JAN2025GERMANY_RetecMEDIUM
4Urbanrecycle_ukUKHIGH110007840000007205MAY201601JAN2025UK_UrbanLOW
5Ecoreclaim_japanJAPANLOW170009475000009512JUN201101JAN2025JAPAN_EcoreMEDIUM
6Wasterenew_chinaCHINAHIGH300006050000005520AUG201801JAN2025CHINA_WasteHIGH
7Econova_canadaCANADAMEDIUM130008853000008718SEP201301JAN2025CANADA_EconoMEDIUM
8Recyclehub_ausAUSTRALIAMEDIUM90008239000008011NOV201701JAN2025AUSTRALIA_RecycLOW
9Greenearth_indiaINDIALOW140009052000009209APR201401JAN2025INDIA_GreenMEDIUM
10Techwaste_usaUSAHIGH210005887000006007JUL201901JAN2025USA_TechwHIGH
11Ecosphere_ukUKMEDIUM125008646000008503MAR201501JAN2025UK_EcospMEDIUM
12Zerowaste_japanJAPANLOW160009168000009425DEC201001JAN2025JAPAN_ZerowMEDIUM
13Cleancircuit_germanyGERMANYMEDIUM145008860000008914JAN201301JAN2025GERMANY_CleanMEDIUM
14Recyclemax_indiaINDIAHIGH200006271000006502FEB202001JAN2025INDIA_RecycHIGH
15Ecofuture_usaUSAMEDIUM155008759000008806JUN201601JAN2025USA_EcofuMEDIUM
16Urbangreen_canadaCANADAMEDIUM135008451000008619SEP201401JAN2025CANADA_UrbanMEDIUM
17Greenmetal_chinaCHINAHIGH280006554000005821OCT201801JAN2025CHINA_GreenHIGH
18Ecoloop_ausAUSTRALIALOW95008337000008213NOV201601JAN2025AUSTRALIA_EcoloLOW

·  High utilization = heavy capacity usage

·  Medium = stable operations

·  Low = under-utilized facility

10. FRAUD DETECTION MACRO

%macro fraud_detection;

data ewaste_fraud;

    set ewaste_util;

    if Recovery_Rate < 65 and Operating_Cost > 7000000 then Fraud_Flag='Y';

    else Fraud_Flag='N';

run;

proc print data=ewaste_fraud;

run;

%mend;


%fraud_detection;

OUTPUT:

ObsFacility_NameCountryHazard_LevelWaste_Processed_TonsRecovery_RateOperating_CostSustainability_ScoreStart_DateReport_DateFacility_IDUtilization_ClassFraud_Flag
1Ecocycle_indiaINDIALOW120008545000008801JAN201501JAN2025INDIA_EcocyMEDIUMN
2Greenloop_usaUSAMEDIUM180009282000009115MAR201201JAN2025USA_GreenHIGHN
3Retech_germanyGERMANYLOW150008961000009010FEB201401JAN2025GERMANY_RetecMEDIUMN
4Urbanrecycle_ukUKHIGH110007840000007205MAY201601JAN2025UK_UrbanLOWN
5Ecoreclaim_japanJAPANLOW170009475000009512JUN201101JAN2025JAPAN_EcoreMEDIUMN
6Wasterenew_chinaCHINAHIGH300006050000005520AUG201801JAN2025CHINA_WasteHIGHN
7Econova_canadaCANADAMEDIUM130008853000008718SEP201301JAN2025CANADA_EconoMEDIUMN
8Recyclehub_ausAUSTRALIAMEDIUM90008239000008011NOV201701JAN2025AUSTRALIA_RecycLOWN
9Greenearth_indiaINDIALOW140009052000009209APR201401JAN2025INDIA_GreenMEDIUMN
10Techwaste_usaUSAHIGH210005887000006007JUL201901JAN2025USA_TechwHIGHY
11Ecosphere_ukUKMEDIUM125008646000008503MAR201501JAN2025UK_EcospMEDIUMN
12Zerowaste_japanJAPANLOW160009168000009425DEC201001JAN2025JAPAN_ZerowMEDIUMN
13Cleancircuit_germanyGERMANYMEDIUM145008860000008914JAN201301JAN2025GERMANY_CleanMEDIUMN
14Recyclemax_indiaINDIAHIGH200006271000006502FEB202001JAN2025INDIA_RecycHIGHY
15Ecofuture_usaUSAMEDIUM155008759000008806JUN201601JAN2025USA_EcofuMEDIUMN
16Urbangreen_canadaCANADAMEDIUM135008451000008619SEP201401JAN2025CANADA_UrbanMEDIUMN
17Greenmetal_chinaCHINAHIGH280006554000005821OCT201801JAN2025CHINA_GreenHIGHN
18Ecoloop_ausAUSTRALIALOW95008337000008213NOV201601JAN2025AUSTRALIA_EcoloLOWN

·  Low recovery + high cost = suspicious

·  Used by auditors & regulators

11. DATE CALCULATIONS

data ewaste_dates;

    set ewaste_fraud;

    Years_Operating = intck('year', Start_Date, Report_Date);

    Next_Audit = intnx('year', Report_Date, 1, 'same');

run;

proc print data=ewaste_dates;

run;

OUTPUT:

ObsFacility_NameCountryHazard_LevelWaste_Processed_TonsRecovery_RateOperating_CostSustainability_ScoreStart_DateReport_DateFacility_IDUtilization_ClassFraud_FlagYears_OperatingNext_Audit
1Ecocycle_indiaINDIALOW120008545000008801JAN201501JAN2025INDIA_EcocyMEDIUMN1024107
2Greenloop_usaUSAMEDIUM180009282000009115MAR201201JAN2025USA_GreenHIGHN1324107
3Retech_germanyGERMANYLOW150008961000009010FEB201401JAN2025GERMANY_RetecMEDIUMN1124107
4Urbanrecycle_ukUKHIGH110007840000007205MAY201601JAN2025UK_UrbanLOWN924107
5Ecoreclaim_japanJAPANLOW170009475000009512JUN201101JAN2025JAPAN_EcoreMEDIUMN1424107
6Wasterenew_chinaCHINAHIGH300006050000005520AUG201801JAN2025CHINA_WasteHIGHN724107
7Econova_canadaCANADAMEDIUM130008853000008718SEP201301JAN2025CANADA_EconoMEDIUMN1224107
8Recyclehub_ausAUSTRALIAMEDIUM90008239000008011NOV201701JAN2025AUSTRALIA_RecycLOWN824107
9Greenearth_indiaINDIALOW140009052000009209APR201401JAN2025INDIA_GreenMEDIUMN1124107
10Techwaste_usaUSAHIGH210005887000006007JUL201901JAN2025USA_TechwHIGHY624107
11Ecosphere_ukUKMEDIUM125008646000008503MAR201501JAN2025UK_EcospMEDIUMN1024107
12Zerowaste_japanJAPANLOW160009168000009425DEC201001JAN2025JAPAN_ZerowMEDIUMN1524107
13Cleancircuit_germanyGERMANYMEDIUM145008860000008914JAN201301JAN2025GERMANY_CleanMEDIUMN1224107
14Recyclemax_indiaINDIAHIGH200006271000006502FEB202001JAN2025INDIA_RecycHIGHY524107
15Ecofuture_usaUSAMEDIUM155008759000008806JUN201601JAN2025USA_EcofuMEDIUMN924107
16Urbangreen_canadaCANADAMEDIUM135008451000008619SEP201401JAN2025CANADA_UrbanMEDIUMN1124107
17Greenmetal_chinaCHINAHIGH280006554000005821OCT201801JAN2025CHINA_GreenHIGHN724107
18Ecoloop_ausAUSTRALIALOW95008337000008213NOV201601JAN2025AUSTRALIA_EcoloLOWN924107

12. PROC SQL – BUSINESS QUERIES

proc sql;

    create table cost_efficiency as

    select Country,

           avg(Waste_Processed_Tons) as Avg_Waste,

           avg(Recovery_Rate) as Avg_Recovery,

           avg(Operating_Cost) as Avg_Cost

    from ewaste_dates

    group by Country;

quit;

proc print data=cost_efficiency;

run;

OUTPUT:

ObsCountryAvg_WasteAvg_RecoveryAvg_Cost
1AUSTRALIA9250.0082.53800000
2CANADA13250.0086.05200000
3CHINA29000.0062.55200000
4GERMANY14750.0088.56050000
5INDIA15333.3379.05600000
6JAPAN16500.0092.57150000
7UK11750.0082.04300000
8USA18166.6779.07600000

·  Complex grouping

·  Cleaner syntax

·  Industry-preferred

13. PROC FREQ – CATEGORICAL ANALYSIS

proc freq data=ewaste_dates;

    tables Country*Hazard_Level Fraud_Flag / nocum nopercent;

run;

OUTPUT:

The FREQ Procedure

Frequency
Row Pct
Col Pct
Table of Country by Hazard_Level
CountryHazard_Level
HIGHLOWMEDIUMTotal
AUSTRALIA
0
0.00
0.00
1
50.00
16.67
1
50.00
14.29
2
 
 
CANADA
0
0.00
0.00
0
0.00
0.00
2
100.00
28.57
2
 
 
CHINA
2
100.00
40.00
0
0.00
0.00
0
0.00
0.00
2
 
 
GERMANY
0
0.00
0.00
1
50.00
16.67
1
50.00
14.29
2
 
 
INDIA
1
33.33
20.00
2
66.67
33.33
0
0.00
0.00
3
 
 
JAPAN
0
0.00
0.00
2
100.00
33.33
0
0.00
0.00
2
 
 
UK
1
50.00
20.00
0
0.00
0.00
1
50.00
14.29
2
 
 
USA
1
33.33
20.00
0
0.00
0.00
2
66.67
28.57
3
 
 
Total
5
6
7
18
Fraud_FlagFrequency
N16
Y2

14. PROC MEANS – NUMERIC SUMMARY

proc means data=ewaste_dates mean min max;

    var Waste_Processed_Tons Recovery_Rate Operating_Cost Sustainability_Score;

run;

OUTPUT:

The MEANS Procedure

VariableMeanMinimumMaximum
Waste_Processed_Tons
Recovery_Rate
Operating_Cost
Sustainability_Score
16083.33
81.2222222
5722222.22
80.9444444
9000.00
58.0000000
3700000.00
55.0000000
30000.00
94.0000000
8700000.00
95.0000000

15. PROC UNIVARIATE – DISTRIBUTION

proc univariate data=ewaste_dates;

    var Recovery_Rate Operating_Cost;

    histogram Recovery_Rate;

run;

OUTPUT:

The UNIVARIATE Procedure

Variable: Recovery_Rate

Moments
N18Sum Weights18
Mean81.2222222Sum Observations1462
Std Deviation11.6798245Variance136.418301
Skewness-1.1238977Kurtosis-0.1687343
Uncorrected SS121066Corrected SS2319.11111
Coeff Variation14.3800849Std Error Mean2.75296104
Basic Statistical Measures
LocationVariability
Mean81.22222Std Deviation11.67982
Median85.50000Variance136.41830
Mode88.00000Range36.00000
  Interquartile Range11.00000
Tests for Location: Mu0=0
TestStatisticp Value
Student's tt29.50359Pr > |t|<.0001
SignM9Pr >= |M|<.0001
Signed RankS85.5Pr >= |S|<.0001
Quantiles (Definition 5)
LevelQuantile
100% Max94.0
99%94.0
95%94.0
90%92.0
75% Q389.0
50% Median85.5
25% Q178.0
10%60.0
5%58.0
1%58.0
0% Min58.0
Extreme Observations
LowestHighest
ValueObsValueObs
5810893
606909
62149112
6517922
784945

The UNIVARIATE Procedure

Histogram for Recovery_Rate

The UNIVARIATE Procedure

Variable: Operating_Cost

Moments
N18Sum Weights18
Mean5722222.22Sum Observations103000000
Std Deviation1456650.29Variance2.12183E12
Skewness0.59195226Kurtosis-0.40658
Uncorrected SS6.2546E14Corrected SS3.60711E13
Coeff Variation25.4560245Std Error Mean343335.766
Basic Statistical Measures
LocationVariability
Mean5722222Std Deviation1456650
Median5350000Variance2.12183E12
Mode.Range5000000
  Interquartile Range2200000
Tests for Location: Mu0=0
TestStatisticp Value
Student's tt16.66655Pr > |t|<.0001
SignM9Pr >= |M|<.0001
Signed RankS85.5Pr >= |S|<.0001
Quantiles (Definition 5)
LevelQuantile
100% Max8700000
99%8700000
95%8700000
90%8200000
75% Q36800000
50% Median5350000
25% Q14600000
10%3900000
5%3700000
1%3700000
0% Min3700000
Extreme Observations
LowestHighest
ValueObsValueObs
370000018680000012
39000008710000014
4000000475000005
4500000182000002
460000011870000010

16. PROC CORR – RELATIONSHIP ANALYSIS

proc corr data=ewaste_dates;

    var Waste_Processed_Tons Recovery_Rate Operating_Cost Sustainability_Score;

run;

OUTPUT:

The CORR Procedure

4 Variables:Waste_Processed_Tons Recovery_Rate Operating_Cost Sustainability_Score
Simple Statistics
VariableNMeanStd DevSumMinimumMaximum
Waste_Processed_Tons18160835704289500900030000
Recovery_Rate1881.2222211.67982146258.0000094.00000
Operating_Cost185722222145665010300000037000008700000
Sustainability_Score1880.9444413.04054145755.0000095.00000
Pearson Correlation Coefficients, N = 18
Prob > |r| under H0: Rho=0
 Waste_Processed_TonsRecovery_RateOperating_CostSustainability_Score
Waste_Processed_Tons
1.00000
 
-0.66117
0.0028
0.42100
0.0819
-0.67093
0.0023
Recovery_Rate
-0.66117
0.0028
1.00000
 
-0.09643
0.7035
0.97526
<.0001
Operating_Cost
0.42100
0.0819
-0.09643
0.7035
1.00000
 
0.00936
0.9706
Sustainability_Score
-0.67093
0.0023
0.97526
<.0001
0.00936
0.9706
1.00000
 

17. PROC SGPLOT – VISUALIZATION

proc sgplot data=ewaste_dates;

    scatter x=Operating_Cost y=Recovery_Rate / group=Hazard_Level;

run;

OUTPUT:

The SGPlot Procedure

18. APPEND, TRANSPOSE

Creating New Data

data ewaste_new_batch;

    length Facility_Name $30 Country $15 Hazard_Level $10 Utilization_Class $10 Fraud_Flag $1;

    input Facility_Name $ Country $ Waste_Processed_Tons Recovery_Rate Hazard_Level $

          Operating_Cost Sustainability_Score Start_Date :date9. Report_Date :date9.

          Utilization_Class $ Fraud_Flag $;

    format Start_Date Report_Date date9.;

    datalines;

NeoRecycle_India INDIA 16000 88 LOW 5800000 90 01JAN2016 01FEB2025 MEDIUM N

SmartEcycle_USA USA 22000 59 HIGH 9100000 62 15MAR2019 01FEB2025 HIGH Y

EcoRenew_UK UK 10000 84 MEDIUM 4200000 83 10APR2017 01FEB2025 LOW N

;

run;

proc print data=ewaste_new_batch;

run;

OUTPUT:

ObsFacility_NameCountryHazard_LevelUtilization_ClassFraud_FlagWaste_Processed_TonsRecovery_RateOperating_CostSustainability_ScoreStart_DateReport_Date
1NeoRecycle_IndiaINDIALOWMEDIUMN160008858000009001JAN201601FEB2025
2SmartEcycle_USAUSAHIGHHIGHY220005991000006215MAR201901FEB2025
3EcoRenew_UKUKMEDIUMLOWN100008442000008310APR201701FEB2025

proc append base=ewaste_dates 

            data=ewaste_new_batch force;

run;

proc print data=ewaste_dates;

run;

OUTPUT:

ObsFacility_NameCountryHazard_LevelWaste_Processed_TonsRecovery_RateOperating_CostSustainability_ScoreStart_DateReport_DateFacility_IDUtilization_ClassFraud_FlagYears_OperatingNext_Audit
1Ecocycle_indiaINDIALOW120008545000008801JAN201501JAN2025INDIA_EcocyMEDIUMN1024107
2Greenloop_usaUSAMEDIUM180009282000009115MAR201201JAN2025USA_GreenHIGHN1324107
3Retech_germanyGERMANYLOW150008961000009010FEB201401JAN2025GERMANY_RetecMEDIUMN1124107
4Urbanrecycle_ukUKHIGH110007840000007205MAY201601JAN2025UK_UrbanLOWN924107
5Ecoreclaim_japanJAPANLOW170009475000009512JUN201101JAN2025JAPAN_EcoreMEDIUMN1424107
6Wasterenew_chinaCHINAHIGH300006050000005520AUG201801JAN2025CHINA_WasteHIGHN724107
7Econova_canadaCANADAMEDIUM130008853000008718SEP201301JAN2025CANADA_EconoMEDIUMN1224107
8Recyclehub_ausAUSTRALIAMEDIUM90008239000008011NOV201701JAN2025AUSTRALIA_RecycLOWN824107
9Greenearth_indiaINDIALOW140009052000009209APR201401JAN2025INDIA_GreenMEDIUMN1124107
10Techwaste_usaUSAHIGH210005887000006007JUL201901JAN2025USA_TechwHIGHY624107
11Ecosphere_ukUKMEDIUM125008646000008503MAR201501JAN2025UK_EcospMEDIUMN1024107
12Zerowaste_japanJAPANLOW160009168000009425DEC201001JAN2025JAPAN_ZerowMEDIUMN1524107
13Cleancircuit_germanyGERMANYMEDIUM145008860000008914JAN201301JAN2025GERMANY_CleanMEDIUMN1224107
14Recyclemax_indiaINDIAHIGH200006271000006502FEB202001JAN2025INDIA_RecycHIGHY524107
15Ecofuture_usaUSAMEDIUM155008759000008806JUN201601JAN2025USA_EcofuMEDIUMN924107
16Urbangreen_canadaCANADAMEDIUM135008451000008619SEP201401JAN2025CANADA_UrbanMEDIUMN1124107
17Greenmetal_chinaCHINAHIGH280006554000005821OCT201801JAN2025CHINA_GreenHIGHN724107
18Ecoloop_ausAUSTRALIALOW95008337000008213NOV201601JAN2025AUSTRALIA_EcoloLOWN924107
19NeoRecycle_IndiaINDIALOW160008858000009001JAN201601FEB2025 MEDIUMN..
20SmartEcycle_USAUSAHIGH220005991000006215MAR201901FEB2025 HIGHY..
21EcoRenew_UKUKMEDIUM100008442000008310APR201701FEB2025 LOWN..

proc transpose data=ewaste_dates out=ewaste_transposed;

    var Waste_Processed_Tons Recovery_Rate;

    by Country NotSorted;

run;

proc print data=ewaste_transposed;

run;

OUTPUT:

ObsCountry_NAME_COL1
1INDIAWaste_Processed_Tons12000
2INDIARecovery_Rate85
3USAWaste_Processed_Tons18000
4USARecovery_Rate92
5GERMANYWaste_Processed_Tons15000
6GERMANYRecovery_Rate89
7UKWaste_Processed_Tons11000
8UKRecovery_Rate78
9JAPANWaste_Processed_Tons17000
10JAPANRecovery_Rate94
11CHINAWaste_Processed_Tons30000
12CHINARecovery_Rate60
13CANADAWaste_Processed_Tons13000
14CANADARecovery_Rate88
15AUSTRALIAWaste_Processed_Tons9000
16AUSTRALIARecovery_Rate82
17INDIAWaste_Processed_Tons14000
18INDIARecovery_Rate90
19USAWaste_Processed_Tons21000
20USARecovery_Rate58
21UKWaste_Processed_Tons12500
22UKRecovery_Rate86
23JAPANWaste_Processed_Tons16000
24JAPANRecovery_Rate91
25GERMANYWaste_Processed_Tons14500
26GERMANYRecovery_Rate88
27INDIAWaste_Processed_Tons20000
28INDIARecovery_Rate62
29USAWaste_Processed_Tons15500
30USARecovery_Rate87
31CANADAWaste_Processed_Tons13500
32CANADARecovery_Rate84
33CHINAWaste_Processed_Tons28000
34CHINARecovery_Rate65
35AUSTRALIAWaste_Processed_Tons9500
36AUSTRALIARecovery_Rate83
37INDIAWaste_Processed_Tons16000
38INDIARecovery_Rate88
39USAWaste_Processed_Tons22000
40USARecovery_Rate59
41UKWaste_Processed_Tons10000
42UKRecovery_Rate84

19. PROC DATASETS – CLEANUP

proc datasets library=work nolist;

    delete ewaste_transposed;

quit;

LOG:

NOTE: Deleting WORK.EWASTE_TRANSPOSED (memtype=DATA).

20BUSINESS INSIGHTS

  • High hazard facilities often show lower recovery
  • Fraud-flagged facilities cluster in high-cost regions
  • Sustainability correlates positively with recovery

21. HIT POINTS

 Realistic business logic
 Strong macro usage
 CDISC-style audit thinking
 Clean coding practices
 Visualization + statistics


22. CONCLUSION

This project demonstrates full-stack SAS programming:

  • Data engineering
  • Statistical analysis
  • Business intelligence
  • Fraud detection
  • Sustainability analytics

It is perfect for interviews, portfolios, and senior-level discussions.


INTERVIEW QUESTIONS FOR YOU

·  What is the difference between PROC SQL and DATA step?

·  What is an INNER JOIN vs LEFT JOIN?

·  How do you remove duplicate rows using SQL?

 

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

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 E-WASTE 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:

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?