flags.filter(d=>d.value!=="").map(d=>flag_colours[d.source.match(/\w+/)]=newSet)// I cant see any benefit from Wrangler. Why the wrangling is not stable and usable on other parts?!?!?! So I'm using the flags database
flags.filter(d=>d.value!=="").map(d=>flag_colours[d.source.match(/\w+/)].add(d.target))// use .match to get rid of the flag icon in keys
Object.keys(flag_colours).map(country=>flag_colours[country]=[...flag_colours[country]])// to convert each Set to an Array
flag_colours
data
tables_aq=newObject
yearsKey.map(y=>tables_aq[y]=aq.from(data[y]))// generate aquero table data for each year and hold it together in tables_aq
tables_aq// aquero table data for all years
viewofyearInput=Inputs.select(years,{label:"Select the year"})
tables_aq[`year_${yearInput}`].view()// visualise the selected year's tabular data with aquero .view()
table_plot_input=data[`year_${yearInput}`]// for using Plot table you should have year_data as a separate database ready first.
table_plot_input
Type Table, then Shift-Enter. Ctrl-space for more options.
data_aq=newObject
yearsKey.map(year=>data_aq[year]=tables_aq[year].objects())// access the wrangled data by aquero via .objects()
data_aq// whatever wrangling you do with aquero will be reflected in this dataset. use this for d3. // NO you cannot use this. the wrangling stuff does not store in the table_aq and therfore not reflected in data_aq either. you have to store it while doing wranglings...
.derive({Rank:aq.escape(d=>d.Rank.match(/\d+/).toString())})// use aq.escape( d => ...) wherever you need to use other parameters or functions not supported by arquero
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.