Published
Edited
Mar 17, 2020
Insert cell
Insert cell
vegalite({
"hconcat": [
{
selection: {
grid: {
type: "interval", "bind": "scales",
zoom: false
}
},
data: {
values: response.meta["citations"]
},
axes: [
{ orient: "bottom", "scale": "xscale", "tickCount": 5},
{ orient: "left", "scale": "yscale", "tickCount": 5}
],
mark:
{
type: "bar"
},
width: 800,
encoding: {
x: {field: "id", type: "ordinal", sort: {encoding: "y"},axis: {title: "Year of Publication"}},
y: {field: "count", type: "quantitative", title: "Dataset with Citations", scale: {type: "sqrt"}}
}
}
]
})
Insert cell
md` ## Data and Tools


I gathered and filtered the data using the public DataCite API (https://api.datacite.org) in february 2020. Therefore data is limited to research datasets that have a DOI assigned.

The visulisation is made using two separated Vega-lite specifications; one per chart.



`
Insert cell
md`It show the growing number of citations over for all academic work with DataCite DOIs`
Insert cell
response = d3.json("https://gist.githubusercontent.com/kjgarza/1d8c89e4d5e21f19aef1fe0f5d9caf1c/raw/31359d3e1b86ba40c2aa40eac2927e68377dedbf/citations_dataset_17_march.json");
Insert cell
embed = require("vega-embed@6")
Insert cell
embed({
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 200,
"height": 200,
"autosize": "none",
"signals": [
{
"name": "startAngle", "value": 0,
"bind": {"input": "range", "min": 0, "max": 6.29, "step": 0.01}
},
{
"name": "endAngle", "value": 6.29,
"bind": {"input": "range", "min": 0, "max": 6.29, "step": 0.01}
},
{
"name": "padAngle", "value": 0,
"bind": {"input": "range", "min": 0, "max": 0.1}
},
{
"name": "innerRadius", "value": 60,
"bind": {"input": "range", "min": 0, "max": 90, "step": 1}
},
{
"name": "cornerRadius", "value": 0,
"bind": {"input": "range", "min": 0, "max": 10, "step": 0.5}
},
{
"name": "sort", "value": false,
"bind": {"input": "checkbox"}
}
],
"data": [
{
"name": "table",
"values": response.meta["providers"],
"transform": [
{
"type": "pie",
"field": "count",
"startAngle": 0,
"endAngle": 6.29,
"sort": false
}
]
}
],
"scales": [
{
"name": "color",
"type": "ordinal",
"domain": {"data": "table", "field": "id"},
"range": {"scheme": "paired"}
}
],
"marks": [
{
"type": "arc",
"from": {"data": "table"},
"encode": {
"enter": {
"fill": {"scale": "color", "field": "id"},
"x": {"signal": "width / 2"},
"y": {"signal": "height / 2"}
},
"update": {
"startAngle": {"field": "startAngle"},
"endAngle": {"field": "endAngle"},
"padAngle": {"signal": "padAngle"},
"innerRadius": {"signal": "innerRadius"},
"outerRadius": {"signal": "width / 2"},
"cornerRadius": {"signal": "cornerRadius"}
}
}
}
]
})
Insert cell
md`## Live Monitoring

Below there is live monitoring of the datasets with citations`
Insert cell
Insert cell
vegalite = require("@observablehq/vega-lite@0.2")
Insert cell
d3 = require("https://d3js.org/d3.v5.min.js");
Insert cell
data = d3.json("https://api.datacite.org/dois?resource-type-id=dataset&has-citations=1");
Insert cell
citations = data.meta["citations"];
Insert cell
certificates = data.meta["certificates"];
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more