The first challenge we faced was figuring out how to import our dataset into Observable. We hosted the data we found on our personal SFU webspace, but turns out, it needed to be https and not http for the link to be considered.`
minYear=d3.min(data,d=>d.Convicted)
maxYear=d3.max(data,d=>d.Convicted)
md` data.reduce() accepts two fields. The first one we defined as sum, which informs the function to start adding up the values it encounters. d.Age lets the function know which value we want to sum up.`
sumofAge=data.reduce((sum,d)=>sum+(d.Age),0)
md` Similar to the sum function, reduce(count, d) counts the number of a certain type of variable, rather than the amount of the variable on top of the previous.`
When trying to count the number of females in the list of exonerees, we first tried to use the nesting and rollup method. This provided a count of both females and males in an array. So, we tried again to get just the number of females in the dataset.`
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.