-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This Mod for Spotfire® 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.
- From this repository Releases section, locate and download the .mod file.
- Drag the .mod file into an analysis in Spotfire® Analyst.
For information on how to use and share visualizations mods, read the Spotfire® documentation.
- From this repository Releases section, locate and download the source code.
- Build the project in your preferred code editor. Microsoft Visual Studio Code is highly recommended.
- Open an analysis in Spotfire® and select Tools > Development > Create visualization mod from the menubar to connect to the project.
For information on how to get started with visualization mod development, read the Spotfire® documentation.
Every mod handles missing, corrupted and/or inconsistent data in different ways. It is advised to always review how the data is visualized.
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 OpenWeatherMap city data.
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
An OpenWeatherMap API Key is required in order to query weather information from the service. Create a new OpenWeatherMap account and select the appropriate plan as per your requirement. More information can be found on how to start to work with OpenWeatherMap API.
Once you have obtained the API Key, add it as a document property on Spotfire.
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.
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.
Temperature values can be switched from celsius to fahrenheit and vice versa by clicking on the °C or °F icons on the weather mod.
Copyright (c) 2023 Cloud Software Group, Inc. All Rights Reserved.