Responsive Stacked Area Chart

In [41]:
from verticapy import *

world_pop = tablesample({"date": [1900, 1950, 2000],
                         "Asia": [947, 1402, 3634],
                         "Africa": [133, 221, 767],
                         "Europe": [408, 547, 729], 
                         "America": [156, 339, 818],
                         "Oceania": [6, 13, 30],}).to_vdf()
world_pop.hchart(x = "date",
                 y = ["Asia", "Africa", "Europe"],
                 kind = "area")
Out[41]:
In [ ]:
%load_ext verticapy.vCharts
In [42]:
%%vCharts -type area
SELECT
    date,
    Asia,
    Africa,
    Europe
FROM
((SELECT 1900 AS "date", 947 AS "Asia", 133 AS "Africa", 408 AS "Europe", 156 AS "America", 6 AS "Oceania") 
UNION ALL 
(SELECT 1950 AS "date", 1402 AS "Asia", 221 AS "Africa", 547 AS "Europe", 339 AS "America", 13 AS "Oceania") 
UNION ALL 
(SELECT 2000 AS "date", 3634 AS "Asia", 767 AS "Africa", 729 AS "Europe", 818 AS "America", 30 AS "Oceania")) x
Execution: 0.171s
Out[42]: