@bedrocktech/superset-population-pyramid
v0.0.6
Published
Apache Superset chart plugin for visualizing population pyramids - demographic data visualization showing age and gender distribution
Readme
Apache Superset Population Pyramid Chart Plugin
A specialized Apache Superset chart plugin for visualizing population pyramids, designed for demographic data visualization showing age and gender distribution patterns.
Overview
This plugin provides an interactive population pyramid chart for Apache Superset, built with ECharts and optimized for demographic analysis. It displays population data in a horizontal bar chart format, with age groups on the vertical axis and population counts on the horizontal axis, traditionally showing males and females on opposite sides.
Features
- Interactive population pyramid visualization
- Age and gender distribution analysis
- Built with ECharts for high performance
- Responsive design
- Integration with Apache Superset's theming system
Requirements
- Node.js >= 18
- npm >= 8
- Apache Superset compatible environment
- React >= 16.13.1
Installation & Development
Building the Plugin
Install dependencies and build the plugin:
npm ci
npm run buildDevelopment Mode
For development with automatic rebuilding:
npm run devRunning Tests
Execute the test suite:
npm testIntegration with Superset
Package Installation
From your Superset frontend directory, install the plugin:
npm i -S @bedrocktech/superset-population-pyramidTypeScript Configuration
Add the following references to your tsconfig.json:
{
"extends": "../../tsconfig.json",
"references": [
{
"path": "../../packages/superset-ui-chart-controls"
},
{
"path": "../../packages/superset-ui-core"
}
],
"include": [
"../../types/**/*"
]
}Plugin Registration
Edit superset-frontend/src/visualizations/presets/MainPreset.js:
import { SupersetPluginChartPopulationPyramid } from '@bedrocktech/superset-population-pyramid';Add to the plugins array:
new SupersetPluginChartPopulationPyramid().configure({
key: 'superset-plugin-chart-population-pyramid'
}),Start Superset
Run the Superset development server:
npm run dev-serverDeployment
Deploy the built plugin to your Superset installation:
# Standard deployment path
superset/superset-frontend/pluginsDevelopment Resources
License
Apache-2.0
Author
Bedrock Tech [email protected]
