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

The big fat truth about the US weight problem

I recently read an article that claims 35% of men, and 40% of women in the US are now obese. Yikes! I wondered when this happened, and whether it had been a gradual or sudden change. If I only had some graphs ... which the article didn't provide.

I did some searching, and found a paper on Overweight and Obesity Statistics that seemed to have what I was looking for. Specifically, it had the following graph on p. 4:

us_obesity_original

But after studying the graph a bit, I was surprised to notice that the time axis was not proportionally spaced - say what!?! The evenly spaced tick marks represented year spans of 12, 6, 14, 6, 2, 2, 4, and 2 years. This stretches some sections of the graph, and compresses other sections - the end result is that you really can't trust what you see.

So I dug up the data from the two sources (Ogden, Flegal), entered it into a SAS dataset, and created my own version of their plot. In this first iteration, I created my plot like theirs - even with the same deceptive time axis scale. I did this to make sure I had the same data, and found one oddity ... it appears that where the papers listed a range of years for the data, they had only graphed one of the two end-points (I'm graphing the data the same way they did, for now, but will use all the data points in my new/improved version).

us_obesity_redo

In my first iteration of improvements, I change the time axis to be proportionally spaced, and I used data points for both ends of the range of years reported in the data tables. Note that changing the axis scale makes it much more obvious that the increase in obesity is a fairly recent change. Read More »

Post a Comment

Analytics Experience – Maximize your conference trip

When I travel for work, I want to get the most out of my trip. So while I was in Las Vegas in April for SAS Global Forum, I used my free time to check out what’s in store for the Analytics Experience at the Bellagio, Sept. 12-14. Take a look…

What about you? Are you planning to attend Analytics Experience and want some tips on how to maximize your trip? I would suggest using that time to improve your SAS skills and save money too. Read More »

Post a Comment

These aren't the drones you're looking for - but those are!

With recent advances in quadcopters, or drones, they have become pretty capable and fun flying machines. And just about anybody can afford the entry-level models. They've recently become prevalent enough that the government has started coming up with rules, and the Federal Aviation Administration (FAA) started requiring owners to register drones that are over .55 pounds. The FAA recently released their drone registration database (down to the zipcode level), so of course I thought it might be interesting to plot the data on a map!

Before we get started, I wanted to share photos of a couple of my friends' drones. This first one is a small $50 model that my friend David has been experimenting with. It is under .55 pounds, and therefore doesn't have to be registered (ie, "These are not the drones you (the FAA) are looking for.").

dave_drone

This second one belongs to my other friend David, and is a much bigger and more expensive model (sells for over $1,000) ... and this is one of the drones that would need to be registered in the FAA database. Read More »

Post a Comment

My one PROC REPORT wish

The one thing, above all others, that I wish PROC REPORT could do is know which observations from my data set that I want kept together on a single page of non-Listing output.  This is problematic for two reasons.  1. PROC REPORT cannot read my mind!  2. PROC REPORT does not actually control the placement of the table on a page, the output destination does.

Unfortunately for me (and perhaps fortunate for PROC REPORT?) PROC REPORT will never learn to read my mind.  Instead, I have to learn to tell it exactly what I want it to do.  Here is where that second part comes in––I have to tell PROC REPORT what to do so that it takes some of the control back over ODS destinations.

I have to tell PROC REPORT what to do if I want any of the following outcomes:

  • Make each value of a grouping variable start on its own page
  • Have the value of a grouping variable repeat at the top of each page
  • Force text to appear at the bottom of each page
  • Display the bottom table border on each RTF page, when using certain style templates
  • Print all of the columns for one set of observations for a really wide table, then print the next set of observations

Read More »

Post a Comment

I see spots - sunspots!

For the first time in 4.5 years, we had a day with zero sunspots - I think this special occasion calls for some sunspot graphs!

But before we get started, here's one of the many pictures my friend Kirk took of the sun down in Marco Island, Florida. Spots or no spots, the sun always seems to look better when viewed from Kirk's boat! :)

marco_sunset

A sunspot is a temporary cold spot on the sun - well, not exactly cold, but cooler than the surrounding areas. These areas look visibly darker, and appear as a dark spot. And for some reason we've had a fascination with these spots, and counted them ... for hundreds of years. The number of sunspots tends to go in cycles of about 11 years. But even these cycles fluctuate, with certain time periods having higher maximums and/or lower minimums than others. Some of the more extreme fluctuations in the cycles are referred to as the Maunder Minimum, the Dalton Minimum, and the Modern Maximum.

Almost any time you start researching about sunspots (such as the Wikipedia links above), you're likely to see this famous graph of the sunspot cycles: Read More »

Post a Comment

How to get started learning SAS

SASBooks_2016You’ve probably seen the headlines by now that reveal SAS analytics skills are the most valuable skills in today’s job market. So what’s next? There is no better time to learn SAS programming – there are a slew of options and resources to get you started.

First, explore the many options you have to learn SAS for free. SAS University Edition is available to download for anyone who wants to learn SAS or you can sign up for SAS OnDemand for Academics which runs in the cloud and all you need is a browser and an Internet connection.

Additionally, SAS offers many free online training courses and webinars, and hosts communities where beginners and experts alike can ask questions and share knowledge.

We also have our own publishing program, SAS Press, with books written by users for users, covering the basics and how to get started, through to more specialized topics, such as text analytics and DS2 programming.

Finally, explore the SAS certifications, which will enhance any resume.

Already an experienced SAS user? Consider sharing your expertise by writing a book, we’d love to hear from you – just send us a brief outline – that’s all it takes to get started!

Post a Comment