Unlisted
Edited
Jul 4, 2024
Insert cell
md`# My Research Projects and Activities

TODO
- derive interesting interval-based metrics (union, intersection, sequence)
- rules to detect any anomaly or problem
- calculate the sum of all activities -> to idenfity the most occupied time period
- group by categories of intervals -> so calculation can be achieved within this category
- calculations across groups
-
`
Insert cell
data_activities = bdata_activities_raw.map(d => {
d.start = parser_months(d.start)
d.end = parser_months(d.end)
return d
})
Insert cell
parser_months = d3.timeParse("%Y-%m")
Insert cell
parser_months("2021-09")
Insert cell
viewof chronology = vl
.markRule()
.data(data_activities)
.padding(2)
.encode(
vl.y().sort(["type", "start"]).fieldO("name"),
vl.x().fieldT("start"),
vl.x2().fieldT("end"),
vl.color().fieldO("type").scale({range: colors})
)
.render()
Insert cell
bdata_activities_raw = [
{name: "Théo Jaunet", start: "2018-09", end: "2022-05", type: "PhD Student"},
{name: "Liqun Liu", start: "2018-09", end: "2022-11", type: "PhD Student"},
{name: "Nicolas Jacquelin", start: "2019-10", end: "2022-12", type: "PhD Student"},
{name: "Aymeric Erades", start: "2022-09", end: "2025-09", type: "PhD Student"},

{name: "Jorge Martinez-Rey", start: "2017-04", end: "2017-09", type: "Post-Docs"},
{name: "Stefania Dumbrava", start: "2017-09", end: "2017-12", type: "Post-Docs"},
{name: "Thomas Leysen", start: "2018-03", end: "2019-09", type: "Post-Docs"},
{name: "Philippe Rivière", start: "2018-05", end: "2020-05", type: "Post-Docs"},
{name: "Sylvain Lesage", start: "2019-09", end: "2021-09", type: "Post-Docs"},

{name: "Renaud Jester", start: "2020-09", end: "2021-09", type: "Research Engineer"},
{name: "Théo Jaunet", start: "2022-05", end: "2022-09", type: "Research Engineer"},
{name: "Nicolas Jacquelin", start: "2022-09", end: "2022-12", type: "Research Engineer"},
{name: "Farouk Miled", start: "2023-09", end: "2023-12", type: "Research Engineer"},
{name: "MI2", start: "2017-01", end: "2021-05", type: "Project"},
{name: "IDEX VizTics", start: "2017-01", end: "2018-01", type: "Project"},
{name: "JO 2024 Neptune", start: "2020-01", end: "2024-12", type: "Project"},
{name: "Table Tennis", start: "2021-03", end: "2025-09", type: "Project"},
{name: "ANR Glacis", start: "2022-03", end: "2026-03", type: "Project"},
{name: "ANR Sportvis", start: "2025-01", end: "2028-12", type: "Project"},
{name: "PEDR", start: "2019-01", end: "2023-01", type: "Grant"},
{name: "RIPEC 3", start: "2023-01", end: "2026-01", type: "Grant"},
{name: "CRCT", start: "2021-09", end: "2022-08", type: "Grant"},
]
Insert cell
renderIntervalsPlot(data_activities)
Insert cell
function renderIntervalsPlot(intervals, options = {x_domain: [new Date("2016"), new Date("2028")], x_current: new Date("2024-07")}) {
return Plot.plot({
marginLeft: 50,
width: 1200,
color: {
type: "categorical",
domain: ["PhD Student", "Post-Docs", "Research Engineer", "Project", "Grant"], // Replace with your actual categories
range: ["#7fc97f", "#beaed4", "#9498a0", "#bcbd22", "#f0027f"], // Replace with your desired colors
legend: false
},
x: {
// axis: "top",
grid: true,
domain: options.x_domain
},
marks: [
Plot.axisY({
fill: "white",
stroke: "white",
textStroke: "white",
textStrokeWidth: 3,
textStrokeOpacity: 0.6
}),
Plot.axisX({
stroke: "black",
fontSize: 20,
}),
Plot.barX(intervals, {x1: d => d.start, x2: d => d.end, fill: (d, i) => d.type, y: (d, i) => i}),
Plot.text(intervals, {x: d => d.start, y: (d, i) => i, text: d => d.name ? d.name: "-", dy: 0, textAnchor: "start", dx: 0, fontSize: 16, textStroke: "white", textStrokeWidth: 3, textStrokeOpacity: 0.6}),
Plot.ruleX([options.x_current], {stroke: "red", strokeWidth: 2})
]
})
}
Insert cell
colors = [
'rgb(137,78,36)',
'rgb(220,36,30)',
'rgb(255,206,0)',
'rgb(1,114,41)',
'rgb(0,175,173)',
'rgb(215,153,175)',
'rgb(106,114,120)',
'rgb(114,17,84)',
'rgb(0,0,0)',
'rgb(0,24,168)',
'rgb(0,160,226)',
'rgb(106,187,170)'
]
Insert cell
import { vl } from "@vega/vega-lite-api"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more