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 examplesFiltering 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.