Data Visualization: Representing Information on Modern Web by Andy Kirk & Simon Timms & Andrew Rininsland & Swizec Teller
Author:Andy Kirk & Simon Timms & Andrew Rininsland & Swizec Teller [Kirk, Andy]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2016-09-30T04:00:00+00:00
Many of the questions on Stack Overflow have a large number of answers. The site is not optimized to show the latest answers; the answers are ranked by being the most accepted answer then randomly. This is done to give all answers a chance at being shown near the top which should, in theory, encourage people to vote for the best answer instead of just the first answer shown.
For this visualization, I would like to show how a question has been answered over time. Are more recent answers likely to get a higher score? Is the first answer always the best?
Let's start by pulling down the data for an individual question which has a large number of answers. To do this, we'll make use of the questions API. All of the API endpoints are hosted on https://api.stackexchange.com. We're going to make use of the latest API which is Version 2.1. This is also encoded into the URI, as is the specific endpoint and the ID. Within the question API, we're interested in the answers, so we can query specifically for them, giving us a URI of https://api.stackexchange.com/2.1/questions/{id}/answers.
In the query string, we'll specify the site against which we want to query. Stack Exchange hosts several dozen question and answer sites modeled on Stack Overflow, all of which are served from the same API endpoint, so it is necessary to filter just for Stack Overflow by passing in site=stackoverflow:
function retrieveQuestionAnswers(id){ var page = 1; var has_more = true; var results = []; while(has_more) { $.ajax(https://api.stackexchange.com/2.1/questions/ + id + "/answers?site=stackoverflow&page=" + page,{ success: function(json){ has_more = json.has_more; results = results.concat(json.items);}, failure: function() { has_more = false;}, async: false }); page++; } return results; }
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Mikado Method by Ola Ellnestam Daniel Brolund(26410)
Hello! Python by Anthony Briggs(25319)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(24560)
Kotlin in Action by Dmitry Jemerov(23644)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(22981)
Dependency Injection in .NET by Mark Seemann(22768)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(21518)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(20370)
Grails in Action by Glen Smith Peter Ledbrook(19427)
Adobe Camera Raw For Digital Photographers Only by Rob Sheppard(17056)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(16424)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(14112)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(12296)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(11571)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10645)
Hit Refresh by Satya Nadella(9223)
The Kubernetes Operator Framework Book by Michael Dame(8579)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8432)
Robo-Advisor with Python by Aki Ranin(8376)