FESTIVAL DATASET : INFILE | INPUT | DATALINES | PROC CONTENT | PROC FREQ | MISSING | PROC MEANS STATEMENTS
data festivals;
infile datalines dlm=',' dsd truncover;
length Festival_Name $50 Country $50 City $50 Date $20 Type $20 Attendance $20 Description $200;
input Festival_Name $ Country $ City $ Date $ Type $ Attendance $ Description $;
datalines;
RamNavami,India,Nationwide,Mar-Apr,Religious,Millions,"Hindu festival of Lord Ram And Maa Sita."
Diwali,India,Nationwide,Oct-Nov,Religious,Millions,"Hindu festival of lights symbolizing victory of light over darkness."
Oktoberfest,Germany,Munich,Sep-Oct,Cultural,"6.7 million","World's largest Volksfest featuring beer and folk music."
Carnival,Brazil,"Rio de Janeiro",Feb-Mar,Cultural,"2 million/day","Famous for samba parades and vibrant costumes."
"Cherry Blossom Festival",Japan,Tokyo,Mar-Apr,Cultural,"Hundreds of thousands/day","Celebrates the blooming of cherry blossoms."
"Mardi Gras",USA,"New Orleans",February,Cultural,"1.4 million","Known for parades, music, and masquerade balls."
;
run;
proc print;run;
Output:
| Obs | Festival_Name | Country | City | Date | Type | Attendance | Description |
|---|---|---|---|---|---|---|---|
| 1 | RamNavami | India | Nationwide | Mar-Apr | Religious | Millions | Hindu festival of Lord Ram And Maa Sita. |
| 2 | Diwali | India | Nationwide | Oct-Nov | Religious | Millions | Hindu festival of lights symbolizing victory of light over darkness. |
| 3 | Oktoberfest | Germany | Munich | Sep-Oct | Cultural | 6.7 million | World's largest Volksfest featuring beer and folk music. |
| 4 | Carnival | Brazil | Rio de Janeiro | Feb-Mar | Cultural | 2 million/day | Famous for samba parades and vibrant costumes. |
| 5 | Cherry Blossom Festival | Japan | Tokyo | Mar-Apr | Cultural | Hundreds of thousand | Celebrates the blooming of cherry blossoms. |
| 6 | Mardi Gras | USA | New Orleans | February | Cultural | 1.4 million | Known for parades, music, and masquerade balls. |
proc contents data=work.festivals;
run;
Output:
| Data Set Name | WORK.FESTIVALS | Observations | 6 |
|---|---|---|---|
| Member Type | DATA | Variables | 11 |
| Engine | V9 | Indexes | 0 |
| Created | 14/09/2015 00:23:34 | Observation Length | 456 |
| Last Modified | 14/09/2015 00:23:34 | Deleted Observations | 0 |
| Protection | Compressed | NO | |
| Data Set Type | Sorted | NO | |
| Label | |||
| Data Representation | WINDOWS_64 | ||
| Encoding | wlatin1 Western (Windows) |
| Engine/Host Dependent Information | |
|---|---|
| Data Set Page Size | 65536 |
| Number of Data Set Pages | 1 |
| First Data Page | 1 |
| Max Obs per Page | 143 |
| Obs in First Data Page | 6 |
| Number of Data Set Repairs | 0 |
| ExtendObsCounter | YES |
| Filename | C:\Users\Lenovo\AppData\Local\Temp\SAS Temporary Files\_TD13148_DESKTOP-QFAA4KV_\festivals.sas7bdat |
| Release Created | 9.0401M2 |
| Host Created | X64_8HOME |
| Alphabetic List of Variables and Attributes | |||
|---|---|---|---|
| # | Variable | Type | Len |
| 6 | Attendance | Char | 20 |
| 3 | City | Char | 50 |
| 2 | Country | Char | 50 |
| 4 | Date | Char | 20 |
| 11 | Description | Char | 200 |
| 7 | Duration | Num | 8 |
| 8 | Economic_Impact | Char | 20 |
| 1 | Festival_Name | Char | 50 |
| 9 | Origin_Year | Char | 10 |
| 5 | Type | Char | 20 |
| 10 | UNESCO_Recognition | Char | 3 |
proc means data=work.festivals nmiss;
var _numeric_;
run;
Output:
| Analysis Variable : Duration |
|---|
| N Miss |
| 6 |
proc freq data=work.festivals;
tables _character_ / missing;
run;
Output:
| Festival_Name | Frequency | Percent | Cumulative Frequency |
Cumulative Percent |
|---|---|---|---|---|
| /*RamNavami India Nationwide Mar-Apr Religious Mi | 1 | 16.67 | 1 | 16.67 |
| Carnival Brazil Rio de Janeiro Feb-Mar Cultur | 1 | 16.67 | 2 | 33.33 |
| Cherry Blossom Festival Japan Tokyo March-Apri | 1 | 16.67 | 3 | 50.00 |
| Diwali India Nationwide Oct-Nov Religious Mi | 1 | 16.67 | 4 | 66.67 |
| Mardi Gras USA New Orleans February Cultural | 1 | 16.67 | 5 | 83.33 |
| Oktoberfest Germany Munich Sep-Oct Cultural 6 | 1 | 16.67 | 6 | 100.00 |
| Country | Frequency | Percent | Cumulative Frequency |
Cumulative Percent |
|---|---|---|---|---|
| 6 | 100.00 | 6 | 100.00 |
| City | Frequency | Percent | Cumulative Frequency |
Cumulative Percent |
|---|---|---|---|---|
| 6 | 100.00 | 6 | 100.00 |
| Date | Frequency | Percent | Cumulative Frequency |
Cumulative Percent |
|---|---|---|---|---|
| 6 | 100.00 | 6 | 100.00 |
| Type | Frequency | Percent | Cumulative Frequency |
Cumulative Percent |
|---|---|---|---|---|
| 6 | 100.00 | 6 | 100.00 |
| Attendance | Frequency | Percent | Cumulative Frequency |
Cumulative Percent |
|---|---|---|---|---|
| 6 | 100.00 | 6 | 100.00 |
| Economic_Impact | Frequency | Percent | Cumulative Frequency |
Cumulative Percent |
|---|---|---|---|---|
| 6 | 100.00 | 6 | 100.00 |
| Origin_Year | Frequency | Percent | Cumulative Frequency |
Cumulative Percent |
|---|---|---|---|---|
| 6 | 100.00 | 6 | 100.00 |
| UNESCO_Recognition | Frequency | Percent | Cumulative Frequency |
Cumulative Percent |
|---|---|---|---|---|
| 6 | 100.00 | 6 | 100.00 |
| Description | Frequency | Percent | Cumulative Frequency |
Cumulative Percent |
|---|---|---|---|---|
| 6 | 100.00 | 6 | 100.00 |
proc freq data=work.festivals;
tables Country;
run;
Output:
| Country | Frequency | Percent | Cumulative Frequency |
Cumulative Percent |
|---|---|---|---|---|
| Frequency Missing = 6 | ||||
proc freq data=work.festivals;
tables Type*Season / chisq;
run;
Output:
| For Type * Season all data are missing since all the levels of variable Type are missing |
No comments:
Post a Comment