Skip to content

Commit 3154411

Browse files
authored
Merge pull request #13 from com-480-data-visualization/8-gender-and-publishers
paulti viz description
2 parents 4685efa + edd5bc7 commit 3154411

3 files changed

Lines changed: 43 additions & 14 deletions

File tree

website/content/visualizations/languages/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ date: 2026-04-13
44
description: "Guide to D3.js usage in Congo"
55
layout: "simple"
66
---
7+
This chart shows the distribution of the languages of the published books in the goodreads dataset.
8+
9+
Initially, one could think that goodreads contains a large panel of the books published over the world, but the large predominance of English suggests that there is very likely a bias. It might be because books with an english translation are marked as english, or because goodreads userbase mostly resides in North America and Europe.
10+
711
{{< rawhtml >}}
812
<div class="waffle-page">
913
<style>

website/content/visualizations/library/index.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
---
2-
title: "Library"
2+
title: "Women's bookshop"
33
date: 2026-04-13
4-
description: "Guide to D3.js usage in Congo"
4+
description: "browse and filter books on an interactive shelf"
55
layout: "simple"
66
---
7+
## Welcome to our bookshop !
8+
9+
Press the button to discover books written exclusively by women from all over the world :)
10+
11+
One cover raises your interest ? Click on it to read the synopsis !
12+
13+
Or, if nothing looks interesting, just draw again or change the filters 🎲
14+
715
{{< rawhtml >}}
816
<style>
917
.max-w-prose:has(> .bookshelf-body) {
@@ -479,16 +487,6 @@ layout: "simple"
479487
<div class="controls-container">
480488
<h2 class="filter-title">Filters</h2>
481489
<div id="badges-container" class="badges-container">
482-
<div class="badges-group">
483-
<div class="badges-group-label">Rating ⭐</div>
484-
<div class="rating-buttons">
485-
<button class="rating-btn" data-rating="0">All</button>
486-
<button class="rating-btn" data-rating="3">3+</button>
487-
<button class="rating-btn" data-rating="3.5">3.5+</button>
488-
<button class="rating-btn" data-rating="4">4+</button>
489-
<button class="rating-btn" data-rating="4.5">4.5+</button>
490-
</div>
491-
</div>
492490
<div class="badges-group">
493491
<div class="badges-group-label">Language</div>
494492
<div class="badges-list" id="language-badges"></div>
@@ -501,6 +499,16 @@ layout: "simple"
501499
<button id="add-genre-btn" class="add-filter-btn">+ Select genres</button>
502500
<div id="genre-dropdown" class="filter-dropdown" style="display: none;"></div>
503501
</div>
502+
<div class="badges-group">
503+
<div class="badges-group-label">Rating ⭐</div>
504+
<div class="rating-buttons">
505+
<button class="rating-btn" data-rating="0">All</button>
506+
<button class="rating-btn" data-rating="3">3+</button>
507+
<button class="rating-btn" data-rating="3.5">3.5+</button>
508+
<button class="rating-btn" data-rating="4">4+</button>
509+
<button class="rating-btn" data-rating="4.5">4.5+</button>
510+
</div>
511+
</div>
504512
</div>
505513
<button id="draw-button">Draw new books!</button>
506514
</div>

website/content/visualizations/publishers/index.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
11
---
22
title: "Publishers"
33
date: 2026-04-13
4-
description: "Guide to D3.js usage in Congo"
4+
description: "compare gender representation across major publishers"
55
layout: "simple"
66
---
7+
8+
This charts explores the relationship betwen publishers and authors' gender.
9+
10+
As we can see, few publishers are close to gender equality.
11+
12+
One factor that seem to impact the ratio quite strongly is the most published book genres, as all publishers with a majority of books published by women have either Romance, Young Adult or both in their top 3.
13+
14+
On the other hand, publishers focusing on Classics/Literature, Science Fiction and Fantasy seem to be publishing men's books overwhelmingly.
715
{{< rawhtml >}}
16+
<style>
17+
#publisher-chart {
18+
position: relative;
19+
left: 50%;
20+
transform: translateX(-50%);
21+
width: max-content;
22+
max-width: 100%;
23+
}
24+
</style>
825
<div>
926
<div style="margin-bottom: 16px;">
1027
<label style="font-size: 12px; color: #666;">Sort by:</label>
@@ -33,7 +50,7 @@ document.addEventListener('DOMContentLoaded', () => {
3350

3451
const rowHeight = 25;
3552
const innerHeight = data.length * rowHeight;
36-
const totalW = Math.min(1400, window.innerWidth - 40);
53+
const totalW = Math.min(1250, window.innerWidth - 40);
3754
const width = totalW - margin.left - margin.right - 270;
3855
const height = innerHeight + margin.top + margin.bottom;
3956

0 commit comments

Comments
 (0)