Great news: charte.ca now supports comparative histograms. This kind of charts comes handy when you want to compare two or more groups of series side-by-side. In most cases, this type of charts is used to draw a population pyramid, but it has other uses as well.
The following chart shows country population by age group, for multiple years, comparing male and female population.
This post discusses comparative histogram creation process step-by-step.
In "My charts" section of the editor, click the "New chart" button. Select grouped comparative histogram chart type:
The editor will create a chart with sample data. Now let's populate the chart with the flat data from a spreadsheet which contains population data for a few selected countries (provided by UN data service). Open the spreadsheet in the browser and copy all data rows to the clipboard. Now click "Import" button in the editor:
The import wizard will offer you to enter your data. Just paste the data you copied from the spreadsheet over the existing tab- or comma-separated text:
On the next step, tell the wizard how to build the pivot table from raw data: specify which flat data columns should be used for series (sex), sub-series (age group), category (year) and values (population):
On the next step, select a country to filter the data by (it happened to be Spain in this example):
On the last step, make sure that series and categories headers are not sorted - we are assuming that flat data has them in the right order already:
After you click "Done", the import wizard will create a pivot table from the flat data and populate the editor data grid. Save the chart, tweak chart appearance by changing colors for the Male and Female series, adjust chart size and font size and the chart is ready to be published!
For those who prefer the population pyramid style, here is a horizontal mirrored histogram presenting the same data:
Please pay attention to the age groups: on the population pyramid chart, they are sorted in the descending order - greater values (100+) at the top, smaller values (0-4) at the bottom. On the grouped chart in the beginning of the post, they are sorted in ascending order: smaller values (0-4) on the left, greater values (100+) on the right.
Animated population pyramid (available since June 2017):
Post a Comment