January 6, 2009 — David Howell, Corporate Analysis

Recent versions of Mathematica introduced an innovative way to interact with data. Computable data functions, such as CountryData and WeatherData, provide programmatic access to curated data in a form ready for computation.

The idea of computable data has been so useful in Mathematica at large that we’ve been using it internally as well. We’ve packaged some of our internal data as in-house computable data functions, so that all of our colleagues can bring a quantitative edge to their work.

I work on one such function: WebsiteData. We host several popular websites at Wolfram Research, so we collect a large volume of web server log data. WebsiteData provides access to our corpus of logs, which we can use to study how visitors interact with our websites.

Here’s an example of WebsiteData in action. Let’s find the most popular demonstration from the Wolfram Demonstrations Project this past month:

WebsiteData["demonstrations.wolfram.com/*/", "Popularity"][[1, 1]]

Whenever a visitor surfs to one of our web pages, our webservers (like all webservers) record the page requested, the time of the request, the URL of the page that had linked to our webpage (we call that the referrer), and the value of the visiter’s browser cookie and other incidentals. We’ve built up a rich interface in WebsiteData to provide statistics about these fundamental events aggregated in a variety of ways.

Read More »


January 1, 2009 — Arnoud Buzing, Director of Quality and Release Management

A couple of days ago I read about an unusual “swarm” of earthquakes at Yellowstone National Park. After reading up on this topic a bit (and determining that my home state of Illinois would not be obliterated immediately by a supervolcano outburst), I decided to make an animation about it in Mathematica. First I searched for “yellowstone map sdts” on Google and downloaded this geological map of Yellowstone from the U.S. Geological Survey website. After uncompressing the zip file, I simply pointed Import to the top directory containing the SDTS files:

In[1]:= yellowstone=Import["sdts","Graphics"]

The resulting graphic contains a lot of distracting detail, so I decided to extract just the polygons and give them a muted gray background color. What remains are the outline polygons for each geological layer as observed by the USGS. Also, I set the image size to 1280×720, which makes it suitable for a 720p high-definition video stream:

Read More »


November 13, 2008 — Chris Boucher, Consultant, Special Projects Group

Calculus II is one of my favorite classes to teach, and the course I’ve probably taught more than any other. One reason for its special place in my heart is that it begins on the first day of class with a straightforward, easily stated, yet mathematically rich question: what is the area of a curved region? Triangles and rectangles—figures with straight sides—have simple area formulas whose derivation is clear. More complicated polygons can be carved up into pieces that are triangles and rectangles. But how does one go about finding the area of a blob?

After simplifying the blob to be a rectangle whose top side has been replaced with a curve, the stage is set for one of the classic constructions in calculus. The area of our simplified blob, reinterpreted as the area under the graph of a function is approximated using a series of rectangles. The approximation is obtained by partitioning the x-axis, thus slicing the region into narrow strips, then approximating each strip with a rectangle and summing all the resulting approximations to produce a Riemann sum. Taking a limit of this process by using more and narrower rectangles produces the Riemann integral that forms the centerpiece of Calculus II. Several Demonstrations from the Wolfram Demonstrations Project, including “Riemann Sums” by Ed Pegg Jr, “Common Methods of Estimating the Area under a Curve” by Scott Liao, and “Riemann Sums: A Simple Illustration” by Phil Ramsden show that this construction and images like the one below from “Riemann Sums” are part of the iconography of calculus.

Read More »


October 16, 2008 — Theodore Gray, Co-founder, Wolfram Research, Inc; Founder, Touch Press; Proprietor, periodictable.com

The New York Times recently published an “Op-Chart” by Tommy McCall on its Opinion page showing what your returns would have been had you started with $10,000 in 1929 and invested it in the stock market, but only during the administrations of either Democratic or Republican presidents. His calculations showed that if you had invested only during Republican administrations you would now have $11,733 while if you had invested only during Democratic administrations you would now have $300,671. Twenty-five times as much!

That’s a pretty dramatic difference, but does it stand up to a closer look? Is it even mathematically plausible that you could have essentially no return on your investment at all over nearly 80 years, just by choosing to invest only during Republican administrations?

To answer these questions, I of course turned to Mathematica.  

And the answer is that yes, it is mathematically plausible, using the assumptions made by McCall. My analysis using historical Dow Jones Industrial Average data available in Mathematica‘s FinancialData function roughly matches the figures in the Times, which used Standard & Poor’s data. (I used the Dow because it’s more convenient, not because I think it’s a better measure.)

But the fact that they are correct doesn’t mean the figures are even remotely meaningful. Here are some problems with the New York Times‘ Op-Chart:

Read More »


September 24, 2008 — Jeff Hamrick, Special Projects Group

The 2008 United States presidential election is arguably the most interesting U.S. presidential election in my lifetime.

Already, millions of Americans have registered to vote for the first time in their lives.

Regardless of the outcome, America is going to elect either its first black president or its first female vice president.

America will elect a sitting U.S. senator to the highest office in the land—which, until now, has only occurred twice in U.S. history (Warren Harding and John F. Kennedy were U.S. senators).

Both presidential candidates were born outside of the continental United States.

If elected, John McCain will be the oldest sitting U.S. president upon ascension to the presidency.

Never before in U.S. history has there been such a large disparity in age between the two presidential candidates, either.

It’s also the first election you can analyze using Mathematica 6.

Read More »


June 14, 2008 — Ed Pegg Jr, Editor, Wolfram Demonstrations Project

On June 14, 1777, the Continental Congress resolved that the flag of the United States would have 13 alternating red and white stripes, with the states represented as white stars on a blue field. The CountryData data paclet has information about this and many other flags, as can be seen in the “Country Flags and Descriptions” Demonstration.

Country Flags and Descriptions Demonstration

If you’d like to test your knowledge of national flags, there is also a “Country Flag Quiz” Demonstration that you may download for free. Both of these Wolfram Demonstrations show off the power of the CountryData paclet. For example, Mathematica can analyze all those flag descriptions.

Read More »


July 19, 2007 — Joshua Martell, Software Technology

An email went out on a mailing list here at Wolfram looking for someone interested in learning about doing 3D printing. I’d heard about these so-called “Santa Claus machines,” but had never seen one in action. They’re really quite interesting. You tell Santa what you want, and out it comes–a shiny new toy!

Now it’s not quite that simple, but you get the idea. The models that these printers create can’t be too delicate, or they’ll break. The kind of printer that I’m now most familiar with builds the model from the bottom up, constructing the object one layer at a time from plaster and water. A thin layer of plaster is deposited, then a binding agent sprays from basically an oversized ink-jet printer to harden the areas that form the object. Once the printer is done, you have to dust off the object and infuse it with a hardener so it’s less fragile.

But back to the story. Ed Pegg Jr–associate editor for MathWorld–was writing an article about 3D printing and wanted to know more about the process. The idea was to print a physical 3D model of the spikey, our company logo, at the University of Illinois at Urbana-Champaign, which is just a few blocks from our offices. (You can read about the development of the spikey here.)

This was the version we were working with:

Mathematica model of spikey

But how would we turn that image into something we could actually hold in our hands?

Read More »


May 8, 2007 — Michael Pilat, Software Technology

Well, Mathematica 6 has only been out a week, and I’m happy to announce that we’ve already released an update! What’s better, you probably already have it if you use Mathematica 6!

How is that possible?

After exploring the What’s New website, you might have noticed the page for Load-on-Demand Curated Data, which says our “efficient load-on-demand mechanism makes hundreds of gigabytes of carefully curated and continually updated data immediately available inside Mathematica for use in computations.”

We’ve done a lot of work to aggregate data in a variety of disciplines, from chemistry to graph theory, geography to linguistics. This data is collected from a broad range of sources, and processed both automatically and by knowledgeable experts here at Wolfram Research, with the goal of providing data that is consistent, computable, and accurate.

How is this data delivered to you? At first, you might guess it’s shipped along with the many other features of the product. But the box doesn’t have a dozen CDs in it and there’s only a single download from our online store. That’s because Mathematica itself automatically downloads the data it needs, when it needs it.

Read More »