Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
() =>
dataset()
.addTable('population', population)
.addDerivedTable(
'popYear',
'population',
filter((d: any) => d.year === year)
)
.addDerivedTable(
'males',
'popYear',
filter((d: any) => d.sex === 1)
)
.addDerivedTable(
'females',
'popYear',
filter((d: any) => d.sex === 2)
)
.addDerivedTable('ageGroups', 'population', aggregate().groupBy('age'))
() =>
dataset()
.addTable('population', population)
.addDerivedTable(
'popYear',
'population',
filter((d: any) => d.year === year),
)
.addDerivedTable('males', 'popYear', filter((d: any) => d.sex === 1))
.addDerivedTable('females', 'popYear', filter((d: any) => d.sex === 2))
.addDerivedTable('ageGroups', 'population', aggregate().groupBy('age'))
.tables,
[year],
render() {
const {year} = this.state;
const ds = dataset()
.addTable('population', population)
.addDerivedTable('popYear', 'population', filter(d => d.year === year))
.addDerivedTable('males', 'popYear', filter(d => d.sex === 1))
.addDerivedTable('females', 'popYear', filter(d => d.sex === 2))
.addDerivedTable('ageGroups', 'population', aggregate().groupBy('age'));
return (