This lesson demonstrates how to create a feed in ArcGIS Velocity. Feeds allow you to collect 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 APIs.
In this lesson, you will work with Marine Cadastre Automatic Identification System (AIS) data and will create a feed to simulate historical AIS data (ship position observations) from a file. The configuration wizard you use in this lesson is used in Velocity whenever creating feeds or output layers.
This lesson is designed for beginners. You must have an ArcGIS Online account with access to ArcGIS Velocity. The estimated time to complete this quick lesson is 30 minutes.
Explore options for creating feeds
There are several ways in ArcGIS Velocity where you can access the configuration wizard to create a feed.
- In a browser, open ArcGIS Velocity and sign in using your ArcGIS Online credentials.
For the best experience, use Google Chrome or Mozilla Firefox.
Note:
If you encounter issues signing in, contact your ArcGIS Online administrator. You may need to be assigned an ArcGIS Online role with privileges to use ArcGIS Velocity. For more information, see Create roles and assign users.
- On the Home page, click Create feed to create a new feed.
- Alternatively, from the main menu on the left, click Feeds to open the Feeds page.
On the Feeds page, you can create a new feed as well as view and manage existing feeds.
Create an HTTP Simulator feed
First, you will create an HTTP Simulator feed type using the feed configuration wizard.
- On either the Home page or the Feeds page, click Create feed.
The Select a feed type window appears, displaying several categories for the types of feeds available in Velocity.
- Under Web and Messaging, click See all to access the feed types for web and messaging.
- Click HTTP to expand the HTTP related feed types.
- Click HTTP Simulator to choose this feed type.
Alternatively, you can type simulator in the Search text box to search for feed.
Configure the HTTP Simulator feed
The first step in configuring a new feed is typically to define the connection parameters to the data. This can include defining a connection to a server with authentication credentials or browsing to a feature layer in ArcGIS Online.
For HTTP Simulator feeds, you will connect to a simulation file available at a URL. Follow the steps below to configure the feed.
- For step 1 - Configure Simulation, configure the connection parameters as follows:
- For URL, type https://a4iot-public.s3-us-west-2.amazonaws.com/simulations/AIS_MarineCadastre_SelectedVessels.csv.
- For Field separator (optional), accept the default comma (,), since the file you are connecting to is comma delimited.
- For Features per execution (optional), type 30.
This simulation file contains a set of observations for 30 ships that are in time stamp order. By setting this property to 30, the data is 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 of 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 check box checked.
When checked, the HTTP Simulator feed loops the data when the end of the simulation file is reached.
- For Time field index, type 1.
This parameter sets the numerical index of the date field in the dataset, where the index starts at 0. For this dataset, the time stamp is in the second field, indicating that the index is 1.
- For Convert to current time, leave the check box checked.
When checked, the time values in the data are converted to the current time as it is simulated. This allows apps to treat the data as real-time data.
- Click Next.
Velocity tests the connection to the data source and attempts to sample the data. If the connection is successful, it then attempts 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 being received. Velocity defines the schema when it samples the data including estimating the data format, field delimiter, field type, and field name parameters.
- For step 2 - Confirm Schema, confirm the schema returned is the same as illustrated below.
- Review the field types returned from the sampled data in the Field Type column.
For delimited data, Velocity identifies the field type based on the sampled data. It is important to review the field types and confirm that they are correct. For example, if a field is identified as 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.
- Review the field names returned from the sampled data in the Field Name column.
Velocity identifies the field names based on the sampled data. Field names are populated for delimited data when a header row is present. You can rename fields now and uncheck any unnecessary fields. In this lesson, you will accept the default field names that were returned.
- Review the values returned from the sampled data in the Sampled Values column.
The sampled values displayed represent the actual data in the file, allowing you to confirm the field types and names are correct for the actual data.
- Click Next to confirm the schema of the data without making changes.
Identify the key fields
Next, you will set parameters so Velocity can properly construct geometry, date and time information, and a assign a unique identifier for each ship.
- For step 3 - Identify Key Fields, start by setting the Location parameters as follows:
- For Location type, choose X/Y fields.
- For X (longitude), choose LON.
- For Y (latitude), choose LAT.
- For Z (altitude), choose None.
- For Spatial reference, choose GCS WGS 1984.
- Next, set 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), choose None.
This parameter defines the end time for data where time is represented as intervals. For this lesson, the ship observations have a single time stamp.
- For Date format, choose Other (string).
- For Date Formatting String, type yyyy-MM-dd HH:mm:ss.S.
The date and time parameters enable Velocity to properly construct dates from the string values provided in the BaseDateTime field.
- For Track ID, under Tracking, choose MMSI.
A Track ID is a unique identifier for an observation or feature in your 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 used in this lesson, the unique identifier is the Maritime Mobile Service Identity (MMSI), which is unique to each ship.
- Click Next to confirm the key fields.
Save the feed
With the parameters of the feed defined, you will now save the new feed to Velocity.
- For step 4 - Save, type ship_positions_simulation for the Feed title parameter.
Note:
Feed names must be unique across an organization.
- For Feed summary (optional), type Simulated AIS ship positions from the Marine Cadastre Automatic Identification System.
- For Folder, set it to your user folder.
- Leave Also publish a feature layer which keeps all observations unchecked.
- Click Complete to create the new feed.
Review feed details
Once the feed is created, the feed Details page is available. 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 so on.
The feed starts automatically and the status button changes to Stop, indicating that the feed is started and running. If the feed does not start automatically, click Start. Once the Start button changes to Stop, the feed is running.
To access the new feed item details in your ArcGIS organization, click View item details. You can add more metadata or information to the item as necessary.
To view the data in a web map, click Open in Map Viewer, the layer is added to a new map.
Next steps
You have successfully created a feed in ArcGIS Velocity and are now collecting and visualizing real-time AIS data in a web map. In the next lesson, Design a real-time analytic, you will perform real-time analysis on the AIS data.