Discussion
Techniques
I used three techniques to visualize different aspects of the data set.
- Circle Packing: Hierarchical representation of Fertilizer Imports/Exports (USA)
- Multi series line chart: Time series of imports/exports (USA) for each fertilizer
- Choropleth: Country wise annual fertilizer exports (USA)
Interactivity
Circle Packing
- Time slider to change the year. Visualization gets updated on mouse release.
- Button to switch between Imports and Exports. Visualization gets updated on mouse click.
- Zooming functionality to inspect data of particular country. Circle corresponding to a country is highilighted on hover. By clicking on a particular circle, zooming functionality is triggered. Clicking on the same circle again will trigger zoom-out.
Multi series line chart
- Button to switch between Imports and Exports. Visualization gets updated on mouse click.
- Details on demand using mouse hover. A gray line appears on hover to compare between different time-series (ferilizers). Also the exact values are displayed to the right of legend.
- Filtering functionality to select different fertilizers. The Y-axis (volume) is automatically adjusted based on the selections.
Choropleth
- This choropleth represents the exports data from year 2010.
- By keeping mouse pointer on particular country for a while, the exact volume of exports is displayed from 1990 through 2012 so that we can compare them with the export volume of the year 2010.
- Zoom-in functionality is implemented using mouse click. Again a mouse click triggers zoom-out when the map is already in zoomed-in mode .
Feedback
As I implemented multi-series line as part of prototype, I received feedback on multi-series line plot only.
- As suggested, I moved the text (exact volume on hover) to right of legend and adjusted the legend position accordingly.
- Also, instead of using two different plots for imports and exports (as planned originally), I implemented buttons to switch between imports and exports.
- As suggested, I'm displaying "NA" instead of empty text whenever it's applicable.
- As suggested, I updated the title (included volume in million of Tons) .
Challenges
I ran in to multiple issues while implementing the visualizations. Some of the key challenges I faced are listed below.
- The geomap library expects the country codes to be in ISO 3166-1 format. The orginal data contains only country name information. So, I had to scrape wikipedia page for getting the country codes. Even after using regular expressions to match the country names, some of the country names were n't matching with the ones in wikipedia page. I had to manually update those corner cases.
- Getting the data in to right format was important as some of the visualizations are more friendly with certain type of inputs. For example I had to create JSON files for implementing circle packing and CSVs for chorpleth.
- Upon adding buttons, I had to make sure previously drawn elemnts are cleared out completely. It took a while for me to get it right.
- Triggering the update function using tie slider was tricky. I tried using chroniton library for time slider. But I was n't successful. So, I ended up using html5slider.
- I'm using geomap library for choropleth. In addition to exports data I tried bringing up imports data as well. Also, I tried implementing a time slider. As there were some issues with the data formatting, I was n't successful. Though tool-tip (on mouse hover) picks up the data properly, the legend displays NANs. I could n't fix this issue in time.
- I tried to place imports and exports multi-series line plots adjecant to each other. Inspite of multiple attempts, I could n't make it aestetically pleasent. So, I had to implement buttons to switch between imports and exports instead.
Conclusion
Circle Packing
- Few countries like Canada, India, Brazil, China, Mexico, South Korea and Japan represent a significant chunk of fertilizer exports from USA. This pattern has n't changed over the time except for China and SouthKorea indicating the economic growth of these countries.
- Similarly, very few countries like Canada, Trinidad & Tobago, Mexico, Russia and Morocco represent a significant chunk of fertilizer imports to USA. This pattern has n't really changed over the time.
- Also, some of the countries represent significant imports/exports of particular fertilizer and they supply/consume only one fertilizer as far as USA is concerned.
Multi series line chart
- Most of the fertilizer imports/exports volume has n't really changed over the time except for MAP, Nitrogen Solutions, Solid Urea and Phosphate rock in case of imports & Phosphate rock, Solid Urea, Ammonium related fertlizers in case of exports.
- As expected most of these exceptions have a trend. In case of imports the change is positive indicating more consumption and in case of exports the change is negative indicating less production.
Choropleth
- To further strengthen the observations from Circle packing visualization, there are very few countries which represent a significant portion of fertilizer exports from USA. It's easy to visualize this information on a map as it's intuitive. Exports volume to most of the countries is less than one million tons and only India, Canada and Brazil stand out.