pathEmPlot | R Documentation |
This function takes the output from the getLoadings function and puts it into a format that can be plotted as a stacked bar plot using https://reaviz.io/?path=/story/charts-bar-chart-vertical-multi-series–stacked.
pathEmPlot(myLoadings)
myLoadings |
The output from the getLoadings function |
pathEmPlot(myLoadings=getLoadings()) [ [ { "Category": "1 Flush Toilets (Sewered)", "region": "HND", "emissionsPerCapita": 283449937507.16 }, { "Category": "2 Flush Toilets (Onsite)", "region": "HND", "emissionsPerCapita": 771922982401.523 }, { "Category": "3 Composting Toilets", "region": "HND", "emissionsPerCapita": 6163234018.8351 }, { "Category": "4 Dry Toilets", "region": "HND", "emissionsPerCapita": 6163183904.1368 }, { "Category": "5 Open Defecation", "region": "HND", "emissionsPerCapita": 366495976591.075 }, { "Category": "1 Flush Toilets (Sewered)", "region": "UGA", "emissionsPerCapita": 363549225541.818 }, { "Category": "2 Flush Toilets (Onsite)", "region": "UGA", "emissionsPerCapita": 791391988400.548 }, { "Category": "3 Composting Toilets", "region": "UGA", "emissionsPerCapita": 6943531405.2761 }, { "Category": "4 Dry Toilets", "region": "UGA", "emissionsPerCapita": 379008140777.892 }, { "Category": "5 Open Defecation", "region": "UGA", "emissionsPerCapita": 730164207658.016 } ] ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.