I wanted to do a sample project using Reddit's praw module. r/Fantasy is one of my favorite subs and they conduct various polls to help readers find new books to read. So, I decided to do a small analysis using one of their lists.

About a month back, a thread was made titled The r/Fantasy Top Books by Women: 2021 Edition. For the 2019 poll, the results thread also included ranking changes compared to 2018.

To avoid replicating something that'd possibly be done again, I changed the ranking criteria to total votes per author instead of per book/series. I know that this is a significant deviation, since readers were asked to pick their all time top-10 book/series, not top-10 authors list. But hey, I just wanted to pick a simple enough project that I thought I could do with Python, so I tried this. This also made it easier to handle the data inaccuracies.

The biggest challenge I faced was correcting the input data. Readers were asked to use by or - to separate book/series and author. However, some used , or an em-dash instead of hyphen. Some switched the order. Since the data I got from praw was in markdown, I had to also remove formatting. I was able to handle most of these issues with code. I separated out lines that didn't follow the pattern and manually corrected them since these were small enough.

After the above process, I was left to deal with minor differences in author names, like initials, spacing, typos, etc. There were too many entries to adjust manually, so I used fuzzywuzzy to determine if two entries were close enough. This trick would fail with authors, say R.J. Barker and R.J. Parker but I didn't find such entries during a sample manual sanity check from these groupings.

So, with all the remaining flaws that I didn't catch, here's the top-30 authors list I got:

RankAuthor2021Author2019
1)Ursula K. Le Guin141Ursula K. Le Guin61
2)N.K. Jemisin134N.K. Jemisin59
3)Robin Hobb129Lois McMaster Bujold54
4)Lois McMaster Bujold114Robin Hobb51
5)Martha Wells114J.K. Rowling49
6)Naomi Novik111Naomi Novik47
7)Susanna Clarke81Becky Chambers38
8)Becky Chambers76Katherine Addison34
9)Katherine Addison74Jacqueline Carey30
10)Madeline Miller73Martha Wells30
11)

Tamsyn Muir

67Susanna Clarke29
12)Octavia E. Butler67Patricia A. McKillip27
13)J.K. Rowling64Katherine Arden25
14)Diana Wynne Jones57Octavia E. Butler22
15)Tamora Pierce50Ann Leckie20
16)Katherine Arden45Tamora Pierce20
17)

Arkady Martine

44

Claire North

19
18)Ann Leckie44Madeline Miller18
19)Leigh Bardugo41Leigh Bardugo18
20)Robin McKinley40Diana Wynne Jones18
21)Jacqueline Carey40

Helene Wecker

17
22)R.F. Kuang38

Janny Wurts

17
23)

Fonda Lee

35

Maggie Stiefvater

16
24)Patricia A. McKillip34

Catherynne M. Valente

15
25)Seanan McGuire33Robin McKinley15
26)

M.L. Wang

33

Rachel Aaron

15
27)

Alix E. Harrow

33

Anne McCaffrey

15
28)

Erin Morgenstern

33

Sherwood Smith

13
29)

Marie Brennan

32Seanan McGuire13
30)

Mary Robinette Kowal

32R.F. Kuang13