Graphical analysis of all the important Pokémon data!

Are you caught up in the recent Pokémon Go craze? Or maybe just trying to figure out what all the fuss is about? In this blog post, I try to analyze all the important Pokémon-related data in one graph!

When the original Pokémon game first came out around 1995, you needed a pair of Nintendo Game Boys to play it. The most recent release is played on a smartphone (which just about everybody has), and utilizes features of the phone such as GPS location, being connected to the Internet, the phone's camera, and the ability to combine pictures of the Pokémon creatures with real world images (augmented reality).

My friend Kara has a piece of her artwork on public display, and it has become a Pokéstop for a Paras Pokémon. Here's the augmented reality picture:

pokemon_paras

pokemon_art

And now, on to the analytics... Read More »

Post a Comment

What to include in your website

What information should you make easily available from the top page of your website? This Venn diagram might help you decide!

Have you ever gone to a website to try to find some information, and had a (expletive) difficult time trying to find that info? I think there is often a disconnect between people designing websites and the people using them - designers seem to be mainly concerned with having a certain look and using the latest technology to display a slideshow, whereas users just want to be able to find the information quickly and easily.

I found the following graphic that demonstrates this pretty well. It was designed by Randall Munroe, and his site describes itself as "A webcomic of romance, sarcasm, math, and language." I assume that being a webcomic is the reason he uses all upper case letters, but with this amount of text, I think that makes it a bit difficult to read. Also, those not familiar with Venn diagrams might not get what it's saying.

college_website_venn_original

So I decided to create my own version using SAS, and make it a bit more professional, easier to read, and more intuitive. I used annotate to draw the circles, and filled them with transparent blue and yellow, so that the combined area in the middle is green (I think just about everyone will understand that green is the combination of blue and yellow, which will make the Venn diagram concept more obvious). And I used mixed case text, so it is easier to read. Since there is no built-in SAS procedure to create this plot, I hard-coded the x/y positions for each piece of text, and then annotated the text on top of the colored circles. Read More »

Post a Comment

Apparently the cool kids don't smoke any more

I've noticed fewer and fewer people smoking these days, and was wondering who the last holdouts are. Let's run some numbers and find out...

Back in the 1950s, 60s, and 70s it seems like almost everyone smoked. You hardly ever saw the "cool kids" such as James Dean without a cigarette - and entertainers, celebrities, and hosts frequently even smoked on TV (which is now taboo). My buddy Reggie sells antiques, and here are a couple of vintage cigarette lighters he has in his inventory, from the golden age of smoking. Nice lighters were probably common back in the day, but are rare and sought-after collectibles now:

lighter_1950s_zippolighter_1960s_butane

I hardly see anyone smoking these days. The SAS headquarters here in Cary is a smoke-free campus. And North Carolina, which is one of the major tobacco-growing states, recently passed a law which bans smoking in restaurants. So, statistically speaking, who are the few remaining smokers?...

I found an article on flowingdata.com with this exact kind of information. It shows the smoking prevalence, broken down by several different demographic categories. Here's their graph of smoking by income range. It's a fairly clean and straightforward graph, but I think it would be a little more intuitive to reverse the order of the income axis (put the higher income at the top, and lower income at the bottom). Another drawback is that you have to see the rest of the page to know what year the data is from, and what the colors stand for.

smoking_by_income

I downloaded the data from the CDC, and created my own graph, to see if I could do a better job. I sorted the income axis so the higher values are at the top, and I added labels above each bar color (whereas the original graphs only showed the color legend info on their first graph). I also included the data source and year in a footnote, and changed the title text a bit to make the graph more stand-alone. Read More »

Post a Comment

SAS Author Spotlight: Derek Morgan

SAS Author Derek Morgan is a programming rock star… in more ways than one.

Not only has he been a professional SAS programmer in the pharmaceutical industry for almost 30 years and written two editions of The Essential Guide to SAS® Dates and Times, Derek also plays electric bass in blues bands around the St. Louis area, and has played bass on stage for three members of the Rock and Roll Hall of Fame.

Check out Derek sitting in with Aaron Griffin & Mojo Rising at the Blues City Deli. St. Louis, Missouri. Derek’s hometown is a mecca for blues musicians. To learn more about the blues community, Derek recommends visiting stlouisbluessociety.org and stlblues.net. Read More »

Post a Comment

Does this graph make you feel old ... or young?

They say age is a relative thing. With this graph, you can tell how old (or young) you are, relative to everyone else. (I'll let you decide whether this is a good thing, or a bad thing, hahaha!)

Nathan Yau recently posted a graph on flowingdata.com that allows you to see what percentage of the people are older and younger than you (see snapshot below). You first find your age along the bottom/x-axis, and then hover your mouse over the graph approximately above that age. In his interactive version, he shows you the percent of people older & younger than that age, in hover-text.

age_nathan_yau

It was an interesting graph, but I thought a few things could be improved. There was nothing in the graph letting you know whether it represented the world population, the US population, or other (you had to read the text of the article to find it is the US population). Similarly, the graph didn't mention what year the data represented (if someone looks at the graph 20 or 50 years from now, that could be a problem). And he used a 'pink' color in the graph, which I at first (incorrectly) thought might represent the female 1/2 of the population. It was also difficult to know if you were hovering your mouse over your exact age, since the graph was a continuous area and hover-text didn't include the age.

I found another version of the graph that Ramon Martinez created. His version did show which country or region was graphed (yay!) It also include the age in the hover-text (yay again!). But he used pink & blue for the colors (which really made me think it represented female & male when I first glanced at it). And his y-axis showed negative values in the bottom half, which could cause confusion. Read More »

Post a Comment

Let’s celebrate 40 years of SAS users

Let’s go back to 1976 for a moment. Did you know that was the year Muhammad Ali introduced a line of beauty products called “Knock Out?” And the hottest merchandise, including t-shirts, posters and even beanbags sported the character Arthur Fonzarelli (The Fonz) of TV’s “Happy Days.”

But there was something that debuted in 1976 that wasn’t a fad – SAS.

On July 1, 1976 SAS opened its doors for business in Raleigh, North Carolina. Take a look at the first office.

FirstSASlocation

We’re so excited to be celebrating our 40th anniversary here at SAS. But it’s not really about us; the biggest part of the celebration is you.

Our customers and your innovative work are a big part of our history – and the most exciting thing about our future. That’s why we’re celebrating you!

Celebrating you in July

Every Friday in July, we’ll feature a special offer for our SAS users. The discounts will include specials on training, certification, books and SAS events. Read More »

Post a Comment

Could I get a Brexit map over here, please!?!

With the recent vote for the United Kingdom to leave the European Union being all over the news, I was a bit embarrassed to realize I didn't know exactly what areas are (and aren't) considered part of the UK.

After a few Google searches, I found the following map  on the brilliantmaps.com site, which I thought explained things in a nice simple way. But as I did more research, I found that Isle of Man (the island just off the northwest corner of England) was not really part of the UK or Great Britain. Therefore, although this map is simple and elegant, it is also wrong.

brilliant_maps

After a bit more searching, I found a set of maps on the ordnancesurvey site which did a much better job of showing the correct geography. They used a separate map for each grouping (see screen capture below for two of their three maps).

ordnancesurvey_map

But there are still a few things I didn't like, or would have done a little differently:

  • They didn't label the areas that were not part of the grouping being highlighted.
  • They didn't show borders in the areas not being highlighted (for example, between the two areas of Ireland).
  • They used a blue background, which people will think is water - but not all the area shown in the map is water (for example, along the southern edge would be land).
  • The small white islands (at the bottom of the map) didn't show up well against the light blue background.

Read More »

Post a Comment

Are there Zika mosquitoes in your county?

Let's create a souped-up SAS map that can track Zika-carrying mosquitoes down to the county level, in the US!

A few months ago, I wrote a blog post with a world map of documented locations of the Aedes mosquitoes that could carry the Zika virus. The world map showed a high concentration of Aedes mosquitoes in Brazil, where there is a huge Zika outbreak (and where some Olympic athletes are now refusing to go), but the map also showed a somewhat large number of these mosquitoes in the US. And although the US hasn't had an outbreak of Zika yet, it would be interesting to know specifically which counties might be affected should that happen.

And this brings us to the Centers for Disease Control (CDC) US county map. My blog editor gave me a heads-up about an article on today.com that showed this county map. She mentioned that my SAS maps had spoiled her, because she wanted to be able to hover her mouse over the areas in this map, to see the county names (for example, the 4 yellow counties in NC).

cdc_today_map

So I set about finding the data, and creating my own SAS map ... with hover-text ... and maybe a few other enhancements, such as a title and a color legend. Yeah, that's it - that's the ticket! Read More »

Post a Comment

Will independent voters decide the election?

In recent years, more and more people have been registering as independent voters in the US, rather than Democrat or Republican - the independents now control well over 1/3 of the votes. Will they likely vote for the Democrat or Republican candidates in the upcoming election? Let's break down some numbers to try and figure that out...

I was looking around for data and pre-existing graphs on this topic, and found a pretty good article on the Washington Post website. It contained the following graphs, which I thought were fairly insightful:

wsj_pie

But the more I studied these pies, the more I noticed that they were more of an "attention grabber," rather than something for serious analytics. Here are a few details that could be improved:

  • There are no % signs on the numbers, so you have to guess that they are percents.
  • The Dems & GOP slices aren't labeled in the 2nd pie.
  • 'Exploding' the slices makes it more difficult to compare the angles.
  • With no reference lines, it is difficult to tell how much more/less than 25% each slice is.

So I re-made the graphs in SAS, and tried to fix all the above problems:

political_party_pie

political_party_pie1

 

 

The pie charts show the current (2016) data, but I also wondered how the numbers have changed over time. Luckily, the article also had a graph for that! Read More »

Post a Comment

July 4th Fireworks Safety

Here in the US, our July 4th Independence Day holiday is coming up. It's a festive holiday with lots of fun & fireworks, but you also need to also be careful ... and I've got the graphs to prove it!

Last year, I wrote a blog post about a SAS map that could help you find fun fireworks shows. This year, I've decided to focus more on the safety side of things, and created some graphs about fireworks accidents. Hopefully if you're aware of the accidents that can happen, you'll be less likely to have such an accident.

But before we get started, here are some fireworks photos from my friends, to help get you into the holiday spirit...

Here's a nice shot my friend David took:

fireworks_david_fair

I'm just going to say that some anonymous person sent me this next photo ;-)

fireworks_david_m90

My friend Margie has an impressive collection of earrings for every occasion - she's a real "firecracker" and here are some of her earrings for July 4th!

fireworks_margie_earring

And for the grand finale, here's a really nice photo of some fancy fireworks from my other friend David ...

fireworks_davidh_fair

 

Now, let's do some data analysis!

When it comes to accidents and injuries, one of the better sources of data out there is the Consumer Product Safety Commission. A few months ago, I used their sampling of emergency room data to show some statistics about lawn mower accidents. I recycled the same SAS code, and used it to plot accidents associated with fireworks. Read More »

Post a Comment