How to use the vega-datasets/data/population.json function in vega-datasets

To help you get started, we’ve selected a few vega-datasets examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / chart-parts / examples / PopulationPyramid / src / PopulationPyramid.tsx View on Github external
() =>
      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'))
github microsoft / chart-parts / packages / docs / examples / src / renderless / PopulationPyramid / PopulationPyramid.tsx View on Github external
() =>
			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],
github microsoft / chart-parts / packages / docs / examplesmobile / src / PopulationPyramid.js View on Github external
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 (

vega-datasets

Common repository for example datasets used by Vega related projects.

BSD-3-Clause
Latest version published 1 month ago

Package Health Score

82 / 100
Full package analysis

Popular vega-datasets functions

Similar packages