How to | Display Data Dynamically

The Wolfram Language can collect, process, and display data dynamically and in real time. A large collection of curated data is built into the Wolfram Language, which puts an extraordinary amount of information at your fingertips.

This page requires that JavaScript be enabled in your browser.
Learn how »

Use FinancialData to get the latest GE stock price:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Evaluating again will give the updated stock price:

In[3]:=
Click for copyable input
Out[3]=

Using Dynamic with the UpdateInterval option lets you query the current GE stock price at a regular time interval.

Here, the GE stock price is queried and displayed every 2 seconds:

In[4]:=
Click for copyable input
Out[4]=

For added clarity, you can include a time stamp to display when the price was retrieved. In the list before the price, the time stamp shows the year, month, day, hour, minute, and second that the price was retrieved:

In[5]:=
Click for copyable input
In[6]:=
Click for copyable input
Out[6]=

Because the UpdateInterval is hard coded, the update happens even when the price does not change.

Store these prices in the variable . You can use this variable later to create a visualization of the prices:

In[7]:=
Click for copyable input
Out[7]=

Now, as long as this output is visible, the latest GE stock price will be appended to . The TrackedSymbols option is necessary to prevent the dynamic evaluation from triggering when saving the price values.

You can use this idea to create a dynamic visualization showing the progression of GE stock prices from the time of evaluation.

As becomes larger, this visualization can potentially take a long time to render. Dynamic evaluations have a six-second time out by default. You can override this by setting the SynchronousUpdating option to False:

In[8]:=
Click for copyable input
Out[8]=