Emulating live data

Blog Post created by smcgeeesriuk-esridist Employee on Jun 5, 2018

Have you ever wanted to demonstrate a real-time tracking concept without setting up ArcGIS Enterprise and GeoEvent Server?


This blog explains how to simulate live data with a feature service, the ArcGIS API for Python & Jupyter Notebook.


Example output: 

Features update every 6s



This works perfect for people who just want to mock up live data easily. For example, if you've got some existing GPS tracking data that you want to visualise in as dummy live data in ArcGIS Online, then read further.


How does it work?

It’s simple to set up! Follow the instructions below.

1. Install ArcGIS API for Python & Open Jupyter Notebook. Users with the latest version of ArcGIS Pro will have Jupyter Notebook pre-installed!

2. Download the code sample and data from github here.

3. Open the sample in Jupyter Notebook.


Run each code block in order and follow instructions.

Section 1

Run the import code block (CTRL + ENTER)


Section 2

   i. lyr_url is an empty editable point feature layer.

      a. This can be public or private.

      b. It needs to have a field called 'name' or please change the notebook code to reflect alternative naming.

      c. Feel free to use this feature layer as a sample format. Although I would recommend making your own as there's a possibility someone may be using this layer at the same time.

   ii. csvLocation is the location of the data you want to simulate. Check out the sample data provided in the github repo to see the correct formatting.

   iii. itemsPerIteration

      a. This is how many unique items/people that are reiterating through the code. The sample csv has 3 people; Sean, Sam and Richard.

   iiii. Now run the code (CTRL + ENTER)



Section 3

Only run this code block if your feature layer is password protected.

You'll then be prompted to login with your ArcGIS Online username and password.


Section 4

Run the code block (CTRL + ENTER)


The output field should look something like this.

The layer will now actively be updating every 6 seconds!


How to set refresh speed in ArcGIS Online

When using this feature layer in ArcGIS Online, make sure that you set the refresh interval to 0.1 (see screenshot below). This will be 0.1 minutes or every 6 seconds.


You may need to login to ArcGIS Online to see this option.


I understand this is quite the niche tool and blog. But I hope you've found is useful.