Datasets#

The following example tables come with the Plotly package.

import plotly.express as px

carshare#

px.data.carshare().tail(10)
centroid_lat centroid_lon car_hours peak_hour
239 45.570923 -73.577155 898.000000 10
240 45.533611 -73.601066 701.666667 11
241 45.522280 -73.568434 873.166667 21
242 45.570443 -73.525182 235.416667 7
243 45.486260 -73.638602 998.666667 18
244 45.547171 -73.556258 951.416667 3
245 45.546482 -73.574939 795.416667 2
246 45.495523 -73.627725 425.750000 8
247 45.521199 -73.581789 1044.833333 17
248 45.532564 -73.567535 694.916667 5

election#

px.data.election().tail(10)
district Coderre Bergeron Joly total winner result district_id
48 71-Tétreaultville 3694 2589 3454 9737 Coderre plurality 71
49 72-MaisonneuveLongue-Pointe 2746 3250 3139 9135 Bergeron plurality 72
50 73-Hochelaga 1546 3679 2675 7900 Bergeron plurality 73
51 74-Louis-Riel 3509 2178 2338 8025 Coderre plurality 74
52 81-Marie-Clarac 6591 1085 1435 9111 Coderre majority 81
53 82-Ovide-Clermont 6229 780 1051 8060 Coderre majority 82
54 91-Claude-Ryan 996 643 423 2062 Coderre plurality 91
55 92-Joseph-Beaubien 540 833 592 1965 Bergeron plurality 92
56 93-Robert-Bourassa 446 465 419 1330 Bergeron plurality 93
57 94-Jeanne-Sauvé 491 698 489 1678 Bergeron plurality 94

experiment#

px.data.experiment().tail(10)
experiment_1 experiment_2 experiment_3 gender group
90 100.177493 104.673700 73.250996 male treatment
91 108.151672 137.994359 105.054792 female treatment
92 101.320525 105.711291 73.730844 male control
93 99.177558 88.570729 78.655041 female control
94 102.770625 129.002274 52.111122 male treatment
95 108.156964 105.971541 64.524029 female treatment
96 91.739992 111.125377 64.260993 male control
97 95.410347 84.448322 75.505991 female control
98 106.362406 115.522382 123.469689 male treatment
99 94.269237 104.651064 92.387490 female treatment

gapminder#

px.data.gapminder().tail(10)
country continent year lifeExp pop gdpPercap iso_alpha iso_num
1694 Zimbabwe Africa 1962 52.358 4277736 527.272182 ZWE 716
1695 Zimbabwe Africa 1967 53.995 4995432 569.795071 ZWE 716
1696 Zimbabwe Africa 1972 55.635 5861135 799.362176 ZWE 716
1697 Zimbabwe Africa 1977 57.674 6642107 685.587682 ZWE 716
1698 Zimbabwe Africa 1982 60.363 7636524 788.855041 ZWE 716
1699 Zimbabwe Africa 1987 62.351 9216418 706.157306 ZWE 716
1700 Zimbabwe Africa 1992 60.377 10704340 693.420786 ZWE 716
1701 Zimbabwe Africa 1997 46.809 11404948 792.449960 ZWE 716
1702 Zimbabwe Africa 2002 39.989 11926563 672.038623 ZWE 716
1703 Zimbabwe Africa 2007 43.487 12311143 469.709298 ZWE 716

iris#

px.data.iris().tail(10)
sepal_length sepal_width petal_length petal_width species species_id
140 6.7 3.1 5.6 2.4 virginica 3
141 6.9 3.1 5.1 2.3 virginica 3
142 5.8 2.7 5.1 1.9 virginica 3
143 6.8 3.2 5.9 2.3 virginica 3
144 6.7 3.3 5.7 2.5 virginica 3
145 6.7 3.0 5.2 2.3 virginica 3
146 6.3 2.5 5.0 1.9 virginica 3
147 6.5 3.0 5.2 2.0 virginica 3
148 6.2 3.4 5.4 2.3 virginica 3
149 5.9 3.0 5.1 1.8 virginica 3

medals#

px.data.medals_long()
nation medal count
0 South Korea gold 24
1 China gold 10
2 Canada gold 9
3 South Korea silver 13
4 China silver 15
5 Canada silver 12
6 South Korea bronze 11
7 China bronze 8
8 Canada bronze 12
px.data.medals_wide()
nation gold silver bronze
0 South Korea 24 13 11
1 China 10 15 8
2 Canada 9 12 12

stocks#

px.data.stocks().tail(10)
date GOOG AAPL AMZN FB NFLX MSFT
95 2019-10-28 1.155603 1.461829 1.457474 1.036232 1.365827 1.629663
96 2019-11-04 1.189743 1.486514 1.452951 1.021354 1.388495 1.655063
97 2019-11-11 1.211063 1.518629 1.415209 1.044153 1.404972 1.700533
98 2019-11-18 1.175199 1.495886 1.420278 1.064062 1.478547 1.696224
99 2019-11-25 1.183927 1.527143 1.465089 1.079154 1.498452 1.716521
100 2019-12-02 1.216280 1.546914 1.425061 1.075997 1.463641 1.720717
101 2019-12-09 1.222821 1.572286 1.432660 1.038855 1.421496 1.752239
102 2019-12-16 1.224418 1.596800 1.453455 1.104094 1.604362 1.784896
103 2019-12-23 1.226504 1.656000 1.521226 1.113728 1.567170 1.802472
104 2019-12-30 1.213014 1.678000 1.503360 1.098475 1.540883 1.788185

tips#

px.data.tips().tail(10)
total_bill tip sex smoker day time size
234 15.53 3.00 Male Yes Sat Dinner 2
235 10.07 1.25 Male No Sat Dinner 2
236 12.60 1.00 Male Yes Sat Dinner 2
237 32.83 1.17 Male Yes Sat Dinner 2
238 35.83 4.67 Female No Sat Dinner 3
239 29.03 5.92 Male No Sat Dinner 3
240 27.18 2.00 Female Yes Sat Dinner 2
241 22.67 2.00 Male Yes Sat Dinner 2
242 17.82 1.75 Male No Sat Dinner 2
243 18.78 3.00 Female No Thur Dinner 2

wind#

px.data.wind().tail(10)
direction strength frequency
118 SE 6+ 0.05
119 SSE 6+ 0.05
120 S 6+ 0.05
121 SSW 6+ 0.10
122 SW 6+ 0.10
123 WSW 6+ 0.10
124 W 6+ 0.90
125 WNW 6+ 2.20
126 NW 6+ 1.50
127 NNW 6+ 0.20

other data#

Also check out these resources:
https://github.com/plotly/datasets