London Lives Petitions: parish v others, 1690-1799 (v3)
ojsCwopYear =transpose(ojs_cwop_year)
Plot.plot({width: width,height:600,marginBottom:60,x: {tickRotate:90,tickFormat: d3.format('d')},y: { percent:true },color: {legend:true,domain: ["other","parish"],range: ["#b24747","#47b2b2"] },marks: [ Plot.barY(ojsCwopYear, {x:"year",y:"petitions",fill:"ptype",order:"ptype",// i think this fixes the random problem.offset:"normalize",tip:true,// need to format year againtip: {format: {x: (d) =>`${d}` } }//sort: {y: "x"} }),//Plot.ruleX([0]) ]})//"#b24747", "#d35400", 1), // orange//"#47b2b2", "#16a085", 1), // turquoise// problem that ptype were randomly ordered!// could fix it by uncounting the data in r and then using count in Plot. but dn't want that sort of faff// order: option seems to fix it.
Notes:
“Parish” = petitions from churchwardens and overseers of the poor, mainly concerning disputed pauper removals but also rate assessments, plus highways etc
Data: London Lives petitions project, v1.2
Dataviz: Observable Plot (supersedes earlier versions in dimple.js)