Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Conversation

amotl
Copy link

@amotl amotl commented Dec 17, 2018

Dear Daniel and all contributors,

first things first: Thanks for conceiving and maintaining this great plugin, we are using it extensively for displaying geospatial information with the Hiveeyes Project.

In one of our data planes, we are feeding data from the luftdaten.info project into an InfluxDB database using luftdatenpumpe.

As the data from InfluxDB is designated by "FORMAT AS Table" into the Worldmap Panel, we couldn't find a way to acquire the Location Name from a JSON/JSONP data source as it is possible with the "FORMAT AS Time series" variant already.

This PR accounts for that. When choosing to load location data using the new mapping options "table+json" or "table+jsonp", it is possible to load location information from JSON. The value of the data field designated by the "Location Name Field" will be used as a key for looking up the appropriate record in the JSON dataset. If the lookup fails, the specific code path is backward compatible and should produce the same results as before by using the value of the "Location Name Field" itself.

By applying that to our installation, we have been able to display a long location name acquired from ldi-stations.json on the map overlay of LDI stations map without having to store the name inside the InfluxDB measurement table itself. We don't even want to keep a short name there, the lookup is solely done by using a single location identifier, the numeric station_id:

image

With kind regards,
Andreas.

P.S.: This might also help along with #176.

@CLAassistant
Copy link

CLAassistant commented Dec 17, 2018

CLA assistant check
All committers have signed the CLA.

amotl added 3 commits April 20, 2019 00:19
location information from JSON endpoint, even for table data.
The lookup key is the value from the obtained "labelField".
@amotl amotl force-pushed the table-plus-json branch from 223cc15 to 2b19a3f Compare April 19, 2019 22:27
@amotl amotl closed this Apr 20, 2019
@amotl amotl deleted the table-plus-json branch April 20, 2019 16:26
@amotl
Copy link
Author

amotl commented Apr 20, 2019

This has been superseded by #197.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants