Showing posts with label Statistics. Show all posts
Showing posts with label Statistics. Show all posts
Tuesday, June 15, 2010

Three Web-based Data Visualization Tools


I recently posted a couple of blog entries that included data charts. I initially created these charts in Microsoft Excel and then converted them into images for inclusion in the post. This process was labor intensive, and the result could best be described as embarrassing. Excel is a wonderful tool with a nice charting facility, but it was not intended for the creation of charts for the web. So I decided to explore alternatives. I took a close look at three free web-based data visualization tools. To get a good feel for each tool, I reworked two of my previous blog posts in each tool. Here are my thoughts. 

Tableau Public

Tableau Public is a tool for creating complex, web-based data visualizations. The tool can be used to create highly interactive, multi-chart visualizations with dynamic filtering, highlighting and drill-down capabilities. Though I rarely have use for the more powerful features of Tableau Public, I was attracted to its capabilities for customizing the look-and-feel of charts and for adding text and annotations. However, Tableau Public's powerful set of features comes with a cost in usability. Of the products I reviewed, Tableau Public is by far the most difficult to use. Effective use of the product requires a significant investment of time and effort. It is not for the casual user.

I spent several hours learning the basics of Tableau Public and was able to create some very nice visualizations. Unfortunately, for my purposes, the visualizations have unacceptably slow load times. Though I am happy with the charts I was able to create with Tableau Public, I am not willing to subject my readers to such slow page loads. Tableau Public is a great solution for applications that require sophisticated, interactive visualizations where slow load times can be tolerated. It is not appropriate, however, for the light charting I need for my blog.

To get a feel both for the power of Tableau Public and for the time it takes to load its visualizations, click here to read an old post that includes a sophisticated Tableau Public visualization. 

Many Eyes and Swivel

Many Eyes and Swivel are similar in that they trade power for ease of use. I was able to create decent charts on both of these systems in minutes. Unlike Tableau Public, however, they do not offer a lot of control over the finished product. After spending time with Tableau Public, I was reluctant to give up some its features such as the ability to add text and annotations to charts. I finally decided, however, that for my purposes, the superior productivity and performance of Many Eyes and Swivel outweigh this loss of functionality.

Many Eyes offers more chart types than Swivel, but I found the look and feel of the Swivel charts to be more appealing. The Swivel charts are simple and elegant, and they load very quickly.  They work well in a blog post. Consequently, I selected Swivel as my tool of choice. Click here to view a version of my recent federal spending post that was reworked using Swivel.

Wednesday, June 9, 2010

The Growth in Federal Spending Since 1940


The "explosion" of federal government spending is a hot topic in recent political debate, so I decided to take a close look at the Office of Management and Budget data to get a better understanding of the issue. The chart below shows federal fiscal year outlays from 1940 to 2009. Move your cursor over the line to see the exact numbers for any year.



First, note that the dramatic increase in 2009, relative to the increases in previous years, is due to roughly $345 billion in TARP and stimulus bill expenditures. If we remove these one-time expenses, we get something closer to George W. Bush's original $3.1 trillion 2009 budget. While this is a large number by any measure, it is certainly more in line with the spending increases of previous years.

Even if we look at 2009 as an anomaly, the chart still seems to show explosive growth over the last 40 years. What the chart fails to show, however, is that the U.S. economy has grown at roughly the same rate as federal spending. If we plot federal spending as a percentage of GDP, we get the chart below.



With the exception of the anomalous jump in 2009, federal spending has hovered around 20% of GDP since the early 1950s. Though it went as high as 23.5% during the Reagan years, it fell back below 20% during the Clinton administration. While we can have a legitimate debate about how much of GDP we should invest in the federal government, it is clear that the growth in federal spending as a percentage of our economy as a whole has been relatively flat for the last 60 years.

What has not been flat for the last 60 years is our unwillingness to fund this spending through taxes. The following chart, which plots both outlays and receipts since 1940, shows that with the exception of four years during the Clinton administration, we have been unwilling to properly fund our expenditures. Of course, this is the source of the current $13 trillion U.S. debt.



This table below shows which administration was responsible for each fiscal year budget. I will leave it as an exercise to the reader to sort out how well the data conform to the political rhetoric from each side.

PresidentFiscal Year Budgets
Franklin Roosevelt (D)1934 - 1946
Harry Truman (D)1947 - 1953
Dwight Eisenhower (R)1954 - 1961
John Kennedy (D)1962 - 1963
Lyndon Johnson (D)1964 - 1969
Richard Nixon (R)1970 - 1974
Gerald Ford (R)1975 - 1977
Jimmy Carter (D)1978 - 1981
Ronald Reagan (R)1982 - 1989
George H. W. Bush (R)1990 - 1993
Bill Clinton (D)1994 - 2001
George W. Bush (R)2002 - 2009


See Also:
Taxes at Lowest Level in 59 Years

Wednesday, June 2, 2010

The Facts About Global Warming

In the following video, Peter Sinclair provides a nice high-level overview of what we know about global warming:



Click here for additional videos and other information about global warming.

See Also:
Global Warming and Cognitive Dissonance
Denialism
Scientists Create First Synthetic Life Form
Beautiful Hubble Images

Tuesday, June 1, 2010

Global Warming and Cognitive Dissonance


According to a recent Gallup poll, 74% of liberals but only 30% of conservatives believe that "the effects of global warming are already occurring." This is an interesting statistic because we would not normally expect disagreements of fact to divide along ideological lines. Facts are neither liberal nor conservative. The methods of science are independent of ideology, and the same data are available to both liberals and conservatives.

Note that disagreement about the facts is a different thing altogether from disagreement about what to do about the facts. It is not surprising that liberals and conservatives disagree about what would be an appropriate response to global warming. Liberals are more likely to advocate the regulation of industrial greenhouse gas emissions than conservatives since conservatives are generally opposed to government regulation of business.

So what are we to make of the data that shows an apparent relationship between beliefs about the facts of global warming and political affiliation? Perhaps the best explanation appeals to the notion of cognitive dissonance. Cognitive dissonance is a state of tension that occurs when a person holds conflicting beliefs or attitudes. A smoker, for instance, might experience cognitive dissonance that arises from the conflict between his belief that smoking will kill him and his desire to smoke cigarettes. In Mistakes Were Made (but not by me), Carol Tavris and Elliot Aronson describe this case as follows:

Dissonance produces mental discomfort, ranging from minor pangs to deep anguish; people don't rest easy until they find a way to reduce it. In this example, the most direct way for a smoker to reduce dissonance is by quitting. But if she has tried to quit and failed, now she must reduce dissonance by convincing herself that smoking isn't really so harmful, or that smoking is worth the risk because it helps her relax or prevents her from gaining weight (and after all, obesity is a health risk, too), and so on. Most smokers manage to reduce dissonance in many such ingenious, if self-deluding, ways.

Similarly, a conservative might experience cognitive dissonance arising from the conflict between her belief in global warming and her aversion to regulating business. Just as a smoker can relieve her dissonance by denying that smoking is harmful, a conservative can relieve her dissonance by denying that global warming is happening. Thus, the theory of cognitive dissonance would predict that people's beliefs about global warming would divide along ideological lines.

In general, cognitive dissonance is a universal and powerful motivator. All of us are prone to various forms of self-delusion when our beliefs and attitudes come into conflict. We should all take special note when groups disagree about the facts along ideological lines. In such cases, there is a good chance that one side or the other is motivated more by cognitive dissonance than by good science.

See Also:
Denialism
Scientists Create First Synthetic Life Form
Beautiful Hubble Images

Wednesday, May 12, 2010

Taxes at Lowest Level in 59 Years


Data from the U.S. Department of Commerce's Bureau of Economic Analysis show that in 2009, Americans paid, on average, 9.17% of their personal income in Federal, state and local taxes. This is the lowest share of income paid in taxes since 1950. The 2009 percentage is 21.7% lower than the 2008 percentage, and it is 21.9% lower than the average of 11.75% for all years since 1950. The chart below shows the percentage of income paid in taxes for every year since 1950. Move your cursor over the line to see the exact number for any year.



This analysis is based on data from the National Income and Product Accounts Table 2.1, Personal Income and Its Disposition.

See Also:
The Growth in Federal Spending Since 1940
Denialism

Wednesday, March 24, 2010

"Facebook Linked to Rise in Syphilis"


The following headline appeared on Telegraph.co.uk today:

Facebook 'linked to rise in syphilis'
Facebook has been linked to a resurgence in the sexually-transmitted disease syphilis, according to health experts.

Similar stories were carried by other British media outlets.

The Telegraph reports that:

The virus has increased fourfold in Sunderland, Durham and Teesside, the areas of Britain where Facebook is most popular, because it has given people a new way to meet multiple partners for casual sexual encounters.
Professor Peter Kelly, director of public health in Teesside, said staff had found a link between social networking sites and the rise in cases, especially among young women. 

This conclusion appears to be based on the fact that the reported cases of syphilis in Teesdale last year rose fourfold to 30. And what is the connection with Facebook? The Telegraph reports that:

Research has shown that young people in Sunderland, Durham and Teesside were 25 per cent more likely to log onto social networking sites than those in the rest of Britain. 

So an increase to 30 total reported cases of syphilis in an area of Britain that is know to use social networking sites more heavily than the rest of Britain constitutes evidence that "Facebook is linked to a rise in syphilis."

It sounds like there's an opportunity here for the UK Statistics Authority!

It's easy to make fun of this, but the sad fact is that many people will read it and believe it.

Tuesday, March 23, 2010

The UK Statistics Authority


Richard Aldritt
It comes as no surprise that government officials often misuse statistics to advance their own political and personal agendas. In an attempt to reverse the British public's growing skepticism of public statistics, in 2008, the British Parliament established an independent agency, the UK Statistics Authority, for evaluating government practices in the collection and reporting of official statistics. The Authority's web site states:

The Authority's statutory objective is to promote and safeguard the production and publication of official statistics that serve the public good. It is also required to promote and safeguard the quality and comprehensiveness of official statistics, and ensure good practice in relation to official statistics.

Richard Aldritt was named the Authority's Head of Assessment. Aldritt, a professional statistican, and his team evaluate the data and review the claims made by officials in over 200 agencies.

Last month, for instance, Conservative MP Chris Grayling claimed that police statistics showed an increase in violent crime during the Labour party's time in government. The Conservatives, moreover, sent the numbers to activists throughout England and Wales in an attempt to show a decline in law and order under the Labour party. The UK Statistics Authority issued an assessment of Grayling's claim that concluded that the apparent increase in crime was due to a change in reporting methodology. Moreover, they noted that the British Crime Survey, normally considered a more reliable source, showed a decrease in violent crime during the same period.

Predictably, Chris Grayling responded as follows:

The reality is these figures actually reflect real crimes, reported to real police stations, by real people. And the reality is however you caveat these figures, whatever qualifications you make about changes to the recording methods, they show a big increase in violent crime over the past decade and we are going to carry on saying that.

Click here to read a BBC article about the flap.

It should be noted that not all assessments by the Authority have been dismissed so cavalierly. The BBC article states that:

In 2008, [the Authority] criticised Labour ministers for releasing what it said was "premature and selective" data about hospital admissions for knife wounds in certain parts of the country. The then Home Secretary Jacqui Smith apologised for the early release.

A truly independent gadfly agency that checks public statistics is probably a good idea, but I doubt that it is going to solve the problem. The flood of statistics, many of which are flawed or misleading, coming out of government and the media is making education in statistics increasingly important. As H.G. Wells said:

Statistical thinking will one day be as necessary for efficient citizenship as the ability to read or write.

Thursday, March 18, 2010

Gapminder: Unveiling the Beauty of Statistics for a Fact Based World View


Gapminder has just launched a new website.  If you've seen the Hans Rosling TED presentation that I posted a while ago, you have some idea what Gapminder is about.   Gapminder is a non-profit venture founded by Ola Rosling, Anna Rosling Rönnlund and Hans Rosling in 2005.  Their motto is "unveiling the beauty of statistics for a fact based world view."  In particular, Gapminder aggregates world economic, health and political statistics, and provides a wonderful facility, Gapminder World, for charting those statistics and analyzing trends.  The new website is nice.  Check it out.