# MATLAB Spoken Here

## Put on your slow eyes with Trendy

Once, long ago, I wanted to know how many files there were on the File Exchange. This number, as it happens, is easily had. Just look at the top right of the file listing and you’ll see it (look where it says “1 – 50 of 14973″, or some similarly large number). Right away I realized this number wasn’t very interesting by itself. What I really wanted to know was this: How big is the File Exchange compared to how big it was yesterday? This information isn’t hard to get either, but it does require some discipline. First you write down today’s number somewhere, and then you have to remember to do the same thing tomorrow. Unfortunately, I’m not very disciplined. And since ultimately what I really wanted was long-running time series, why not automate this process?

Since I’m a MATLAB programmer, I wrote some MATLAB code to pull the number off the web page and store it in a MAT-file. I kicked off MATLAB every night with a scheduled task on my PC, and it would gather and plot the necessary data. This worked well enough, and soon other people were asking me to track things: sales numbers, file sizes, bug counts, headcount numbers. These data sources are all similar in two important respects: they’re slow-moving trends (gathering data once a day is fast enough), and the information is available on a web page somewhere. At that point I realized we had an opportunity to make a simpler and more general service: Trendy.

Trendy is a web service that makes it easy for you to track and plot slow-moving trends. You only need to give us two little chunks of MATLAB code: one to collect the latest data point for a trend you care about, and one to plot the resulting trend. We take care of the rest. We’ll store your data in a safe place and we’ll remember to run your code every night.

Here, for example, is the data I’ve been collecting on the number of files on the File Exchange. It’s hard to make sense of a list of numbers without plotting it. So here is a plot of the same data.
Notice that separating the trend’s data from its plot has some benefits. For one thing, I can do multiple plots of the same data. I might want to plot the rate at which files are coming in (with data smoothing). Or I might want to use linear extrapolation to predict how long until we hit a certain threshold.

Because everything on Trendy is public, you’re welcome to plot someone else’s data. Teja Muppirala made a cool plot of the number of sushi and ramen restaurants in Tokyo. When I saw Teja’s plot, it occurred to me to plot the ramen-to-sushi index. Noodles are cheaper than fish, so who knows? Maybe this can be used as a leading indicator for the Japanese economy.

Trendy is designed to remove the tedium of data collection, but as a side effect it also give you something else: data transparency. If you see an interesting plot, you can say “Show me the data.” And if you’re still curious, you can say “How did you get that data?” The data source is just a click away.

When you first create a trend, it seems maddeningly slow to fill up with data. But then you forget about it for a few days, and the next then you know, it’s revealing some fascinating patterns. Like the time-lapse movie of a sprouting bean, when you put on your slow eyes, you see things you never noticed before. We’re used to living in a data-rich world. Numbers are good. But for every number you hold in your hand, Edward Tufte is asking “compared to what?” From Premier League football to the solar system and beyond, Trendy helps you make sense of the numbers you care about.

### 4 Responses to “Put on your slow eyes with Trendy”

1. Oliver Woodford replied on :

Today I thought I would create my first trend, FEX50, which would record the IDs and number of downloads of the top 50 most downloaded submissions of the File Exchange, and display these in a nice area graph. However, when I realized this would mean creating 100 different trends, I decided to hold off. Perhaps storing multiple values in a single trend could be made possible?

2. Ned Gulley replied on :

Thanks for the comment. That’s a good idea, and something we’re considering as we improve Trendy. Another thing we’re looking at is making it easy to clone new trends from old trends so the mechanical steps of creation are not so burdensome.

3. Luke Stark replied on :

Thanks for the feedback Oliver! We’re definitely looking at expanding the types and structures of trend data that can be collected and stored. Suggestions and usage ideas are always welcome!

4. Manu Batura replied on :

I was trying to see if I can use Trendy to create a plot of the weather for a specific city on a daily basis. Websites usually display the weather information with tags as “rainy”, “cloudy” etc. It seems to me that currently Trendy can only support numeric values, hence, such a plot is currently not possible.

If this is true, can you plz also provide some kind of overloaded urlfilter in future to check for specific words in a web page which can be compared against an enumeration?

 Name (required) E-mail (required, will not be published) Website (optional) Spam protection (required): What is 1 + 3 ?

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>


If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).

News from the intersection of MATLAB, Community, and the web.

These postings are the author's and don't necessarily represent the opinions of MathWorks.