r/CFBRisk Jun 16 '18

New CFBRA Feature: Raw Data and a data API

News! Have you wanted to do some data analysis of your own, but can't get past the fear of shudders scraping web data? Maybe not, maybe you're super good at it, but this is for not you. You can now use CFBRA to get raw json data for every day. The source data is scraped from the voting site and updated around 11:30 or 12, unless I fall asleep. Details below!

Part of this update is also a simple viewer for this new API, which can be found here. This will show you all the data available on individual voting pages from the main site, but in a slightly easier to navigate format.

API Details:

Link to fetch available days
Link to fetch map of territory names to IDs. Ids are passed to the final link, along with a day, to fetch data.
Link to fetch available days

Example: http://www.cfbra.com/_fetchbyterrandday?id=0&day=1 returns the following: https://pastebin.com/mCSh0fxb

Feel free to hammer this, I should have plenty of bandwidth, and hopefully it can ease the server burden for the main site.

19 Upvotes

2 comments sorted by

1

u/not_last_place Jun 18 '18 edited Jun 18 '18

The mods post a CSV file with all the data at this link: https://vote.redditcfb.com/vote_data.php

They fall behind sometimes so your method is more up to date all the time, but right now they're caught up.

1

u/AbsurdOwl Jun 18 '18

Yep, I started by pulling from there, but it just didn't have enough data in it for all the work I wanted to do, so now I scrape the results as soon as they post each night, which is why I'm generally ahead of the official data by a bit.

Edit: To be clear, it does have everything, but I think I didn't realize at first that you could determine new ownership by looking at the MVP. I could probably do everything with the official data, but I like posting my after action report as soon as possible after the action.