How many times have you started working with data that is completely ready for analysis? Once, twice, always, NEVER? Well hopefully not never, but typically data is not ready for analysis and it can be your job to prepare it.
Now, you might hear all sorts of different statistics regarding data preparation, but the typical stat you will hear is the 80/20 rule. The rule states that 80% of your time will be spent preparing data and the other 20% will be spent on analysis. Some surveys even conclude that data preparation can be the least enjoyable part of the project, which is crazy! I see the data preparation stage as a puzzle that needs to be solved, and I love puzzles!
In this case study you will focus on preparing 2014 global tourism data using the knowledge gained from the SAS Programming 2 course. The current tourism data is not in a format ready for analysis, and to prepare the data correctly you will need to follow the requirements in the case study. Requirements include:
Try to think of this problem as a puzzle that needs to be solved. Take your time, work on one part at a time and move on to the next!
When working on this case study you might be thinking "what do I do if I get stuck?" That's an excellent question! Let's discuss the ways you can attempt the case study to best suit your specific needs:
If you have any questions regarding the case study, if you complete the case study and come up with different solutions and want to show them off, or if you want to post additional visualizations or analysis of the data create a post in the SAS Programming 1 and 2 Forum. We would love to hear from you!
To attempt this case study, you will need to download the following:
LOVE the Log Scanner program!
I'm stuck on Question 5 of the Case Study. When I type in the if-then statement to change the .. to missing values, none of the values changes. My log gives me the all-clear. I filter my data before hand to check how many values need to be changed so that I know that some changes need to occur. I'm using SAS Studio so I'm not sure how I can show you my code.
@CalebSindi can you paste your code or save the SAS program and attach it? Can't determine the issue without see the code.
The solution is on 1-11 of the PDF as well.
Hi, @Panagiotis here's my code. I appreciate the help.
data cleaned_tourism;
length Country_Name $ 300;
length Tourism_Type $ 20;
retain Country_Name Tourism_Type ' ';
set tourism(drop=_1995--_2013);
if A not=. then Country_Name=Country;
if Country='Inbound tourism' then Tourism_Type=Country;
if Country='Outbound tourism' then Tourism_Type=Country;
if Country_Name ne Country and Tourism_Type ne Country then output;
Series=upcase(Series);
if Series=".." then Series=" ";
ConversionType=strip(scan(Country,-1,' '));
run;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Ready to level-up your skills? Choose your own adventure.
e-Learning Support
Creating data for Programming 1 and 2 (context)
Get Free Software
Access SAS OnDemand for Academics, a learning version of SAS.
Software Product Support
Downloads and Hot Fixes
SAS Product Documentation
SAS Technical Support
SAS Viya
support.sas.com
Trials, Demos & Free Software
Connection Points
Blogs
SAS Support Communities
User Groups
More Ways to Learn
Ask the Expert Webinars
Books
Earn SAS Certification
Free How-To Tutorials
SAS Users Blog
SAS Users YouTube