Skip to content

Add National Statistics Comparison

Linda Mejia edited this page Jun 30, 2020 · 6 revisions

To add national statistics to each indicator chart we will be deriving the data from the US SDG platform, using the Open SDG API. For more information on how to use this API click here.

An important thing to note before implementing this is that how the statistic is measured may differ, therefore it may not be an accurate representation.

To proceed to add a national comparison add the following function to the indicatorView.js file:

national data function

Then, call the getNationalData(chartInfo) function inside of this.createPlot