Linking time stepper to time series data in Workshop

Hi all,

I am using a Map widget in workshop, along with geospatial data, to visualize state-by-state COVID hospitalization rates. I have configured a data layer in the Map widget which uses timeseries properties in my object set (a set of “States”) in order to overlay polygons on the US map, colored by hospitalization rate. I would like to use the Map’s time stepper in order to select snapshots of time from the timeseries data, and visualize this data on the map. However, I am having trouble connecting the time stepper to the time series data in the object set. Does anyone have experience with this functionality?

Thanks!

Dan

Hi! Can you try using the Map app in Foundry instead of the Map widget in Workshop. You will be able to import it in Workshop after it’s configured.

documentation for map templates: https://www.palantir.com/docs/foundry/map/templates
documentation for maps: https://www.palantir.com/docs/foundry/map/time-series (if you are using time series)
documentation for maps: https://www.palantir.com/docs/foundry/map/timeline (if you have one of the properties on the object set as timestamp - used it before and worked like a charm)

Hi @mai125 , thanks for the suggestion! I loaded my object set, including time series properties, into a new Map layer. But the application does not show me time selection options in the selection panel, as appear in the docs. I am also not able to color the cloropleth by the time series property for each object. Is there something I may be missing in configuring the map to use time series properties?

Thanks!

Hey Dan, one thing you could try is linking the time stepper directly to your data layer by using a callback function to listen for time changes and update the data accordingly. Here’s an example of how you could structure that:

mapWidget.on('timeStep', (timeIndex) => {
  const timeSnapshot = timeSeries[timeIndex]; // Assuming timeSeries is your array of time-based data
  dataLayer.updateData(timeSnapshot); // Update the map layer with the new data
});

Also, make sure your time series data is correctly structured (with each state having a property for each time step) and that the time stepper is correctly configured to trigger this update when the time changes. This will let the map dynamically display the hospitalization rates for each state as you move through the timeline!

Hopefully this helps, let me know!

Hey,

Piggybacking off of @mai125’s answer, you’ll want to do all of your layer + timeline configuration in a Map resource (where you can generate a separate Map Template resource) vs. a Map layer resource (there are a total of 3 different types of “Map” resources you can create on Foundry).

We have a similar example (counties in Maryland instead of U.S. states, and weather forecasts instead of hospitalization rates) where we also map geospatial data and visualize changes in values (i.e., temperature, wind speed, etc.) using Time Series properties. Below is a static screenshot of our working Map Template resource. Note the COLOR section within the Style tab of the relevant Layer: choose the Time Series property you want to color by (you can only do one property at a time), the color scheme, and interpolation method. When you then enable the Timeline via the button on the bottom-left corner and let it run over a period where you have non-null readings for the Time Series property, your objects will start updating colors.

If you want to use your Map Template in a Workshop application, you’ll have to use the Map Application Template widget instead of the Map widget.

In the widget’s configuration panel, you’ll want to scroll close to the bottom and find the TIME CONFIGURATION section; there you will have to manually/explicitly enable the timeline feature to be able to use it.

Hope this helps!

Thanks @joshOntologize! What seems to be going on for me is that styling in the Geometry tab is overriding styling in the Style tab. I attached two screenshots here to show you how things look for me. The blue is coming from an aggregation on the “Count of Objects” property in the Geometry tab. The Geometry tab also does not allow me to select the time series property I want from the dropdown. I tried turning the opacity all the way down on the Geometry tab, to see if it is overlaying another color layer from the Style tab. But then it looks like the choices from the Style tab are not rendering at all. I also tried using a fixed color on the Style tab (to rule out something wrong with the time series properties), but this color doesn’t render either.

Do you have a suggestion on how to proceed? Maybe there is a configuration option to prioritize the Style tab?


Thanks!

Hey @Dan_McCusker,

I’ve honestly not tried multiple configs on the same Map Template before, but you might be right in that having more than one configuration will only prioritize one over the other. Have you tried a version where you don’t have any config for the Geometry tab just to make sure the timeline feature is working as you expect (this is just to confirm that it will work overall)?

A workaround on Workshop I might suggest if you need/want to keep both configs is to:

  1. Create two separate Map templates: one that only applies the config from your Geometry tab, and another that only applies the config from your Style tab.
  2. In your Workshop application, create a Section whose Layout is set to Tabs
  3. In each tab, add one of the two Map Templates you create, and configure them accordingly

Since the objects are stationary (state boundaries), the default viewports will effectively remain constant (unless the user pans across the map) and switching between the two tabs of the section will effectively allow them to toggle between the two configured views.

Hope this helps!

Hi @joshOntologize @harikrishna @mai125 ,

I was able to accomplish what I wanted by returning to the time stepper in the Map widget in Workshop. Instead of time series properties, I went back to tabular, timestamped data. The time stepper has a published filter output, which will select objects based on their timestamp, and then I can visualize the state-by-state rates at that selected time. I can’t upload videos so here are two timestamped screenshots.

Thanks!

Dan


4 Likes

Looks great and thanks for sharing the update @Dan_McCusker !!