Plugins 〉Track Map
The Track Map plugin has been deprecated and is no longer maintained.
Track Map
Trackmap Panel for Grafana
Map plugin to visualize timeseries data from geo:json or NGSIv2 sources as either a Ant-path, Hexbin, or Heatmap.
Usage
Queries
It's important for the plugin to work, that the
Format as
is set toTable
.
To use the plugin the data needs to be formatted as a table which either contains simple lat
and lon
, or as location
in NGSIv2 format. Here is a example of how the data from the query should look like using location
:
[
{
"columns": [
{
"text": "location"
}
],
"rows": [
[
{
"type": "geo:json",
"value": {
"type": "Point",
"coordinates": [56.171884, 10.189101]
}
}
],
[
{
"type": "geo:json",
"value": {
"type": "Point",
"coordinates": [56.18803, 10.16773]
}
}
]
],
"type": "table"
}
]
A example of a query for location against a CrateDB/PostgreSQL:
SELECT time_index, location
FROM table_name
WHERE $__timeFilter(time_index)
ORDER BY time_index
And a example query for lat and lon against a CrateDB/PostgreSQL:
SELECT time_index, latitude as lat, longitude as lon
FROM table_name
WHERE $__timeFilter(time_index)
ORDER BY time_index
To only get specific entities from the database a query could look like this:
SELECT location, time_index
FROM table_name
WHERE $__timeFilter(time_index)
AND (entity_id = 'vehicle:WasteManagement:id1' OR entity_id = 'vehicle:WasteManagement:id2')
ORDER BY time_index
Settings
You can change the starting zoom and center of the map, as well as the maximum zoom under the map options:
There is a options to enable the use of the maps min and max coordinates.
This adds $maxLat
, $minLat
, $maxLon
and $minLon
as variables in the dashboard, with the maps bounding box.
Which can then be used in the query, as an example for CrateDB/PostgreSQL:
SELECT time_index, latitude as lat, longitude as lon
FROM table_name
WHERE $__timeFilter(time_index)
AND latitude >= $minLat
AND latitude <= $maxLat
AND longitude >= $minLon
AND longitude <= $maxLon
ORDER BY time_index
To use this with NGSIv2 data, is a bit more complex, an example for CrateDB/PostgreSQL:
SELECT coordinates[1] as lat, coordinates[2] as lon, time_index
FROM (
SELECT location['value']['coordinates'] as coordinates, time_index
FROM table_name
WHERE $__timeFilter(time_index)
) AS alias
WHERE coordinates[1] >= $minLat
AND coordinates[1] <= $maxLat
AND coordinates[2] >= $minLon
AND coordinates[2] <= $maxLon
ORDER BY 3
An option for the map to update the data after moving/zooming, is available when using the maps min and max coordinates. Do note that enabling this might make it spam your database, and can queue op request to it.
There are three visualization options to choose from, Hexbin, Heatmap and Antpath.
Hexbin
The hexbin have 2 options.
Color range
which lets you set the colors of the hexbin based on there value (number of datapoints with the hexbin), with the left color being the lowest count, and the right color being the highest count.- And
Radius range
with the first field being the initial size of the hexbin changing to the size of the second field.
Heatmap
There are no settings available for Heatmap
Antpath
The antpath have the following options available:
Delay
: The delay of the animation fluxDash array
: The size of the animated dashesWeight
: The weight of the pathColor
: The color of the pathPulse color
: Adds a color to the dashed fluxPaused
: Toggle stop/start of the animationReverse
: Reverses the animation flow
Build
To build the plugin, you need either yarn
or npm
.
First you need to install the dependencies by running:
npm install
After the dependencies are installed, you can build the plugin by running the following command:
npm run build
You can also run the code in development with the following command:
npm run dev
Install
If you are running grafana locally, you can clone or download the repository directly into the plugin directory of grafana, and then reset the grafana-server, and the plugin should be automatically detected.
Or if you are using docker, a guide can be found here.
There are more ways to install plugins for grafana, which can be found on their website.
Contributing
A guide on how to contribute can be found here
Acknowledgements
This plugin was developed as part of the the SynchroniCity Project by The Alexandra Institute. The SynchroniCity project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 732240
License
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
.h4 . .mb-0 }
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Installing Track Map on Grafana Cloud:
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
For more information, visit the docs on plugin installation.
Installing on a local Grafana:
For local instances, plugins are installed and updated via a simple CLI command. Plugins are not updated automatically, however you will be notified when updates are available right within your Grafana.
1. Install the Panel
Use the grafana-cli tool to install Track Map from the commandline:
grafana-cli plugins install
The plugin will be installed into your grafana plugins directory; the default is /var/lib/grafana/plugins. More information on the cli tool.
Alternatively, you can manually download the .zip file for your architecture below and unpack it into your grafana plugins directory.
Alternatively, you can manually download the .zip file and unpack it into your grafana plugins directory.
2. Add the Panel to a Dashboard
Installed panels are available immediately in the Dashboards section in your Grafana main menu, and can be added like any other core panel in Grafana.
To see a list of installed panels, click the Plugins item in the main menu. Both core panels and installed panels will appear.