Introduction to Visualizing Weather Events in SAP Lumira
The purpose of this post is to give a very quick introduction to Lumira and what can be done to create visualizations using already existing datasets. Lumira can be found here for those who do not have it yet.
We were given a case: Analyze and visualize weather data in ways that could be helpful. With that, our first inclination was to show this using Lumira, where we could easily use already acquired datasets to display multiple cases beautifully.
There are many datasets to play around with that are publicly available. This helpful GitHub page contains links to hundreds of useful datasets to play around with. A nice thing about this page is that it is well organized and actually splits the datasets into categories.
For this specific case, I used datasets from the National Oceanic and Atmospheric Administration (NOAA) which contains major storm events recorded by year since 1951. I downloaded the set from 2008 under StormEvents_details. The file is a bit quirky to extract so I first downloaded the datasets and then used 7-zip to extract the data.
Out of the box, these datasets play quite nicely and I could already make some pretty nice visualizations.
However, to make the datasets even more useful, I would have to manipulate the data a little bit to so that Lumira could interpret the data in ways that I want it to. The easiest way to do this is through a program such as Excel or Google Spreadsheet.
I used the set’s BEGIN_DATE_TIME and made it into a format which Lumira could easily recognize. This is extremely easy to do in an application such as Excel where I could simply copy and paste the cell and then use in the built-in function format cell feature to show only the date.
[Above is a gif. If it doesn’t animate, click on the gif itself].
All I had to do after modifying the weather datasets was to fire up Lumira and create a new visualization set using the CSV option. Lumira plays nicely with many different types of sets including excel, csv, txt, and even from places such as SAP HANA, Universe, SQL, and Hadoop. There was no additional modification needed for what I wanted to show, but modification of datasets through Lumira is possible.
At this point, there is an endless amount of possibilities in which one can do. For my specific purpose, I wanted to show the start points and end points of tornadoes during the month of November.
Creating Time Hierarchies to be used in Visualization
I first converted the modified time cell that I created into a time tree so that I could easily filter out my visualization by month. I did this by choosing my modified dimensions which I previously named Modified_Begin_Date, clicked the cog on the right of it and then created a date/time hierarchy. Since I already used Excel to convert the data into a format that plays nicely with Lumira, it was able to generate this instantaneously.
Creating Geographical Hierarchies to be used in Visualization.
Next, I wanted to convert my locations into geographic hierarchies, in order to create beautiful visualizations in Lumira. To do this, I clicked the cog on the right just as I did for my Time Tree which gave me the options to associate either by name or by Longitude/Latitude. Since NOAA already provided beginning Longitude/Latitudes as well as ending Longitude/Latitudes, I decided to use that. However, Lumira is fairly powerful in that it can associate Regions, States, Countries, and more. I will demonstrate this in another blog post where the Longitude/Latitude coordinates are not available.
Using BEGIN_LAT and BEGIN_LON for my latitude and longitude coordinates, I created geographical data for the beginning set.
I created a second set using the same process but using END_LAT and END_LON. I can also rename the dimensions that I just created by clicking on the cog and selecting rename.
Choosing Visualization Type
At this point I switched to the Geographic Chart visualization. Specifically, I used the Geo Map chart. Lumira includes its own maps as well as maps powered by Esri. There is extended functionality with Esri which I’m not going to go into today that allows for different map sets. Furthermore, there are extensions in Lumira that allows one to use other visualizations or services such as heat maps or Google Maps.
Using the hierarchies I created, many cases of filtering is possible. By creating the geographical hierarchy, I am able to filter by countries, regions, and sub-regions (counties). This was all generated automatically when I created the dataset. Furthermore, I am able to filter by date and time using the time hierarchy. For this case, since I wanted to show weather occurrences in the month of November, I created a filter by filtering out month. However, as I press the filtering button, I also find that I can filter in many different categories such as State, types of weather occurrences, and more. I can do this in three ways: Pressing the filter under the cog next to “Month”, clicking the filter button on the top on the top left hand of the visualization, or clicking and dragging Month to the filter section.
At this point, Lumira already shows beautiful visualizations showing occurrences. I can take this a step further and put EVENT_TYPE under the Color section to show what type of weather was occurring during the time period. Since I want to only show the beginning and ending of a certain event, I will omit this for now, but this just shows the possibilities of using Lumira for visualizations.
I will also add an additional filter for this demonstration to focus on a particular occurrence: EVENT_TYPE: Tornado
At this point I want to add my visual points to the map in order for it to show the data I have acquired. I can do this by either clicking and dragging dimensions or measures into the Geo area, or I can press “Add one Dimension” or “Add one Measure” and click on the appropriate measure type or Geographical dimension. If a measure is not there, I can create a measure similar to how I created a geographical dimension by clicking on the cog and selecting “Create a measure”. I can easily manipulate this new measure set by clicking on the cog next to the measure and either changing aggregation or creating a new calculated measure.
In this specific case, I only want to show the movement of tornados so measurements won’t be necessary. However, the NOAA data also contains measures such as magnitudes for some event types, which if placed into the “Size” set, can change the size of the bubbles to reflect how big or small the event occurrences were. Here is a brief description of what each section does.
Geo Dimension: Requires Geo Dimensions and essentially plots points on the map based on long/lat, or by other measures such as counties, cities, states, or countries.
Size: Expands on compresses the size of the bubble based on the number associated
Color: Categorizes and colors different bubbles by a set of names. For example, if I wanted to showcase all of the events and placed EVENT_TYPE into the color section, it will categorize all of the events and place separate events into different colors.
At this point, I have created an awesome map of where all of the tornadoes in November of 2008 started.
Adding a New Layer
Now I want to add where the end point of the data. I can do this fairly easily by adding a new layer and repeating the steps I made from above, only using the geography tree I made representing the end points.
At this point, the looks the same and there is no differentiation between the start and end. However, Lumira allows us to choose different colour sets to represent different types of data or simply create colours that are associated with certain organizations or companies. I can do this in this type of chart by clicking the cog next to my layer and selecting “Choose Colors”. All I have to do next is choose the colour I want, and I should then be able to visualize the movement of the weather.
Fantastic! Now if I zoom into an area, I can see approximately where the tornadoes have started and ended during the month of November.
This is just one small case which Lumira can handle. The possibilities of what one can do to visualize data with Lumira is endless and the Lumira community has created some spectacular visualizations using basic as well as advanced features including useful extensions.
Great write up! Lumira 1.30 now handles the Date Time format natively I believe, which would be a big help if the data was being refreshed automatically.
I'd like to see the Geo visualization support interpolation / animation, then you could track movement between start and end locations.