Published
Edited
Jun 1, 2020
Insert cell
md`## Regional reporting on SDG 4`
Insert cell
Insert cell
Insert cell
Insert cell
r1
Insert cell
Insert cell
Insert cell
Insert cell
region_list=["European Union (EU)", "Central American", "African Union (AU)","Organization of Ibero-American States (OEI)",'Caribbean Community (CARICOM)',"South Asian Association for Regional Cooperation (SAARC)", "Pacific Community", "Pacific Islands Forum", "Pacific Regional Education Framework(PacREF)", "Southeast Asian Ministers of Education Organization (SEAMEO)", "United Nations Economic Commission for Latin America and the Caribbean (CEPAL)", "The Commonwealth"]
Insert cell
textbox= {
const data=updata(Selection).map(d=>d.Target)
const description=indicators_description.filter(d=>data.includes(d.Target)).map(d=>d.Description)
const txtdiv = document.createElement("div");
for (let d of description){
txtdiv.appendChild(md`${d}`)
}
return txtdiv;
}
Insert cell
indicators_description=d3.csvParse(await FileAttachment('indicators.csv').text(), d3.autoType)
Insert cell
Indicator_list=indicators_description.map(d=>d.Target)
Insert cell
Insert cell
Insert cell
Country_list=d3.csvParse(await FileAttachment('test@6.csv').text(), d3.autoType)
Insert cell
Insert cell
Insert cell
updata('Angola')
Insert cell
// chart("Medical_practitioners","total")
updata = (selection) => {
let selected=[]
if(r1=='Target'){
selected = data.filter(d=>(d.Target == selection)&(d.Sub_Target == 'total'));
}else if(r1=='Region'){
selected = data.filter(d=>(d.Region == selection)&(d.Sub_Target == 'total'));
}else{
const selection_iso = map.features.filter(d => d.properties.name==selection)
selected = selection_iso.length>0?Country_list.filter(d=>(d.ISO == selection_iso[0].id)):[]
return selected
}
const selected_reporting = selected.filter(d => d.Report_status == 'Yes');
return selected_reporting;
}
Insert cell
d3 = require("d3@5")
Insert cell
$ = require('jquery')
Insert cell
d3tip=require('d3-tip')
Insert cell
d3legend=require('d3-svg-legend')
Insert cell
import {autoSelect} from "@jashkenas/inputs"
Insert cell
import {select} from "@jashkenas/inputs"
Insert cell
import {table} from "@tmcw/tables@513"
Insert cell
import {textarea} from "@jashkenas/inputs"
Insert cell
import {radio} from "@jashkenas/inputs"
Insert cell
import { callout } from "@d3/line-chart-with-tooltip"
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