Plot.plot({height:900,width:1200,marginBottom:50,style: {background:"transparent"},//y-axis format: remove title and ticks, adjust yaxis range with domainy: {label:null,ticks:false,domain:[-7,21]},x: {label:null,fontSize:15,tickSize:0,tickFormat: d3.format("d")},//adjust square rect color palettecolor: {type:'categorical',range: ['#DB504A','#364156','#894950']},marks: [//annotation for Aretha Franklin Plot.link(annotations, {x1:"class_year",x2:"class_year",y1:"y1",y2:-2.4,stroke:"#656565",strokeDasharray:(5,5)}), Plot.text(annotations, {x:1987,y:-3.2,fontSize:"12px",text: (d)=>"1987\nAretha Franklin \nfirst woman inducted"}),//square tiles Plot.rect(query, {x1: (d) => d.class_year-0.45,x2: (d) => d.class_year+0.45,y1: (d) => d.class_index-0.45,y2: (d) => d.class_index+0.45,title: (d) => d.class_year+'\n'+ d.label+'\nCategory: '+ d.category,fill:"gender"}),//mark for category (if added) Plot.dot(query.filter( d=> d.category=== category), {x:"class_year",y:"class_index",r:5,title: (d) => d.class_year+'\n'+ d.label+'\nCategory: '+ d.category,fill:"white"}), Plot.image(annotations, {x:"class_year",y:"y2",src:"small",width:50})]})
Background
The Rock and Roll Hall of Fame has been celebrating the impact and evolution of rock and roll music since its inception in 1985. With the induction of 365 artists as of 2022, the Hall of Fame has recognized the contributions of 719 individuals to the genre. However, it is worth noting that women comprise less than 10% of total inductees. This is most likely related to the makeup of the selection board, which consists of around 30 members, with only nine of them being women. In light of this persistent gender imbalance, this project examines the history of inductees year by year to provide insight into the lack of diversity and promote awareness and discussion around the issue.
Data for this project was taken directly from The Rock & Roll Hall of Fame’s website, including artist/band name, category, and class year. I conducted additional independent research to include classifications for type and group. Type denotes if the inductee is an individual (e.g. singer-songrwriter, producer) or a group (e.g. band, duet). Gender classification includes male, female, and mixed for groups with male and female members. Hovering over an image reveals the name of the inductee.
db = DuckDBClient.of({ rrhof:awaitFileAttachment("data/rrhof.csv").csv(),})
query = db.sql`select a. * ,(case when gender_class='G1' THEN row_number () over (PARTITION BY class_year, gender_class) else (row_number () over (PARTITION BY class_year, gender_class) * -1)+1 end)::DOUBLE as class_index from( select label ,type ,gender ,class_year::int as class_year ,small ,category ,case when gender = 'male' then 'G1' else 'G2' end as gender_classfrom rrhof ORDER BY class_year, gender) a`
annotations = db.sql`select label ,type ,gender ,class_year::int as class_year ,small ,category ,0 as y1 ,-5 as y2from rrhofwhere label='Aretha Franklin'`