Filtering

MapWeave can handle up to 1 million data points while retaining real-time performance. However, in order to extract specific narratives it can be helpful to filter the data, by time, location and more.

Filtering by Time

MapWeave provides a simple timeFilterRange API to only display items within a specific time period for both the network and observations layers.

Here you can see the path of Hurricane Rafael in November 2024. A simple html input is used with MapWeave to control the timeFilterRange in the observations layer, use the slider to filter the observations to the dates shown.

A code snippet is shown below, or open the example in the playground to see the full code.

Filtering Playground

Log in to view live examples

Filtering Playground

Log in to view live examples
// set values for the initial start and end date for the filter
let dt1 = new Date('2024-11-03T18:00:00.000Z');
let dt2 = new Date('2024-11-10T12:00:00.000Z');

// set those date values in the time filter range in the observations options object
const observationsOptions = {
  timeFilterRange: { start: dt1, end: dt2 },
};

// create a new observations layer
const observationsLayer = new ObservationsLayer({
  data: myData,
  options: observationsOptions,
});

// add the observations layer to MapWeave
mapweave.addLayer(observationsLayer);
function Demo() {
  // create the start and end date
  const dt1 = new Date('2024-11-03T18:00:00.000Z');
  const dt2 = new Date('2024-11-10T12:00:00.000Z');

  // set the time filter range in observations options
  let observationsOptions = {
    timeFilterRange: { start: dt1, end: dt2 },
  };

  return (
    <>
      {/* create the MapWeave instance and set the options */}
      <MapWeave options={mapWeaveOptions}>
        {/* Add the observations layer with the data and options */}
        <ObservationsLayer data={myData} options={observationsOptions} />
      </MapWeave>
    </>
  );
}

MapWeave can also be integrated with the Keylines Time Bar or KronoGraph for more complex filtering.

MapWeave can also be integrated with the ReGraph Time Bar or KronoGraph for more complex filtering.

Terms of use

These terms do not alter or supersede any existing agreements between you (or your employer) and us.

By accessing or using any Content you agree to be bound by these Terms of Use. Please review these terms carefully before using the website.

The contents of this website, including but not limited to any text, code samples, API references, schemas, interactive tools, and other materials (collectively, the 'Content'), are made available for informational and internal evaluation purposes only. All intellectual property rights in the Content are reserved. No licence is granted to use the Content for any commercial purpose, or to copy, distribute, modify, reverse-engineer, or incorporate any part of the Content into any product or service, without our prior written consent.

This Content is provided “as is” and “as available,” without any representations, warranties, or guarantees of any kind, whether express or implied, including but not limited to implied warranties of merchantability, fitness for a particular purpose, non-infringement, or accuracy. To the fullest extent permitted by applicable law, we expressly exclude and disclaim all implied warranties, conditions, and other terms that might otherwise be implied.

We disclaim all liability for any loss or damage, whether direct, indirect, incidental, consequential, or otherwise, arising from any reliance placed on the Content or from your use of it, to the fullest extent permitted by applicable law. By continuing to access or use the Content, you acknowledge and agree to these terms.