Has our newfound massive availability of data improved decisions and lead to better democracy around the world? Most would say, “It’s highly questionable.”

Conrad Wolfram’s TEDx UK Parliament talk poses this question and explains how computation can be key to the answer, bridging the divide between availability and practical accessibility of data, individualized answers, and the democratization of new knowledge generation. This transformation will be critical not only to government efficiency and business effectiveness—but will fundamentally affect education, society, and democracy as a whole.

Wolfram|Alpha and *Mathematica* 10 demos feature throughout—including a live Wolfram Language generated tweet.

More about Wolfram’s solutions for your organization’s data »

]]>Wolfram|Alpha provides several helpful formulas in this area, the first of which is a method for calculating the degree days for a location over a period of time. Degree days is a measure of how often the temperature was above (for cooling) or below (for heating) a given temperature or range of temperatures. It is used in a wide range of climate and energy cost-related areas, from agriculture to monitoring the heating and cooling costs of climate-controlled buildings.

In our case we want to know about the number of cooling degree days in June for Champaign with a base temperature of 72 °F:

This turns out to be 128 days Fahrenheit degrees difference. As the “Base temperature dependence” shows, the magnitude of degree days increases the lower we place the temperature that triggers cooling. This picture becomes more complicated when we include heating as well. While there is little need for heating in Champaign in the summer, San Francisco has quite cool mornings, even in June. The degree days in June for San Francisco with cooling base temperature 72 °F and heating base temperature 65 °F shows that there is a higher contribution from heating than cooling:

So we can see the amount of air conditioning needed, either to heat or cool, can vary substantially depending on location and time of year.

Degree days as defined above is fairly inaccurate for determining how much heating or cooling we need depending on the circumstances. It works well for a continually occupied residence. But for an office or a home where no one is present during portions of the day, it overestimates the amount of heating and cooling required to maintain a comfortable temperature. Just as you might switch off all your electrical items when going on a vacation, turning off or limiting your AC usage during portions of the day when they are not needed can greatly reduce the electric costs.

We can improve our calculations using the Wolfram Language. First let us make some assumptions. We will assume we are discussing a home, one where the inhabitants are out working between the hours of 8am and 5pm. The occupants wish to keep the temperature of the house between 65 and 75 °F. The air temperature inside a home is typically 2 to 3 degrees warmer than the exterior due to insulation and the various heat sources in the building. So we will be interested in exterior temperatures between 62 and 72 °F. For our purposes we will look at temperatures in June 2014 and locate our fictional home in Sacramento, California.

We can extract the amount of time the temperatures exceed these limits from the historical data for that month:

A visualization of that data shows the daily fluctuations:

To simplify our calculations, we will sample the data by hour, noting how many hours the temperature was above or below our range of comfort.

From this we see that if we want to remain within our desired comfort band, we will be running the AC quite a bit in June. But let’s omit the portion of the day between 8am and 5pm (adjusting the data to account for the time zone):

Now we see that we have drastically reduced the amount of cooling needed. With more lenient temperature guidelines, such as allowing the heating temperature to remain lower at night or raising the acceptable cooling temperature around midday, further cost savings can be found.

Ultimately we will be running our AC for a portion of the day regardless, and it is useful to know how much air conditioning we will need and what our electric bill will be like. Wolfram|Alpha provides an air conditioner sizing guide. By specifying the area of the space being cooled, how long it will run each day, the average price of electricity per kWh, as well as important properties (such as the level of insulation), Wolfram|Alpha will calculate not only what your monthly costs will be, but how big an AC unit you will need.

Returning to our example home, we will suppose we are dealing with a modest sized home with 1,500 square feet of interior space. It has little tree cover, but good insulation. There are two full-time occupants. In this part of California, electricity rates are about 10 cents per kWh currently. If you don’t have a current electric bill handy, you can estimate your cost per kilowatt hour with Wolfram|Alpha. Based on our calculations above, we need to cool the house for an average of 6.7 hours a day. The air conditioner sizing guide shows:

Based on this, you would need a 29300 BTU/hour capacity air conditioning unit to cool your home, and your bill would be roughly $173. Over the course of the month, that would be 5.89 million BTU, or a 12th of what the average car uses in a year in the USA.

Finally, with your AC running and thermostat set to lower costs, you can lean back and relax in the coolness of your own home.

]]>On July 20, we celebrate the 45th anniversary of the Apollo 11 Moon landing. This landing began a sequence of Moon landings that ended with Apollo 17. We can leverage Wolfram|Alpha and the recently released *Mathematica* 10 to help us celebrate and continue exploring (data, in this case). The available data includes dates, crew information, and landing coordinates.

Let’s explore the crew information first. As with many famous people, Wolfram|Alpha gives a fair amount of information like birth dates and locations, pictures, time lines, height information, and familial information.

With the release of *Mathematica* 10, we can use `GeoGraphics` to create maps. We can use the data for the crews of all the Apollo landings to generate visualizations of their birth locations.

Perhaps my favorite data includes information on the landing sites. Although Wolfram|Alpha gives you a picture showing the landing location of Apollo 11, we can leverage the newly released *Mathematica* 10 to generate custom maps of the location, which even allows you to specify which projection you want.

We can have a little fun by using map projections that show even more of the Moon, including the far side.

Here’s a projection you probably have never seen applied to the Moon.

Going beyond Apollo 11, we can plot all of the other Apollo Moon landings.

Its also a fun activity to plan a future exploration of the Apollo Moon landing sites. What would be the shortest path needed to visit all of the sites? We can use `FindShortestTour` to achieve our goals.

An interesting side note is that, although not related to the landing itself, Wolfram|Alpha has data on the Saturn V rocket, which was used to launch all of the Apollo Moon missions. To this day, it remains the most powerful lifting body ever put into active service.

Although the Apollo program ended decades ago, its influence continues to inspire the media to this day. Examples include books and movies such as *Apollo 13* and *The Right Stuff* (book | movie). Maybe one day we will return to the Moon. But even if we do, the celebration of the anniversary of the first manned landing on the Moon will always be something to remember.

Download this post as a Computable Document Format (CDF) file.

]]>There’s the groundbreaking of the Freedom Tower in New York City in 2004, President Lyndon Johnson’s signing of the Freedom of Information Act in 1966, the first performance of “My Country, ‘Tis of Thee” in 1831, and the surrender of Vicksburg, Mississippi to Union forces in 1863.

July 4 marks the anniversary of the first American Top 40 radio broadcast, too. Casey Kasem, who passed away last month, co-created and hosted the first show on July 4, 1970.

The United States also unveiled its 49- and 50-star flags on July 4, 1959 and 1960, respectively, to honor Alaskan and Hawaiian statehood.

Whether you make history or just memories this year, here’s hoping you have a safe and fun holiday weekend.

]]>My goal with the Wolfram Language in general—and Wolfram Programming Cloud in particular—is to redefine the process of programming, and to automate as much as possible, so that once a human can express what they want to do with sufficient clarity, all the details of how it is done should be handled automatically.

I’ve been working toward this for nearly 30 years, gradually building up the technology stack that is needed—at first in *Mathematica*, later also in Wolfram|Alpha, and now in definitive form in the Wolfram Language. The Wolfram Language, as I have explained elsewhere, is a new type of programming language: a knowledge-based language, whose philosophy is to build in as much knowledge about computation and about the world as possible—so that, among other things, as much as possible can be automated.

The Wolfram Programming Cloud is an application of the Wolfram Language—specifically for programming, and for creating and deploying cloud-based programs.

How does it work? Well, you should try it out! It’s incredibly simple to get started. Just go to the Wolfram Programming Cloud in any web browser, log in, and press New. You’ll get what we call a notebook (yes, we invented those more than 25 years ago, for *Mathematica*). Then you just start typing code.

It’s all interactive. When you type something, you can immediately run it, and see the result in the notebook.

Like let’s say you want to build a piece of code that takes text, figures out what language it’s in, then shows an image based on the flag of the largest country where it’s spoken.

First, you might want to try out the machine-learning language classifier built into the Wolfram Language:

OK. That’s a good start. Now we have to find the largest country where it’s spoken:

Now we can get a flag:

Notebooks in the Wolfram Programming Cloud can mix text and code and anything else, so it’s easy to document what you’re doing:

We’re obviously already making pretty serious use of the knowledge-based character of the Wolfram Language. But now let’s say that we want to make a custom graphic, in which we programmatically superimpose a language code on the flag.

It took me about 3 minutes to write a little function to do this, using image processing:

And now we can test the function:

It’s interesting to see what we’ve got going on here. There’s a bit of machine learning, some data about human languages and about countries, some typesetting, and finally some image processing. What’s great about the Wolfram Language is that all this—and much much more—is built in, and the language is designed so that all these pieces fit perfectly together. (Yes, that design discipline is what I personally have spent a fair fraction of the past three decades of my life on.)

But OK, so we’ve got a function that does something. Now what can we do with it? Well, this is one of the big things about the Wolfram Programming Cloud: it lets us use the Wolfram Language to deploy the function to the cloud.

One way we can do that is to make a web API. And that’s very straightforward to do in the Wolfram Language. We just specify a symbolic API function—then deploy it to the cloud:

And now from anywhere on the web, if we call this API by going to the appropriate URL, our Wolfram Language code will run in the Wolfram Cloud—and we’ll get a result back on the web, in this case as a PNG:

There are certainly lots of bells and whistles that we can add to this. We can make a fancier image. We can make the code more efficient by precomputing things. And so on. But to me it’s quite spectacular—and extremely useful—that in a matter of seconds I’m able to deploy something to the cloud that I can use from any website, web program, etc.

Here’s another example. This time I’m setting up a URL which, every time it’s visited, gives the computed current number of minutes until the next sunset, for the inferred location of the user:

Every time you visit this URL, then, you get a number, as a piece of text. (You can also get JSON and lots of other things if you want.)

It’s easy to set it up a dashboard too. Like here’s a countdown timer for sunset, which, web willing, updates every half second:

What about forms? Those are easy too. This creates a form that generates a map of a given location, with a disk of a given radius:

Here’s the form:

And here’s the result of submitting the form:

There’s a lot of fancy technology being used here. Like even the fields in the form are “Smart Fields” (as indicated by their little icons), because they can accept not just literal input, but hundreds of types of arbitrary natural language—which gets interpreted by the same Natural Language Understanding technology that’s at the heart of Wolfram|Alpha. And, by the way, if, for example, your form needs a color, the Wolfram Programming Cloud will automatically create a field with a color picker. Or you can have radio buttons, or a slider, or whatever.

OK, but at this point, professional programmers may be saying, “This is all very nice, but how do I use this in my particular environment?” Well, we’ve gone to a lot of effort to make that easy. For example, with forms, the Wolfram Language has a very clean mechanism for letting you build them out of arbitrary XML templates, to give them whatever look and feel you want.

And when it comes to APIs, the Wolfram Programming Cloud makes it easy to create “embed code” for calling an API from any standard language:

Soon it’ll also be easy to deploy to a mobile app. And in the future there’ll be Embedded Wolfram Engines and other things too.

So what does it all mean? I think it’s pretty important, because it really changes the whole process—and economics—of programming. I’ve even seen it quite dramatically within our own company. As the Wolfram Language and the Wolfram Programming Cloud have been coming together, there’ve been more and more places where we’ve been able to use them internally. And each time, it’s been amazing to see programming tasks that used to take weeks or months suddenly get done in days or less.

But much more than that, the whole knowledge-based character of the Wolfram Language makes feasible for the first time all sorts of programming that were basically absurd to consider before. And indeed within our own organization, that’s for example how it became possible to build Wolfram|Alpha—which is now millions of lines of Wolfram Language code.

But the exciting thing today is that with the launch of the Wolfram Programming Cloud, all this technology is now available to anyone, for projects large and small.

It’s set up so that anyone can just go to a web browser and—for free—start writing Wolfram Language code, and even deploying it on a small scale to the Wolfram Cloud. There are then a whole sequence of options available for larger deployments—including having your very own Wolfram Private Cloud within your organization.

Something to mention is that you don’t have to do everything in a web browser. It’s been a huge challenge to implement the Wolfram Programming Cloud notebook interface on the web—and there are definite limitations imposed by today’s web browsers and tools. But there’s also a native desktop version of the Wolfram Programming Cloud—which benefits from the 25+ years of interface engineering that we’ve done for *Mathematica* and CDF.

It’s very cool—and often convenient—to be able to use the Wolfram Programming Cloud purely on the web. But at least for now you get the very best experience by combining desktop and cloud, and running the native Wolfram Desktop interface connected to the Wolfram Cloud. What’s really neat is that it all fits perfectly together, so you can seamlessly transfer notebooks between cloud and desktop.

I’ve built some pretty complex software systems in my time. But the Wolfram Programming Cloud is the most complex I’ve ever seen. Of course, it’s based on the huge technology stack of the Wolfram Language. But the collection of interactions that have to go on in the Wolfram Programming Cloud between the Wolfram Language kernel, the Wolfram Knowledgebase, the Wolfram Natural Language Understanding System, the Wolfram Cloud, and all sorts of other subsystems are amazingly complex.

There are certainly still rough edges (and please don’t be shy in telling us about them!). Many things will, for example, get faster and more efficient. But I’m very pleased with what we’re able to launch today as the Wolfram Programming Cloud.

So if you’re going to try it out, what should you actually do? First, go to the Wolfram Programming Cloud on the web:

There’s a quick Getting Started video there. Or you can check out the Examples Gallery. Or you can go to Things to Try—and just start running Wolfram Language examples in the Wolfram Programming Cloud. If you’re an experienced programmer, I’d strongly recommend going through the Fast Introduction for Programmers:

This should get you up to speed on the basic principles and concepts of the Wolfram Language, and quickly get you to the point where you can read most Wolfram Language code and just start “expanding your vocabulary” across its roughly 5000 built-in functions:

Today is an important day not only for our company and our technology, but also, I believe, for programming in general. There’s a lot that’s new in the Wolfram Programming Cloud—some in how far it’s been possible to take things, and some in basic ideas and philosophy. And in addition to dramatically simplifying and automating many kinds of existing programming, I think the Wolfram Programming Cloud is going to make possible whole new classes of software applications—and, I suspect, a wave of new algorithmically based startups.

For me, it’s been a long journey. But today I’m incredibly excited to start a new chapter—and to be able to see what people will be able to do with the Wolfram Language and the Wolfram Programming Cloud.

*To comment, please visit the copy of this post at the Wolfram Blog »*