The data which was used to create the chart shows the GDP value for the selected country, according to the World Bank's World Development Indicators. The content of the data source shows the indicator name (GDP), country name, year value and GDP value. The data structure from the source is shown in form of json, with each object showcasing the above contents.
The chart was implemented through the use of a javascript library called 'd3.js' Using the library CDN we were able to implement the pie chart using d3 methods. In addition, to specify the type of chart to be created, labels for the chart are defined. The chart uses the svg element to display the chart on the browser. An update button is added to allow for changes from the api json data. The country name and air quality in PM2.5 count are the files used to generate the pie chart