react-mapfilter
Version:
These components are designed for viewing data in Mapeo. They share a common interface:
11 lines (8 loc) • 332 B
JavaScript
// @flow
import { createMemoizedStats } from './lib/data_analysis/index'
import type { Statistics } from './types'
import type { Observation } from 'mapeo-schema'
const getStats = createMemoizedStats()
export default (observations: Array<Observation>): Statistics => {
return getStats(observations.map(obs => obs.tags || {}))
}