Plotapi, beautiful by default.

Let plotapi do the heavy lifting – enabling beautiful interactive visualisations with a single line of code (instead of hundreds).

Get Plotapi

Desktop Browsers Market Share with Plotapi Pie Fight

Preamble

In [1]:
from plotapi import PieFight
import json

PieFight.set_license("shahin@plotapi.com", "PLOTAPI-B-7ef36302-6439-40ec-8218-9d1e6d9fb0aa")

Introduction

In this notebook we're going to use Plotapi Pie Fight to visualise desktop browser market share over time. We"ll use Python, but Plotapi can be used from any programming language.

Dataset

We're going to use data that has been published by multiple sources for different periods, as there is no single data source that covers everything. These are:

  • 1994 - 1995: GVU WWW user survey
  • 1996 - 1998: EWS Web Server at UIUC
  • 1999 - 2001: WebSideStory
  • 2002 - 2008: OneStat.com
  • 2009-2021: StatCounter

The popup text that describes different events was taken from Wikipedia.

Browsers that did not have significant market share have been grouped and labelled as "Others".

In [2]:
with open("desktop_browsers.json", "r") as f:
    data = json.load(f)
    
samples = data['samples']
nodes = data['nodes']
events = data['events']

Visualisation

Let's use Plotapi Pie Fight for this visualisation, you can see more examples in the Gallery.

In [3]:
PieFight(samples, 
         nodes=nodes,
         events=events,
         rotate=30,
         interval=750,
         event_pause=False,
         event_duration=10000,
         format_current_order="0.2f", 
         value_suffix="%",
         autohide_labels=False).show()

Made with Plotapi

You can create beautiful, interactive, and engaging visualisations like this one in any programming language with Plotapi.

Get the Books

Enjoying these notebooks and want more on the subject? Check out the practical books on Data Science, Visualisation, and Evolutionary Algorithms.

Get the books