How to eat 724,548 donuts and burn 138 million calories!

Eating donuts, burning calories, and raising money for a good cause -- that's what the annual Krispy Kreme Challenge is all about. If this intrigues you, read on to find out more...

But first, here's a picture of me eating a donut, preparing for a race. I bet you didn't know I was such a hardcore athlete (I'm kinda like John Belushi in that regard!)

rob_donut

In 2004, a handful of students from NC State University (my alma mater) got together and ran the first Krispy Kreme Challenge. It was more of a 'dare' than a race event. Run from the bell tower to the donut shop (about 2.5 miles away), eat a dozen donuts, and run back. This race equation is quirky enough that it has grown in popularity, with over 60,000 runners having participated over the years, raising almost a million dollars for North Carolina Children's Hospital.

With the race coming up this Saturday, I decided to use this topic for some graphical analytics. I found a sharp-looking infographic on the NC State website, summarizing data about all of the races. That was pretty cool, but I decided to dive into more detailed data for one specific race. I found a page containing the race results, but unfortunately they don't provide a way to download all the data for a race. I noticed that the older race results are in pdf documents ... and I was able to copy-n-paste the data from the 2012 pdf into a text file, and then import it into SAS (with not too much 'extra work').

I then created a few graphs that I think summarize the data well. For example, here's a bar chart showing the age distribution of the race participants. Notice there is a slight 'spike' for the age=21 -- I wonder if that might be people just indicating that they are "21 or older", or perhaps some students have fake ID that says they are 21(?)

krispy_kreme_challenge_2012_bar

Read More »

Post a Comment

Where might Zika virus strike next?

The World Health Organization recently declared the Zika virus a global public health emergency. This virus is spread by certain mosquitoes, and therefore if we know where those mosquitoes are located, then we've got a pretty good idea of where the virus might spread.

Before we get to the numbers, here are a few pictures of mosquitoes that tormented me in my house, until they met their ultimate demise!

mosquito1mosquito3mosquito2mosquito4

First, I did a little light reading about the Zika virus on Wikipedia, and the BBC website, and learned that the virus is spread by Aedes mosquitoes. I then found an article where the researchers had compiled a database of known locations of two types of Aedes mosquitoes and plotted them on a map. I decided to write some SAS code to plot their data on a map - first to see if I could create a better map, and second to provide a good starting point for researchers doing additional analyses of the Zika virus.

I downloaded their csv file, and found that it acted a bit odd in the tools I was trying to use on it (such as the vi editor in Linux, and Windows SAS Proc Import). I like to say there are always 10 ways of doing a given task in SAS, and I find that Excel is often a good 'gateway' for getting small data into a form that is easily imported. Therefore I opened the csv in Excel and saved it as an xls spreadsheet, which then imported cleanly into SAS. Read More »

Post a Comment

What’s the most important new feature in SAS/STAT software?

SAS_STATWhat do you think is the most important new feature in SAS/STAT? Well it depends! In this video, SAS developers talk about their new work and which customers will be excited about it and why. Healthcare professionals may lean toward the new rare events control charts in QC, which allows easier tracking of safety in hospitals; while data scientists might vote for the HPSPLIT procedure that now provides classification and regression trees via a standard modeling syntax. What about you? Perhaps you have already utilized some of these new features in your work and have a story to tell.

We will be at this year’s American Statistical Association Conference on Statistical Practice (CSP) in San Diego, so please do come and talk to us at the SAS table!

We will also have a selection of some of our great books on display and a 20% discount for conference attendees on all the titles in our catalogue. While we would be happy to discuss what we do have available, maybe there is a topic you would like to see covered that we don’t have. Perhaps you have a topic you would like to write about. Read More »

Post a Comment

The data behind jail breaks

You've probably seen headlines about the recent jail break in California. Do you think they'll catch those guys? Is there any data available about recapturing escapees? You betcha! ... And do they need some help graphing that data? It appears so!

But before we get started on the graphs, here's a picture of me in prison clothes (along with my buddy Reggie from Pennsylvania), attending one of the many epic Halloween parties at Margie's place. I think if I was a prisoner, I would plan to break out on Halloween! ;)

prisoner_and_hershey

 

Now, on to the graphs... Below is a bar chart from an article in our local news. At first glance, it's a fairly nice graph. But upon closer examination, I wondered why the y-axis goes from 0 to 1? After reading the word 'Percentage' in the title, I then was able to figure that the y-axis was probably the raw values for percentage (for example, .8 instead of 80%). This is a problem I frequently see with products that make it too easy for amateurs to graph data - they can create a graph, but they don't know to do things like adding formats to the numbers.

escapee_original

So I decided to create my own version of their graph, and teach my blog readers how to create a better version of the chart using SAS!

Read More »

Post a Comment

Which lives longer - a honey bee or black ant?

A honey bee can live for 8 years ... but a black garden ant can live even 20 years longer than that! Learn more details, and other interesting trivia, in this blog on "the longevity of things."

I recently found The Animal Ageing and Longevity Database, and was fascinated by the information. For example, I found that worker honey bees live .2 to .4 years, whereas the queen bee can live 8 years. And when it comes to black garden ants, the queens can live a whopping 28 years (long live the queen!) Here's a picture that my friend and artist/nature-girl Sara made (is this a honey bee, or something else?), and a picture of some black ants in my kitchen (I don't think these particular ants will live very much longer at all, based on what they're drinking!)

sara_bee

ants

The database was chock full of interesting information, but they didn't have any graphs ... a small oversight which I thought I would try to fix! So I downloaded a copy of their data, and wrote a program to import it into SAS. From there, it was a simple matter to create a plot for each 'class'. Below is a screen-capture of the graph for the Mammalia class (click the image to see the interactive version). One neat thing about the bar charts is that I set them up so you can click on the bars to see the official page with the database information about that animal, and you can click on the animal names (to the left of the bars) to launch a Google image search to see what that animal looks like. I think it's really powerful to provide dual drill-downs like this! Read More »

Post a Comment

How did you measure up in Snowpocalypse 2016?

The East Coast of the US got quite a snowstorm this past weekend, but did your area get enough snow to brag about? Let's see what the data says...

Before we get started, here are a couple pictures of the snow. The first one is from my driveway - we didn't get deep snow, but a couple inches of sleet and ice meant we had to chisel it off our driveways. The second picture is from my friend Janeane, who lives in up in the mountains of Virginia - she claims there's a car somewhere under that mountain of snow!

snow & ice in Cary, NC

deep snow in Virginia

Now, let's have a look at the data!... I found some raw data on the NOAA website, downloaded the text file, and wrote some code to import it into SAS. In their data, they used a -9999 value to represent 'missing' data, so I converted those to actual SAS missing values. Now I have a nice clean dataset, complete with latitude & longitude coordinates, ready to analyze.

I summed the snowfall values for January 21-24, and then plotted the data on a map, using the summed totals to control the sizes of the bubbles. The map is pretty simple, but I think it does a good job of showing which areas were hardest-hit by this winter storm. (You can click the image below to see the interactive version, with html hover-text over each bubble.)

snowpocalypse_2016

Below the map, I show a table of the 100 areas with the most snow. Here's a screen capture of the top 10 (click the screen capture to see the map and full list). Read More »

Post a Comment

A snow day at SAS headquarters

The East Coast is having lots of snow and ice storms today, and SAS headquarters is officially closed. But I thought it would be a great day to get a few things done! And among those few things is "write a snow-related blog". Hope you enjoy it!

After 21 years of faithful service, I had finally decided to sell my 1995 4wd Jeep Cherokee, and get something a little newer & bigger. I thought since snow is in the forecast, this week would be the best time to sell it ... and indeed, it sold yesterday for top-dollar (to the first person who came and looked at it!) Here's a picture:

cherokee

When I woke up this morning, there was snow outside my window. Here's a picture of a furry critter in my backyard, possibly experiencing snow for the first time:

squirrel

I checked the weather radar, to see whether the storm had finished, or if there was more to come. Interestingly (and as I've seen several times before), the "heat bubble" over Cary (or at least that's my theory) has actually affected the weather - we're getting freezing rain, whereas surrounding areas are getting snow.

heat_bubble

Read More »

Post a Comment

A fun analysis of regional cultures in the US

Are you from Yankeedom, The Far West, or somewhere in between?  In this blog, I use SAS maps to explore some fun data about regional cultures in the U.S.

I recently ran across an interesting article about Colin Woodward's book "American Nations: A History of the Eleven Rival Regional Cultures in North America." The article contained a map showing what culture was dominant in each geographical area, and then contained a paragraph describing each culture in the body of the article. But the map was very small, and it was difficult to read the labels. And I had to skim the whole article to find a specific culture's description.

Therefore I created my own map, to try to overcome these two problems, and make it easy (and fun) to explore this interesting data!

Here's a snapshot of my map (you can click it to see the full-size interactive version). Note that my version is a bit larger, and I've simplified it a bit by leaving out the county outlines - in my opinion it's just too cluttered trying to show three levels of borders in a map. When viewing the interactive map, you can hover over each county to see the county names, if you're interested in that information. It is very challenging to place labels on a map with irregularly shaped regions, therefore I used a color legend instead (and you can also see the culture names in the hover-text).

US Regional Cultures Map

Map of Regional Cultures in the United States

Read More »

Post a Comment

New Year’s resolution: schedule SAS tasks and your success with SAS

Clock_timeDo any of your New Year’s resolutions include the goal to become a more productive SAS user?

Whether you’re building models or reports using SAS or you’re using SAS to effectively manage your data, you likely have a goal to be as productive as possible with your SAS usage in 2016.

Related, sometimes to move forward, you need to look back.

You may have missed it, but, back in 2013, one of my SAS colleagues, Wendy McHenry, drafted a
SAS Users blog entirely devoted to the topic of leveraging SAS functionality for scheduling to save time and increase productivity.

Since then, many users have read Wendy's “Four ways to schedule SAS tasks” post on scheduling with SAS, which addresses: Read More »

Post a Comment

Which stores will Walmart close in 2016?

You probably heard the recent announcement this past Friday that Walmart will be closing 269 stores. Are any closing near where you live? This blog shows some really cool SAS maps to let you drill-down into the data!

I've seen a few maps showing which Walmart stores are closing, but they just didn't present the data in a way I could get my brain around. Therefore I downloaded the list, imported it into SAS, and created my own maps.

First, I plotted the data on a US map (limiting it to just the 48 contiguous states), and highlighted the states with a closing by making it a brighter color. I then set up the colored states so you could click on them and see a map of just that state. Note that the maps in this blog are snapshot images - but you can click them to see the real/interactive maps.

walmart_closings_2016

For example, if you clicked Louisiana, you would see the map below. There's a summary count in the title showing that 8 stores are closing in Louisiana, and the map shows a marker at each closing location. You can click a marker to bring up a Google map zoomed-in on that Walmart location.

walmart_closings_2016_la

Along with each state map is a summary table, showing the type of store and the street address. You can click the links in the table to go to the Google map, just like the drill-downs for the markers on the map.

walmart_table

 

I invite you to click any of the images above, to try out my interactive maps, and let me know what you think in the comments section. Or perhaps you would like to download my code, and try creating your own map!

 

Post a Comment