This visualization can be used to provide live weather information and 7 days forecasts. In addition to instant weather information for a location, this visualization also provides toggleable temperature (°C or °F) in local time and current weather conditions like wind, humidity, visibility and weather description.
Data Requirement
An OpenWeather API Key is required.
To make this visualization work properly, the underlying data must be formatted in a certain way. It requires City ID, longitude, latitude as specified in the OpenWeather city data.
Setup
In this example dataset, we have six columns: city ID, city name, state, country, longitude and latitude.
id | city | state | country | longitude | latitude |
---|---|---|---|---|---|
1261481 | New Delhi | IN | 77.23 | 28.61 | |
1850147 | Tokyo | JP | 139.69 | 35.69 | |
2172517 | Canberra | AU | 149.13 | -35.28 | |
2643743 | London | GB | -0.13 | 51.51 | |
2673730 | Stockholm | SE | 18.06 | 59.33 | |
4140963 | Washington, D.C | DC | US | -77.04 | 38.90 |
Weather mod can be configured to show the current weather conditions for a location with the following settings:
- City ID= id
- Color By = city
The end result will look something like this:
Configuration
Getting an API Key
An OpenWeather API Key is required in order to query weather information from the service. Create a new OpenWeather account and select the appropriate plan as per your requirement. More information can be found on how to start to work with OpenWeather API.
Setting the API Key
Once you have obtained the API Key, add it as a document property on Spotfire.
City ID
For optimized performance, it is recommended to limit data using expression to the required city IDs. This is done from the visualization properties, in the Data section.
Color By
This visualization automatically picks up the color values set in the Cole By axis. For best results, set the Color mode to Fixes. This is done from the visualization properties, in the Colors section.
Usage
Toggling temperature units
Temperature values can be switched from celsius to fahrenheit and vice versa by clicking on the °C or °F icons on the weather mod.
Help & Support
This Mod for Spotfire® is not supported by Spotfire Support.
In the event of issues or to suggest features and enhancements, submit an issue in the Mod's GitHub repository.
For general questions about Mods, please post a question in the Forum for Extensions & Mods to make it visible and routed to the appropriate team(s) to respond.
About Spotfire® Mods
- Spotfire Community Exchange: A safe and trusted place to discover ready-to-use Mods
- Developer Documentation: Introduction and tutorials for Mods developers
- Mods code examples on GitHub: A public repository for example projects
Recommended Comments
There are no comments to display.