Fandom Stats

1.5M ratings
277k ratings

See, that’s what the app is perfect for.

Sounds perfect Wahhhh, I don’t wanna

A small Christmas update:

After spending a few months in a “conserved” state due to hosting issues, Fandomstats.org is back up and running with full capabilities, graphs and all!

You now (again) can:

  • See statistics for an AO3 tag, displayed as graphs (breakdown of ratings, most popular categories, ships, warnings, other tags)
  • Get the same data as CSV or JSON
  • Use the API directly (and read some basic documentation)
  • Look up bookmarks of works by a specific author

AND (because I was already tinkering with the code and wanted to build something fun)

Merry Christmas or Happy Holidays to anyone who celebrates, and a nice time to everyone else :)

fandomstats fandom statistics fandom ao3 yuletide

tightleish asked:

hi there! does this return public works only?

In short: Yes, the API counts only public works. 

In not-so-short: The API gets its numbers from a tag’s filtering page (the one with the filter bar on the right). The backend (scraper) is accessing AO3 the same way a non-logged-in user would, and in that case, private works are neither listed, nor included in the values displayed on this page. 

I suppose this might skew the stats for fandoms with a lot of private works, so that’s something to keep in mind I guess. There is currently no way to have the fandomstats API work as a logged-in user.

dalianaxia-blog asked:

Hi! I was searching for API for AO3 and I found your amazing website! I feel stupid to ask this but how can I use the API endpoint? For example, I wanted to search for Harry Potter and I used this: fandomstats. org/ api /v1.0/stats?tag_id={Harry%20Potter}, but it ends up in error saying "This tag cannot be filtered on". Thanks for replying!!

Hi, I can see the problem! You need to enter the tag without the curly braces, e.g. just tag_id=Harry%20Potter - the {TAG} text is just meant to be a placeholder.

dalianaxia
fandomstatsorg

Anonymous asked:

I am not able to search the site fandomstatsorg, the following sentence appears: "This tag was not found on AO3".

annathecrow answered:

Hi, thanks for letting me know - it’s probably a new wave of URL changes at AO3, so hopefuly it will be an easy fix. 

fandomstatsorg

Update: unfortunately, it appears that AO3 changed the HTML markup for the filter sidebars, which is where we’re getting our numbers from :( It’s fixable, but it will need a bit more work than I anticipated. 

Generally, this is a common problem when dealing with website scraping. For those who don’t know what “scraping” means: it’s a programmatic way of getting info from a web page by navigating through it’s contents to find specific elements which contain the data we need. It’s not that different from what a user is doing visually (and even more similar to how a screenreader user navigates): “in this div find this list, take every list item; the content is the number we’re looking for”

The catch is, the underlying structure of web pages changes. And unlike a human, the scraping code can’t easily adapt to the new structure (unless it’s written that way of course, but that’s a very different kettle of fish from our humble tools).

tl; dr Things changed, the API is borked, I’ll do my best to get it working soon.  

fandomstatsorg

Okay, fixed! Fandomstats.org works again.

status update bugfix
annathecrow

Anonymous asked:

I am not able to search the site fandomstatsorg, the following sentence appears: "This tag was not found on AO3".

annathecrow answered:

Hi, thanks for letting me know - it’s probably a new wave of URL changes at AO3, so hopefuly it will be an easy fix. 

fandomstatsorg

Update: unfortunately, it appears that AO3 changed the HTML markup for the filter sidebars, which is where we’re getting our numbers from :( It’s fixable, but it will need a bit more work than I anticipated. 

Generally, this is a common problem when dealing with website scraping. For those who don’t know what “scraping” means: it’s a programmatic way of getting info from a web page by navigating through it’s contents to find specific elements which contain the data we need. It’s not that different from what a user is doing visually (and even more similar to how a screenreader user navigates): “in this div find this list, take every list item; the content is the number we’re looking for”

The catch is, the underlying structure of web pages changes. And unlike a human, the scraping code can’t easily adapt to the new structure (unless it’s written that way of course, but that’s a very different kettle of fish from our humble tools).

tl; dr Things changed, the API is borked, I’ll do my best to get it working soon.  

status update fandomstats.org fandomstats
fandomstatsorg
fandomstatsorg

Notice: It seems that the bookmark viewer is currently broken due to changes in AO3 URL structure. This  should be an easy fix, I’ll try to get to it as soon as I can. 

Thanks @rikkamaru​ and @brickgrass​ for reporting!

fandomstatsorg

Fixed! If it still doesn’t work for you, your browser might be caching the old version - hard reloading with Shift+F5 should sort that out.

status update
fandomstatsorg

everythingbutthekitchensphinx asked:

I feel stupid having to ask you this question but - I wanted to look at the stats for a small fandom I'm in using fandomstats, but no matter what I enter into the search bar I am told it's a non-canonical tag. Even when I copypaste the canon tag directly from Ao3! I thought maybe my fandom was too small, so I tried entering one of the examples of a canon tag listed on the fandomstats website (Teen Wolf (TV)) and was told it wasn't a canon tag either! What am I doing wrong? ;w;

destinationtoast answered:

It’s not just you – it looks like something’s broken!  :(  @fandomstatsorg @annathecrow

fandomstatsorg

Yep, it’s broken :/ From what I can tell right now, it seems AO3 now forces https, which breaks an important part of the API logic. I mean, forcing https is good! But, yeah. It broke things for us. 

Unfortunately this might take a while to fix - fetching the data through https is throwing errors and it looks like it might be a platform/library incompatibility issue. *yells at sky*

Thanks for letting us know @everythingbutthekitchensphinx​! Sorry about that. I can’t promise it will be fixed quickly, but I’ll see what I can do. 

fandomstatsorg

The bug is fixed now! Thanks for patience. :)

bugfix status info
destinationtoast

everythingbutthekitchensphinx asked:

I feel stupid having to ask you this question but - I wanted to look at the stats for a small fandom I'm in using fandomstats, but no matter what I enter into the search bar I am told it's a non-canonical tag. Even when I copypaste the canon tag directly from Ao3! I thought maybe my fandom was too small, so I tried entering one of the examples of a canon tag listed on the fandomstats website (Teen Wolf (TV)) and was told it wasn't a canon tag either! What am I doing wrong? ;w;

destinationtoast answered:

It’s not just you – it looks like something’s broken!  :(  @fandomstatsorg @annathecrow

fandomstatsorg

Yep, it’s broken :/ From what I can tell right now, it seems AO3 now forces https, which breaks an important part of the API logic. I mean, forcing https is good! But, yeah. It broke things for us. 

Unfortunately this might take a while to fix - fetching the data through https is throwing errors and it looks like it might be a platform/library incompatibility issue. *yells at sky*

Thanks for letting us know @everythingbutthekitchensphinx​! Sorry about that. I can’t promise it will be fixed quickly, but I’ll see what I can do. 

fandomstats.org fandomstats status update bug reports only apparently... not so much urllib3 is supposed to work on GAE! ugh.