This lesson will demonstrate how to create a feed in ArcGIS Velocity.
Feeds allow you rapidly ingest and visualize real-time data. Feeds typically connect to external sources of observational data such as Internet of Things (IoT) platforms, message brokers, or third-party API's. Feeds are also a type of stream layer and can be easily added to ArcGIS Online web maps and other applications.
In this quick lesson, you will be working with Marine Cadastre Automatic Identification System (AIS) data. You will create a feed to simulate historical AIS data (ship position observations) from a file.
The configuration wizard you will use for creating a feed is a common one throughout the Velocity application. It is good to familiarize yourself with the process as you will be working with the configuration wizard whenever you are configuring input or output data components.
This lesson is designed for beginners. You must have an ArcGIS Online account with access to ArcGIS Velocity. Estimated time: 30 minutes.
Explore options for creating feeds
There are several places in the ArcGIS Velocity application you can access the configuration wizard to begin creating a feed.
- In a web browser, navigate to https://velocity.arcgis.com and sign in with your ArcGIS Online credentials.
For the best experience, use Google Chrome or Mozilla Firefox.
If you encounter issues signing in, contact your ArcGIS Online administrator. You may need to be assigned to an ArcGIS Online role with privileges to use ArcGIS Velocity.
- Once you're signed in, you can create a new feed by clicking Create feed from the Home page.
- In addition, by clicking Feeds on the menu on the left, you access the Feeds page where you can view existing feeds and their status as well as create new feeds.
In the next section, you will create and configure a new feed.
Create a new feed
To begin, you will create a new Simulator feed type using the feed configuration wizard.
- From either the Home page or Feeds page you explored above, click Create feed.
- In the Select a feed type window, you have access to groupings of the various feed types you can create in Velocity.
- Click See all under Web and Messaging to access the feed types for web and messaging feeds. Similarly, you can search for simulator in the search.
- Click HTTP to access the HTTP related feed types.
- Click HTTP Simulator to choose this feed type.
Configure the HTTP Simulator feed
The first step in configuring a new feed is to define the connection properties to the data source. This can be, for example, defining a connection to a server with authentication credentials or simply browsing to a feature layer in ArcGIS Online.
For HTTP Simulator feeds, you will connect to a simulation file available at a URL.
- In the Configure Simulation step, enter the connection properties as follows:
- For URL, enter the following URL:
- For Field separator (optional), accept the default comma (,), since this file you are connecting to is comma-delimited.
- For Features per execution (optional), enter: 30
This simulation file contains a set of observations for 30 ships, ordered by timestamp. By setting this property to 30, the data will be extracted 30 rows at a time, meaning there will be a new observation for every unique ship in the dataset.
- For Interval for sending events (milliseconds) (optional), accept the default 1000
This parameter controls the rate at which the specified number of rows is simulated. In this case, you will simulate 30 observations (one for each ship) every 1000 milliseconds (or 1 second).
- For Repeat simulation, leave the checkbox checked.
When checked, the HTTP Simulator feed will loop the data when the end of the simulation file is reached.
- For Time field index (optional), enter: 1
This parameter sets the numerical index of the date field in the dataset, where the index starts at 0. For this dataset, the timestamp is in the second field, which means the index is 1.
- For Convert to current time, leave the checkbox checked.
When checked, the time values in the data are converted to the current time as it is simulated. This allows applications to treat the data as current real-time data.
- For URL, enter the following URL:
- Click Next to proceed to the next step.
Velocity will test the connection to the data source and attempt to sample the data. If the connection is successful, it will then attempt to derive the schema of the data, which you will explore next.
Confirm the data schema
When configuring a feed, it is important to define the schema of the data you are receiving. Velocity makes a best attempt at defining that schema when it samples the data, estimating the data format, field delimiter, field type, and field name properties.
- In the Confirm Schema step, confirm the parameters are configured as follows:
- Explore the field types returned from the sampled data records.
For delimited data, Velocity makes an estimation of the field type based on the sampled records. It is important to review the field types and confirm they are correct. For example, if a field is derived to be a number, but you know the values in the field represent coded values, it is a best practice to change the field type to a string. In this lesson, you will accept the default field types that were returned.
- Explore the field name values returned.
Velocity has derived field names when it sampled the file. Field names will be populated for delimited data when a header row appears to be present. You can rename fields now as well as uncheck any unnecessary fields. In this lesson, you will accept the default field names that were returned.
- Click Next to confirm the schema of the data.
Identify the key fields
Next, you will configure some important fields so Velocity can properly construct geometry, date information, and a unique identifier for each ship.
- In the Identify Key Fields step, configure the Location parameters as follows:
- For Location type, choose X/Y Fields.
- For X (longitude), choose the LON field.
- For Y (latitude), choose the LAT field.
- For Spatial reference, choose GCS WGS 1984.
- Define the Date and time parameters as follows:
- For Does your data have date fields?, choose Yes.
- For Start time (optional), choose BaseDateTime.
- For End time (optional), leave it set to None.
This parameter defines the end time for data where time is represented as intervals. For this lesson, the ship observations only have a single timestamp.
- For Date format, choose Other (string).
- For Date formatting string, enter the following text:
The date and time properties allow Velocity to properly construct dates from the string values provided in the BaseDateTime field.
- For Tracking, choose MMSI for the Track ID.
A Track ID is a unique identifier for an observation or feature in the data. It allows you to identify multiple records or events in the feed as being associated with a particular feature. In the AIS data feed, the unique identifier is the Maritime Mobile Service Identity, or MMSI, which is unique to each ship.
- Click Next to confirm the key fields.
Save the feed
With the parameters of the feed configured, you will now assign a name, an optional summary, and save the new feed.
- For Feed name, enter the following text:
Feed names must be unique across an organization.
- For Feed summary (optional), enter the following text:
Simulated AIS ship positions from the Marine Cadastre Automatic Identification System
- Click Complete to save the new feed.
Review feed details
Once the feed is published, the feed Details page loads. Here you can review the details of the feed you just created as well as edit, clone, share, delete, view the data in a map, and more.
The feed should start automatically and the status button will change from Initializing to Stop, indicating the feed has started. If the feed does not start automatically, click Start to start it. Once the Start button changes from Initializing to Stop, the feed is running.
To view the new feed item in the ArcGIS organization, click Item details. Here you can add any additional metadata or information that might be necessary.
You can also immediately view your data in a web map by clicking Open in Map Viewer.
Congratulations! You have successfully configured a feed in ArcGIS Velocity and are now ingesting and visualizing real-time data in a web map.
Next, explore the options for performing real-time analysis on this streaming data by creating a real-time analytic. For details, see the Design a real-time analytic quick lesson.