TO RUN D3 EXAMPLE LOCALLY
Navigate to project directory and run "python -m SimpleHTTPServer 8000" (Python version 2.*), then go to localhost:8000 (or replace 'localhost' with server IP address you're on)
TEST QUERY
Request address decoded: https://sciapps.colorado.edu/#/collections?{"queries":[{"type":"queryText","value":"space"}],"filters":[{"type":"facet","name":"locations","values":["Ocean > Pacific Ocean > North Pacific Ocean > Aleutian Islands"]}],"facets":true}
NOTES
- This example works with D3 version 3 and breaks when referencing version 4 which is the current one (see https://d3js.org/)
- The test query above produces 22 different keywords from the JSON response; a similar query with hundreds of different keywords takes a long time to load in the browser and the pie chart becomes too fragmented to be usable/make sense, also the legend won't fit on the canvas anymore
GIST WITH ALL CODE INCLUDING JSON DATA
https://gist.github.com/tjaensch/ee2685d323bde1a6cb0574de15d7d47b