Real Time Data

Hi All,

So i’m new to Touch Designer and i’m doing this project for college where I take a real time data input from a website such as [url]http://www.worldometers.info/[/url] and create visuals from it. After going through a good few tutorial videos and examples I’ve yet to see anyone take a data input like this from a website.

Therefore I guess the question is, Is it possible?

It really depends on what you mean by realtime data.

A website like this is likely just running a script under the hood that’s increasing based on time. If you inspect the HTML you’ll see that it’s just a set of counters running. So you wouldn’t really want to poll this site for data to feed into a realtime system. You might pull apart their counting system to engineer something similar in touch - or just look over their descriptions to determine how they’re incrementing.

You could certainly pull data from any number of web sources - JSON, XML, CSV sheets, text files, etc. are all parse-able with touch. They’re are some good examples of pulling data from twitter, Instagram, Facebook, etc as well on the forum.

You should considering looking at the web DAT, as well as the websocket DAT if you want to pull data from a network source.

Hope that helps.

Sorry for this absolute necrobump, but I’m a newbie wondering about this same thing.

Let’s say that there’s a different website, that does have accurate numbers on it, updated in real time. How would you best grab those? There’s some text there in a <p> block that being updated using some Javascript thing, how do we extract that text?

It really depends on what you want to do with the data and how you want to poll from the data. The Web Client DAT is a great tool for requests style data gathering / setting. The sticky part is that a number in an arbitrary paragraph is going to be harder to parse for than if it’s in a data structure - JSON, XML, etc.

On the TouchDesigner side the Web Client DAT pulls information, so you set the cadence for an update - using something like a websocket you could receive information when it changes… but that does mean that you need to set-up the infrastructure to get that info. Does that make sense?