Skip to main content
100%

Transforming data using d3

✓ Published0🌍 Public
RRoyCsuka
Last edited Nov 18, 2019
Created on Nov 18, 2019

This example demonstrates how D3's `nest()` function and custom mapping can transform SPARQL query results about ethnographic artefacts into a hierarchical, country-based dataset with calculated counts. The visualization first loads data from a SPARQL endpoint using `d3.json`, cleans the raw bindings by extracting property values, then groups entries by country label and computes each country’s total number of artefacts. The code uses D3 v5’s `nest().key().entries()` API to perform the grouping, and logs the raw, cleaned, and transformed data to the console for inspection.

AI-generated description

Transforming data using d3

Concept

I'm going to group data using nest() and to add some calculated values. I'll try to do this based on SPARQL data about ethnographic artefacts

Inspiration

MIT Licensed

Similar vizzes