Cars versus drivers: Who's safer?

A recent news report shows an unexpected spike in traffic fatalities here in the US in 2015. This got me wondering what the data shows ... for the past 100 years or so...

Driving was a lot more dangerous in the early days. If you were in a wreck, you were likely to suffer terrible cuts as you flew through the windshield - or at the very least smash your head into the metal dash, or have a broken wooden steering wheel impale your chest. And of course with no seat belts, you might go flying out of the vehicle altogether!

My buddy Jerry had a hot rod 1920-something T-bucket. It recently had a mechanical problem and took him off-roading. Luckily he wasn't hurt, and he even let me sit in the wrecked car to make this staged photo: Read More »

Post a Comment

How analytics saved the break room coffee machine

coffee_socialtileSAS software is used around the world in some of the most sophisticated ways, like ATM fraud detection and cancer research. But recently, I used it for a practical, and much needed, task -- replacing our break room coffee machine.

Now, this is no ordinary coffee machine. It also makes lattes, cappuccinos, and the luscious iced double mocha frappe (Yes, in addition to M&M’s in our SAS break room, we also have caffeinated treats). It will crank out a simple 12 oz. cup of fresh-ground black coffee in about 90 seconds. Or at least that’s what it’s supposed to do. Over the past few weeks, it had become slow and stingy, taking too long to make too little coffee. Repeated trips by the repair person failed to fix it. The argument being that it was technically making coffee, albeit poorly.

The Data
Some hard data would help clarify the problem, so I brought in a measuring cup and put the stop watch app on my smartphone to work. I collected data for the three machines in my building, one on each floor (I work on the second). I captured the floor, the time of the sample, the time to brew a cup (in seconds) and the volume produced (in ounces). I captured the data on my smartphone as comma separated values, and later transferred the data to my computer hard drive.

Floor, Time, BrewTime, BrewVolume
First, 9:00AM, 98, 12.0
First, 2:30PM, 93, 12.0
First, 3:10PM, 87, 10.5
Second, 7:30AM, 163, 10.0
Second, 9:00AM, 180, 8.0
Second, 11:30AM, 163, 10.0
Third, 7:30AM, 94, 12.0
Third, 11:30AM, 108, 12.5
Third, 1:30PM, 112, 12.5

Read More »

Post a Comment

Life saver tip for comparing PROC SQL join with SAS data step merge

“Phew! That tip alone was a life saver,” said a student in one of my SAS SQL classes. “Before, I would have to read about ten Google search results before I could find that content of the sort you shared in class.”

That student was referring to the tip I shared – the compare and contrast SAS data step with PROC SQL join slides. Since this captured the attention of the entire class as well, I thought it would be helpful to share with you as well, dear reader.

Read More »

Post a Comment

Do Italians really drink less alcohol than Americans?

I saw an interesting graph on dadaviz.com that claimed Italians had gone from drinking twice as much as Americans in 1970, to less than Americans in recent years. The data analyst in me just had to "independently verify" this factoid ...

But before I get into the technical part of this blog, I want to show the results of a little 'contest'. I asked my friends to submit their pictures they thought would best go with this blog. There were a *lot* of great entries! And the winner is Stuart - it appears he single-handedly brings up the per-capita average wherever he drinks!

Read More »

Post a Comment

Locating Mount St. Helens using a SAS map

Mount St. Helens volcano here in the US had a big eruption 35 years ago this week! Do you know exactly where it is located? Perhaps this SAS map can help...

As you might have guessed, I'm a big fan of the awesome power of nature (hurricanes, tornadoes, lightning, earthquakes, and ... volcanoes). I've never been to Mount St. Helens, but I did get to climb a somewhat active volcano named Arenal when I tagged along to Costa Rica with my friend Jennifer. Here's a picture:

Read More »

Post a Comment

Dataset too big for PROC PRINT?

Gigantic Printout Shock

Gigantic Printout Shock

Dataset too big for PROC PRINT? One weird trick solves your problem!

proc print data=bigdata (obs=10);
run;

The OBS= dataset option specifies the last observation to process from an input dataset. In the above example, regardless of dataset size, only the first 10 observations are printed; an easy way to take a quick peek at your data, or preview your PROC PRINT report.

The OBS= dataset option is also useful on the SET statement, to test your datastep on a small number of observations.

data test;
set bigdata (obs=10);
<datastep code>
run;

Watch the SAS Training Post for more SAS tricks!

Post a Comment

A little fun with UFO sightings data

As a kid, I was always intrigued with UFO sightings and I guess I'm still a little that way ... therefore how could I not jump at the opportunity to explore some UFO sightings data!

I guess "UFO" doesn't necessarily imply that something is an alien space ship - just that it's "unidentified". And lately, with all the remote controlled drones, I'm wondering if they might be responsible for some of the UFO sightings? I guess my favorite drone-prank would be the flying reaper. Here's a picture of my friend David's drone (not sure if he's played any pranks yet).

Read More »

Post a Comment

Creating your own customized graphs for SAS analytic procedures

In recent releases of SAS, you can use Output Delivery System graphics or 'ODS graphics on' to produce nice graphical output for most of the analytic procedures. These default graphs are nice, but when you want your graphs to look "a certain way" SAS also lets you create your own custom graphs!

To demonstrate, I looked through some of the SAS samples, and semi-randomly picked Example #1 for Proc MDS. If you run the example code, it uses ods graphics on and produces several default graphs. In this blog, I show you the default graphs, and then the customized versions I created using SAS/Graph...

Read More »

Post a Comment

U.S. federal government is shrinking

I was surprised to find that the size of the U.S. federal government is smaller today, than in the past many decades - let's graph it out, so it's easy to analyze...

The way I got started on this little adventure was via Jishai's graph on dadaviz.com. Here's a snapshot of it:

federal_employment_jishai

Read More »

Post a Comment

10 reasons to learn SAS code even when you have Enterprise Guide

New York City Mayor, Michael Bloomberg made a new-year's resolution to learn code.

Apple’s Steve Jobs said, “I think everybody in this country should learn how to program a computer because it teaches you how to think.”

President Barrack Obama said, "Don't just buy a new video game, make one. Don't just download an app, help design it. Don't just play on your phone, program it."

It’s worthwhile to note that these smart leaders and visionaries believe programming is the way to go. Specifically coding in SAS is one of the few disciplines taught today that virtually guarantees students a job upon completion.  Don’t take our word for it – read my blog on how to land a job as a SAS professional.

A student recently asked me why they should learn SAS code if they have SAS Enterprise Guide software. I reached out to our worldwide SAS instructor group for their top reasons. Collectively we came up with so many reasons to learn to code that it was worth a post.

Here are 10 reasons why you might want to learn to code in SAS. You will find this list useful even if you have SAS Enterprise Guide installed on your machine since Enterprise Guide (EG) has its own program editor window.

Read More »

Post a Comment