Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In this Socrata module how-to we'll use the Charts module with an aggregate view to easily display a bar chart of Seattle Building Permit dollar values by permit category.
(Note that the d3.js module provides a powerful and flexible visualization alternative if appropriate for your project.)
As of April 2016, we recommend the dev version of the Charts module because it fixes a bug when using Google Charts with horizontal labels.
- Seattle Building Permit endpoint: https://data.seattle.gov/resource/i5jq-ms7b.json
- Install the Charts module.
- Create a Socrata endpoint and view as described in the Socrata module documentation. In this case, we'll use the Seattle Building Permits endpoint above.
- Set the Format to "chart".
- Set the view to use aggregation as described in Socrata how-to: Use an aggregate view to sum Seattle Building Permit values.
- Set the chart settings:
- Pick the chart type
- Pick Google Charts (default) or Highcharts (if installed) as the charting library
- Pick chart fields for the labels and data axes
- Set other chart settings as needed
- Your view should now display a chart
Attachment | Size |
---|---|
Chart format settings | 71.49 KB |
Chart | 25.88 KB |