├── .gitignore ├── README.md ├── data └── recent_arrivals.csv ├── docs ├── .ipynb_checkpoints │ └── outline-checkpoint.md ├── draft.md └── outline.md ├── images └── figures │ ├── excel.png │ ├── figure-1.png │ ├── figure-2.png │ ├── fivethirtyeight.png │ ├── ggplot2.png │ ├── urban_areachart-sequential.png │ ├── urban_areachart.png │ ├── urban_barchart.png │ ├── urban_chart-parts-02.png │ ├── urban_linechart.png │ └── vox.png └── notebooks ├── 00 available_themes.ipynb ├── 000 importing packages.ipynb ├── 01 urban theme.ipynb ├── excel_theme.py ├── fivethirtyeight_theme.py ├── ggplot2_theme.py ├── theme.py ├── urban_theme.py └── vox_theme.py /.gitignore: -------------------------------------------------------------------------------- 1 | .ipynb_checkpoints/ 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # altair_themes_blog 2 | this repo contains the draft, images, and code for the [Medium blog post on altair themes](https://towardsdatascience.com/consistently-beautiful-visualizations-with-altair-themes-c7f9f889602). 3 | 4 | Learn about themes in Altair by recreating the Urban Institute's style (from their [Data Visualization Style Guide](http://urbaninstitute.github.io/graphics-styleguide/) 5 | 6 | There are some styles Vega already has put together: 7 | 8 | ##### fivethirtyeight 9 | ![FIG 538](images/figures/fivethirtyeight.png) 10 | ##### excel 11 | ![FIG excel](images/figures/excel.png) 12 | ##### ggplot2 13 | ![FIG ggplot2](images/figures/ggplot2.png) 14 | ##### vox 15 | ![FIG vox](images/figures/vox.png) 16 | 17 | Learn to create these: 18 | 19 | #### Bar Chart 20 | ![bar_chart](images/figures/urban_barchart.png) 21 | 22 | #### Area Chart (categorical) 23 | ![area_chart](images/figures/urban_areachart.png) 24 | 25 | #### Area Chart (sequential) 26 | ![area_chart2](images/figures/urban_areachart-sequential.png) 27 | 28 | #### Line Chart 29 | ![line_chart](images/figures/urban_linechart.png) 30 | -------------------------------------------------------------------------------- /docs/.ipynb_checkpoints/outline-checkpoint.md: -------------------------------------------------------------------------------- 1 | # Altair Themes 2 | ## Consistent, Beautiful, Reproducible Visualizations 3 | 4 | ##### Main takeaways: 5 | * What are Altair Themes? 6 | * What themes are available? 7 | * Extending those themes to something you like 8 | * Other resources: 9 | - Viz Palette 10 | - https://htmlcolorcodes.com/color-picker/ 11 | - https://encycolorpedia.com/ 12 | - https://www.colorhexa.com/ 13 | - https://coolors.co/ 14 | - http://colormind.io/ 15 | - https://public.tableau.com/profile/neil.richards#!/vizhome/colours_2/100colours?publish=yes // https://www.canva.com/learn/100-color-combinations/ 16 | 17 | 18 | 19 | ##### Sections: 20 | - Intro 21 | - What are altair themes. Maybe quick rundown of what Altair is. 22 | - Why should we care? Reproducibility of visualizations isn't that important ? Consistency in your work. Company-related themes (Maybe recreate Urban Institute's). Personal branding (i.e. your blog). 23 | 24 | - What themes are available 25 | - How do those themes look like visually and programmatically. 26 | - excel, fivethirtyeight, ggplot, vox, quartz, 27 | 28 | - Extending those into something you want 29 | - Cimarron theme or recreate Urban Institute's 30 | 31 | - Extra resources for the color picking. Embed this with Cimarron theme? -------------------------------------------------------------------------------- /docs/draft.md: -------------------------------------------------------------------------------- 1 | # Consistently beautiful visualizations with `altair` themes 2 | 3 | If you are a data visualization fan or practitioner that also uses `python` you may have heard of Jake Vanderplas and Brian Granger's `altair`: _"a declarative statistical visualization library for Python, based on Vega and Vega-lite"_. 4 | 5 | > _With Altair, you can spend more time understanding your data and its meaning. Altair’s API is simple, friendly and consistent and built on top of the powerful Vega-Lite visualization grammar. This elegant simplicity produces beautiful and effective visualizations with a minimal amount of code._ 6 | 7 | If you haven't, you should check out Jake Vanderplas' 2018 PyCon tutorial: https://www.youtube.com/watch?v=ms29ZPUKxbU 8 | 9 | *** 10 | In this piece we'll be digging deeper into one of `altair`'s less known features: themes. 11 | 12 | ### What are `altair` themes? 13 | 14 | A theme, in `altair`, is a set of chart configurations applied globally each `python` session. This means you can produce similar-looking visualizations consistently. 15 | 16 | ### Why would that be useful? 17 | 18 | Maybe you are working on developing a personal style for your blog or maybe you are part of a company that already has a style in place or maybe you hate gridlines and are tired of turning them off every single time you create a chart. 19 | Having a styleguide to follow is always a benefit when you are producing data visualizations. 20 | 21 | Rather than explaining the value of styleguides and consistency in your visualizations, in this article we will explore how to implement one in `altair` by coding the [Urban Institute's Data Visualization Styleguide](http://urbaninstitute.github.io/graphics-styleguide/). 22 | 23 | ### Themes in `altair` 24 | 25 | > _A theme is simply a function that returns a dictionary of default values to be added to the chart specification at rendering time, which is then registered and activated._ 26 | 27 | Here's a simple example from the docs: 28 | ```python 29 | import altair as alt 30 | from vega_datasets import data 31 | 32 | # define the theme by returning the dictionary of configurations 33 | def black_marks(): 34 | return { 35 | 'config': { 36 | 'view': { 37 | 'height': 300, 38 | 'width': 400, 39 | }, 40 | 'mark': { 41 | 'color': 'black', 42 | 'fill': 'black' 43 | } 44 | } 45 | } 46 | 47 | # register the custom theme under a chosen name 48 | alt.themes.register('black_marks', black_marks) 49 | 50 | # enable the newly registered theme 51 | alt.themes.enable('black_marks') 52 | 53 | # draw the chart 54 | cars = data.cars.url 55 | alt.Chart(cars).mark_point().encode( 56 | x='Horsepower:Q', 57 | y='Miles_per_Gallon:Q' 58 | ) 59 | ``` 60 | 61 | `height` and `width` remained the same as the default theme but we have now included `color` and `fill` values to be applied __globally__ (unless otherwise specified) to any charts generated from this point until the end of __this__ `python` session. 62 | 63 | This would be the equivalent of 64 | ```python 65 | alt.Chart(cars).mark_point(color = 'black', fill = 'black').encode( 66 | x='Horsepower:Q', 67 | y='Miles_per_Gallon:Q' 68 | ) 69 | ``` 70 | ![FIG 2](../images/figures/figure-1.png) 71 | 72 | in the `black_marks` `config` dictionary returned you can see that we specified the value `black` for the keys `color` and `fill` in `mark`. This is the format all these specifications follow. For example, if you wanted to configure the left axis' label's font size: 73 | ```python 74 | def my_theme(): 75 | return { 76 | 'config': { 77 | 'view': { 78 | 'height': 300, 79 | 'width': 400, 80 | }, 81 | 'mark': { 82 | 'color': 'black', 83 | 'fill': '#000000', 84 | }, 85 | 'axisLeft': { 86 | 'labelFontSize': 30, 87 | }, 88 | } 89 | } 90 | 91 | # register the custom theme under a chosen name 92 | alt.themes.register('my_theme', my_theme) 93 | 94 | # enable the newly registered theme 95 | alt.themes.enable('my_theme') 96 | ``` 97 | ![FIG 2](../images/figures/figure-2.png) 98 | 99 | (side note: you can get these ___specifications___ (i.e. `'axisLeft'`) from [Vega-Lite's documentation](https://vega.github.io/vega-lite/docs/config.html.) 100 | 101 | This can be particularly useful if you or your company have a styleguide you have to follow. 102 | If you don't have a styleguide you can start building one by saving your configurations on your personal theme rather than in your viz code (it pays off long-term!). 103 | 104 | Vega already has some [themes on GitHub](https://github.com/vega/vega-themes/tree/master/src). 105 | 106 | #### fivethirtyeight 107 | ![FIG 538](../images/figures/fivethirtyeight.png) 108 | #### excel 109 | ![FIG excel](../images/figures/excel.png) 110 | #### ggplot2 111 | ![FIG ggplot2](../images/figures/ggplot2.png) 112 | #### vox 113 | ![FIG vox](../images/figures/vox.png) 114 | *** 115 | 116 | All the information for this ___simplified___ version of Urban Institute's style can be found in this graphic from their GitHub page. 117 | 118 | ![urban_chart-parts](../images/figures/urban_chart-parts-02.png) 119 | 120 | *** 121 | 122 | So let's build a simplified Urban Institute's `altair` theme. 123 | 124 | The basic anatomy of the theme is as follows: 125 | 126 | ```python 127 | def theme_name(): 128 | 129 | return { 130 | "config": { 131 | "TOPLEVELOBJECT": { # i.e. "title", "axisX", "legend", 132 | "CONFIGURATION": "VALUE", 133 | "ANOTHER_ONE": "ANOTHER_VALUE", 134 | "MAYBE_A_SIZE": 14, # values can be a string, boolean, or number, 135 | }, 136 | "ANOTHER_OBJECT": { 137 | "CONFIGURATION": "VALUE", 138 | } 139 | } 140 | } 141 | ``` 142 | 143 | We will configure the top-level objects "title", "axisX", "axisY", "range", and "legend", plus a few other one-liner specifications. ("range" would be the color-scheme) 144 | 145 | Now, off the bat we saw that Urban uses the "Lato" font on all text so we can save that as a variable so we don't have to reuse it. 146 | 147 | 1. "title" 148 | 149 | Titles at Urban are 18px in size, Lato font, left-aligned, black. 150 | 151 | ```python 152 | def urban_theme(): 153 | font = "Lato" 154 | 155 | return { 156 | "config": { 157 | "title": { 158 | "fontSize": 18, 159 | "font": font, 160 | "anchor": "start", # equivalent of left-aligned. 161 | "fontColor": "#000000" 162 | } 163 | } 164 | } 165 | ``` 166 | 167 | At this point you could _register_ and _enable_ this theme and all your `altair` charts in this `python` session would have an Urban-Institute-looking title. 168 | 169 | #### SIDE-NOTE 170 | If you do not have "Lato" font installed in your computer you can run this code in a cell to import it to your browser from Google Fonts for the time being. 171 | ```python 172 | %%html 173 | 176 | ``` 177 | 178 | 179 | 2. "axisX" and "axisY" 180 | 181 | At Urban the X-axis and Y-axis differ slightly. X-axes have what in `altair` is referred to as _domain_, the line that runs across the axis. Y-axes do not have this (similar to `seaborn`'s `sns.despine()`). Y-axes have gridlines, X-axes do not. X-axes have ticks, Y-axes do not. But both have same-size labels and titles. 182 | 183 | 184 | ```python 185 | def urban_theme(): 186 | # Typography 187 | font = "Lato" 188 | # At Urban it's the same font for all text but it's good to keep them separate in case you want to change one later. 189 | labelFont = "Lato" 190 | sourceFont = "Lato" 191 | 192 | # Axes 193 | axisColor = "#000000" 194 | gridColor = "#DEDDDD" 195 | 196 | return { 197 | "config": { 198 | "title": { 199 | "fontSize": 18, 200 | "font": font, 201 | "anchor": "start", # equivalent of left-aligned. 202 | "fontColor": "#000000" 203 | }, 204 | "axisX": { 205 | "domain": True, 206 | "domainColor": axisColor, 207 | "domainWidth": 1, 208 | "grid": False, 209 | "labelFont": labelFont, 210 | "labelFontSize": 12, 211 | "labelAngle": 0, 212 | "tickColor": axisColor, 213 | "tickSize": 5, # default, including it just to show you can change it 214 | "titleFont": font, 215 | "titleFontSize": 12, 216 | "titlePadding": 10, # guessing, not specified in styleguide 217 | "title": "X Axis Title (units)", 218 | }, 219 | "axisY": { 220 | "domain": False, 221 | "grid": True, 222 | "gridColor": gridColor, 223 | "gridWidth": 1, 224 | "labelFont": labelFont, 225 | "labelFontSize": 12, 226 | "labelAngle": 0, 227 | "ticks": False, # even if you don't have a "domain" you need to turn these off. 228 | "titleFont": font, 229 | "titleFontSize": 12, 230 | "titlePadding": 10, # guessing, not specified in styleguide 231 | "title": "Y Axis Title (units)", 232 | # titles are by default vertical left of axis so we need to hack this 233 | "titleAngle": 0, # horizontal 234 | "titleY": -10, # move it up 235 | "titleX": 18, # move it to the right so it aligns with the labels 236 | }, 237 | 238 | } 239 | } 240 | ``` 241 | 242 | If you _register_ed and _enable_d this theme you'd have something that kinda, sorta, looks like an Urban Institute's chart. But what lets you know right away that you are looking at an Urban Institute's data visualization is the colors. 243 | 244 | ```python 245 | # register 246 | alt.themes.register("my_custom_theme", urban_theme) 247 | # enable 248 | alt.themes.enable("my_custom_theme") 249 | ``` 250 | 251 | In `altair`, you have `scales` with `domain` and `range`. These are "_functions that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels._" So if you want to add a default color scheme all you have to do is encode in your theme the values for the top-level object `"range"`. 252 | 253 | We'll save the values as a list `main_palette` and `sequential_palette`. The Urban Institute's Data Visualization Styleguide has __a lot__ of color combinations. We will encode these two as defaults but when it comes to colors you will most likely end up modifying your data visualization on the go. 254 | 255 | ```python 256 | def urban_theme(): 257 | # Typography 258 | font = "Lato" 259 | # At Urban it's the same font for all text but it's good to keep them separate in case you want to change one later. 260 | labelFont = "Lato" 261 | sourceFont = "Lato" 262 | 263 | # Axes 264 | axisColor = "#000000" 265 | gridColor = "#DEDDDD" 266 | 267 | # Colors 268 | main_palette = ["#1696d2", 269 | "#d2d2d2", 270 | "#000000", 271 | "#fdbf11", 272 | "#ec008b", 273 | "#55b748", 274 | "#5c5859", 275 | "#db2b27", 276 | ] 277 | sequential_palette = ["#cfe8f3", 278 | "#a2d4ec", 279 | "#73bfe2", 280 | "#46abdb", 281 | "#1696d2", 282 | "#12719e", 283 | ] 284 | 285 | return { 286 | "config": { 287 | "title": { 288 | "fontSize": 18, 289 | "font": font, 290 | "anchor": "start", # equivalent of left-aligned. 291 | "fontColor": "#000000" 292 | }, 293 | "axisX": { 294 | "domain": True, 295 | "domainColor": axisColor, 296 | "domainWidth": 1, 297 | "grid": False, 298 | "labelFont": labelFont, 299 | "labelFontSize": 12, 300 | "labelAngle": 0, 301 | "tickColor": axisColor, 302 | "tickSize": 5, # default, including it just to show you can change it 303 | "titleFont": font, 304 | "titleFontSize": 12, 305 | "titlePadding": 10, # guessing, not specified in styleguide 306 | "title": "X Axis Title (units)", 307 | }, 308 | "axisY": { 309 | "domain": False, 310 | "grid": True, 311 | "gridColor": gridColor, 312 | "gridWidth": 1, 313 | "labelFont": labelFont, 314 | "labelFontSize": 12, 315 | "labelAngle": 0, 316 | "ticks": False, # even if you don't have a "domain" you need to turn these off. 317 | "titleFont": font, 318 | "titleFontSize": 12, 319 | "titlePadding": 10, # guessing, not specified in styleguide 320 | "title": "Y Axis Title (units)", 321 | # titles are by default vertical left of axis so we need to hack this 322 | "titleAngle": 0, # horizontal 323 | "titleY": -10, # move it up 324 | "titleX": 18, # move it to the right so it aligns with the labels 325 | }, 326 | "range": { 327 | "category": main_palette, 328 | "diverging": sequential_palette, 329 | } 330 | 331 | } 332 | } 333 | ``` 334 | 335 | At this point, your theme will have the Urban Institute's title, axes, and color configurations by default. Pretty cool but that's not all you can do. 336 | 337 | Let's add a default legend configuration. 338 | This time we'll stray away from the styleguide a little because the position of the legend depends on the chart at hand (and you can't have a horizontal legend in vega-lite). 339 | 340 | This code also includes "view" and "background" configurations which are easy to follow without much explanation. It also includes the configurations for "area", "line", "trail", "bar", "point", and other marks. This is just setting up the colors right for each specific mark. 341 | 342 | ```python 343 | def urban_theme(): 344 | # Typography 345 | font = "Lato" 346 | # At Urban it's the same font for all text but it's good to keep them separate in case you want to change one later. 347 | labelFont = "Lato" 348 | sourceFont = "Lato" 349 | 350 | # Axes 351 | axisColor = "#000000" 352 | gridColor = "#DEDDDD" 353 | 354 | # Colors 355 | main_palette = ["#1696d2", 356 | "#d2d2d2", 357 | "#000000", 358 | "#fdbf11", 359 | "#ec008b", 360 | "#55b748", 361 | "#5c5859", 362 | "#db2b27", 363 | ] 364 | sequential_palette = ["#cfe8f3", 365 | "#a2d4ec", 366 | "#73bfe2", 367 | "#46abdb", 368 | "#1696d2", 369 | "#12719e", 370 | ] 371 | 372 | return { 373 | # width and height are configured outside the config dict because they are Chart configurations/properties not chart-elements' configurations/properties. 374 | "width": 685, # from the guide 375 | "height": 380, # not in the guide 376 | "config": { 377 | "title": { 378 | "fontSize": 18, 379 | "font": font, 380 | "anchor": "start", # equivalent of left-aligned. 381 | "fontColor": "#000000" 382 | }, 383 | "axisX": { 384 | "domain": True, 385 | "domainColor": axisColor, 386 | "domainWidth": 1, 387 | "grid": False, 388 | "labelFont": labelFont, 389 | "labelFontSize": 12, 390 | "labelAngle": 0, 391 | "tickColor": axisColor, 392 | "tickSize": 5, # default, including it just to show you can change it 393 | "titleFont": font, 394 | "titleFontSize": 12, 395 | "titlePadding": 10, # guessing, not specified in styleguide 396 | "title": "X Axis Title (units)", 397 | }, 398 | "axisY": { 399 | "domain": False, 400 | "grid": True, 401 | "gridColor": gridColor, 402 | "gridWidth": 1, 403 | "labelFont": labelFont, 404 | "labelFontSize": 12, 405 | "labelAngle": 0, 406 | "ticks": False, # even if you don't have a "domain" you need to turn these off. 407 | "titleFont": font, 408 | "titleFontSize": 12, 409 | "titlePadding": 10, # guessing, not specified in styleguide 410 | "title": "Y Axis Title (units)", 411 | # titles are by default vertical left of axis so we need to hack this 412 | "titleAngle": 0, # horizontal 413 | "titleY": -10, # move it up 414 | "titleX": 18, # move it to the right so it aligns with the labels 415 | }, 416 | "range": { 417 | "category": main_palette, 418 | "diverging": sequential_palette, 419 | }, 420 | "legend": { 421 | "labelFont": labelFont, 422 | "labelFontSize": 12, 423 | "symbolType": "square", # just 'cause 424 | "symbolSize": 100, # default 425 | "titleFont": font, 426 | "titleFontSize": 12, 427 | "title": "", # set it to no-title by default 428 | "orient": "top-left", # so it's right next to the y-axis 429 | "offset": 0, # literally right next to the y-axis. 430 | }, 431 | "view": { 432 | "stroke": "transparent", # altair uses gridlines to box the area where the data is visualized. This takes that off. 433 | }, 434 | "background": { 435 | "color": "#FFFFFF", # white rather than transparent 436 | }, 437 | ### MARKS CONFIGURATIONS ### 438 | "area": { 439 | "fill": markColor, 440 | }, 441 | "line": { 442 | "color": markColor, 443 | "stroke": markColor, 444 | "strokewidth": 5, 445 | }, 446 | "trail": { 447 | "color": markColor, 448 | "stroke": markColor, 449 | "strokeWidth": 0, 450 | "size": 1, 451 | }, 452 | "path": { 453 | "stroke": markColor, 454 | "strokeWidth": 0.5, 455 | }, 456 | "point": { 457 | "filled": True, 458 | }, 459 | "text": { 460 | "font": sourceFont, 461 | "color": markColor, 462 | "fontSize": 11, 463 | "align": "right", 464 | "fontWeight": 400, 465 | "size": 11, 466 | }, 467 | "bar": { 468 | "size": 40, 469 | "binSpacing": 1, 470 | "continuousBandSize": 30, 471 | "discreteBandSize": 30, 472 | "fill": markColor, 473 | "stroke": False, 474 | }, 475 | 476 | } 477 | } 478 | ``` 479 | 480 | 481 | #### SIDE NOTE 482 | I personally save these themes in a `.py` script with 483 | ```python 484 | import altair as alt 485 | alt.themes.register("my_custom_theme", urban_theme) 486 | alt.themes.enable("my_custom_theme") 487 | ``` 488 | at the end and just `%run theme.py` in my jupyter notebook. 489 | 490 | *** 491 | Here are some examples of charts created with that theme. 492 | 493 | #### Bar Chart 494 | ![bar_chart](../images/figures/urban_barchart.png) 495 | 496 | #### Area Chart (categorical) 497 | ![area_chart](../images/figures/urban_areachart.png) 498 | 499 | #### Area Chart (sequential) 500 | ![area_chart2](../images/figures/urban_areachart-sequential.png) 501 | 502 | #### Line Chart 503 | ![line_chart](../images/figures/urban_linechart.png) 504 | 505 | *** 506 | 507 | There are __a lot__ of ways to configure your theme and I would encourage you to try many different things. You can take this theme we just put together and play around with the values. Use a different font, font size, color-scheme. Have gridlines, don't have gridlines. Have really, really, big labels for your axes. Do whatever you want but save it somewhere so you can build on it and grow your personal style. 508 | 509 | While you may want to look up more on this in the `altair` documentation, I find it better to use the [Vega-lite](https://vega.github.io/vega-lite/docs/config.html) documentation. After all, `altair` is a python-wrapper for vega-lite. 510 | -------------------------------------------------------------------------------- /docs/outline.md: -------------------------------------------------------------------------------- 1 | # Altair Themes 2 | ## Consistent, Beautiful, Reproducible Visualizations 3 | 4 | ##### Main takeaways: 5 | * What are Altair Themes? 6 | * What themes are available? 7 | * Extending those themes to something you like 8 | * Other resources: 9 | - Viz Palette 10 | - https://htmlcolorcodes.com/color-picker/ 11 | - https://encycolorpedia.com/ 12 | - https://www.colorhexa.com/ 13 | - https://coolors.co/ 14 | - http://colormind.io/ 15 | - https://public.tableau.com/profile/neil.richards#!/vizhome/colours_2/100colours?publish=yes // https://www.canva.com/learn/100-color-combinations/ 16 | 17 | 18 | 19 | ##### Sections: 20 | - Intro 21 | - What are altair themes. Maybe quick rundown of what Altair is. 22 | - Why should we care? Reproducibility of visualizations isn't that important ? Consistency in your work. Company-related themes (Maybe recreate Urban Institute's). Personal branding (i.e. your blog). 23 | 24 | - What themes are available 25 | - How do those themes look like visually and programmatically. 26 | - excel, fivethirtyeight, ggplot, vox, quartz, 27 | 28 | - Extending those into something you want 29 | - Cimarron theme or recreate Urban Institute's 30 | 31 | - Extra resources for the color picking. Embed this with Cimarron theme? -------------------------------------------------------------------------------- /images/figures/excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chekos/altair_themes_blog/6f7cc709d7c05a585a64aa25390394dcc752219a/images/figures/excel.png -------------------------------------------------------------------------------- /images/figures/figure-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chekos/altair_themes_blog/6f7cc709d7c05a585a64aa25390394dcc752219a/images/figures/figure-1.png -------------------------------------------------------------------------------- /images/figures/figure-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chekos/altair_themes_blog/6f7cc709d7c05a585a64aa25390394dcc752219a/images/figures/figure-2.png -------------------------------------------------------------------------------- /images/figures/fivethirtyeight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chekos/altair_themes_blog/6f7cc709d7c05a585a64aa25390394dcc752219a/images/figures/fivethirtyeight.png -------------------------------------------------------------------------------- /images/figures/ggplot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chekos/altair_themes_blog/6f7cc709d7c05a585a64aa25390394dcc752219a/images/figures/ggplot2.png -------------------------------------------------------------------------------- /images/figures/urban_areachart-sequential.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chekos/altair_themes_blog/6f7cc709d7c05a585a64aa25390394dcc752219a/images/figures/urban_areachart-sequential.png -------------------------------------------------------------------------------- /images/figures/urban_areachart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chekos/altair_themes_blog/6f7cc709d7c05a585a64aa25390394dcc752219a/images/figures/urban_areachart.png -------------------------------------------------------------------------------- /images/figures/urban_barchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chekos/altair_themes_blog/6f7cc709d7c05a585a64aa25390394dcc752219a/images/figures/urban_barchart.png -------------------------------------------------------------------------------- /images/figures/urban_chart-parts-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chekos/altair_themes_blog/6f7cc709d7c05a585a64aa25390394dcc752219a/images/figures/urban_chart-parts-02.png -------------------------------------------------------------------------------- /images/figures/urban_linechart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chekos/altair_themes_blog/6f7cc709d7c05a585a64aa25390394dcc752219a/images/figures/urban_linechart.png -------------------------------------------------------------------------------- /images/figures/vox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chekos/altair_themes_blog/6f7cc709d7c05a585a64aa25390394dcc752219a/images/figures/vox.png -------------------------------------------------------------------------------- /notebooks/00 available_themes.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import pandas.util.testing as tm\n", 10 | "import pandas as pd" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": 9, 16 | "metadata": {}, 17 | "outputs": [ 18 | { 19 | "data": { 20 | "text/html": [ 21 | "
\n", 22 | "\n", 35 | "\n", 36 | " \n", 37 | " \n", 38 | " \n", 39 | " \n", 40 | " \n", 41 | " \n", 42 | " \n", 43 | " \n", 44 | " \n", 45 | " \n", 46 | " \n", 47 | " \n", 48 | " \n", 49 | " \n", 50 | " \n", 51 | " \n", 52 | " \n", 53 | " \n", 54 | " \n", 55 | " \n", 56 | " \n", 57 | " \n", 58 | " \n", 59 | " \n", 60 | " \n", 61 | " \n", 62 | " \n", 63 | " \n", 64 | " \n", 65 | " \n", 66 | " \n", 67 | " \n", 68 | " \n", 69 | " \n", 70 | " \n", 71 | " \n", 72 | " \n", 73 | " \n", 74 | " \n", 75 | " \n", 76 | " \n", 77 | " \n", 78 | " \n", 79 | " \n", 80 | " \n", 81 | " \n", 82 | "
ABCD
dGeUbEyP1W-0.461027-0.177949-1.303511-0.104785
EfJyRroeB0-0.636734-0.1912580.367253-1.051841
ICQMisBTWs0.8774121.2870710.154317-0.064700
mfD0zMRObm0.038259-0.512569-0.120507-0.873617
o7VRpUxooa0.1653420.448131-1.0012850.318463
\n", 83 | "
" 84 | ], 85 | "text/plain": [ 86 | " A B C D\n", 87 | "dGeUbEyP1W -0.461027 -0.177949 -1.303511 -0.104785\n", 88 | "EfJyRroeB0 -0.636734 -0.191258 0.367253 -1.051841\n", 89 | "ICQMisBTWs 0.877412 1.287071 0.154317 -0.064700\n", 90 | "mfD0zMRObm 0.038259 -0.512569 -0.120507 -0.873617\n", 91 | "o7VRpUxooa 0.165342 0.448131 -1.001285 0.318463" 92 | ] 93 | }, 94 | "execution_count": 9, 95 | "metadata": {}, 96 | "output_type": "execute_result" 97 | } 98 | ], 99 | "source": [ 100 | "df = tm.makeDataFrame()\n", 101 | "\n", 102 | "df.head()" 103 | ] 104 | }, 105 | { 106 | "cell_type": "code", 107 | "execution_count": 10, 108 | "metadata": {}, 109 | "outputs": [], 110 | "source": [ 111 | "df = df.melt()" 112 | ] 113 | }, 114 | { 115 | "cell_type": "code", 116 | "execution_count": 4, 117 | "metadata": {}, 118 | "outputs": [], 119 | "source": [ 120 | "import altair as alt" 121 | ] 122 | }, 123 | { 124 | "cell_type": "code", 125 | "execution_count": 12, 126 | "metadata": {}, 127 | "outputs": [ 128 | { 129 | "data": { 130 | "application/vnd.vegalite.v2+json": { 131 | "$schema": "https://vega.github.io/schema/vega-lite/v2.6.0.json", 132 | "config": { 133 | "view": { 134 | "height": 300, 135 | "width": 400 136 | } 137 | }, 138 | "data": { 139 | "name": "data-efb252e7c57bdc7da8542a41b9a92119" 140 | }, 141 | "datasets": { 142 | "data-efb252e7c57bdc7da8542a41b9a92119": [ 143 | { 144 | "value": -0.4610270322439197, 145 | "variable": "A" 146 | }, 147 | { 148 | "value": -0.6367343500532895, 149 | "variable": "A" 150 | }, 151 | { 152 | "value": 0.8774120795620142, 153 | "variable": "A" 154 | }, 155 | { 156 | "value": 0.03825863022523785, 157 | "variable": "A" 158 | }, 159 | { 160 | "value": 0.16534228478558757, 161 | "variable": "A" 162 | }, 163 | { 164 | "value": -1.2817002072378272, 165 | "variable": "A" 166 | }, 167 | { 168 | "value": -1.085245037265318, 169 | "variable": "A" 170 | }, 171 | { 172 | "value": -0.27755227699130036, 173 | "variable": "A" 174 | }, 175 | { 176 | "value": 1.3989583501573215, 177 | "variable": "A" 178 | }, 179 | { 180 | "value": 0.19046818945796665, 181 | "variable": "A" 182 | }, 183 | { 184 | "value": 0.19428312561992822, 185 | "variable": "A" 186 | }, 187 | { 188 | "value": -0.5676233531129963, 189 | "variable": "A" 190 | }, 191 | { 192 | "value": 0.500890590982962, 193 | "variable": "A" 194 | }, 195 | { 196 | "value": -1.3855716484122758, 197 | "variable": "A" 198 | }, 199 | { 200 | "value": -1.2546423680851004, 201 | "variable": "A" 202 | }, 203 | { 204 | "value": -0.3357912900788574, 205 | "variable": "A" 206 | }, 207 | { 208 | "value": -0.2205733984715034, 209 | "variable": "A" 210 | }, 211 | { 212 | "value": -0.38340036433532537, 213 | "variable": "A" 214 | }, 215 | { 216 | "value": 0.6614906436722245, 217 | "variable": "A" 218 | }, 219 | { 220 | "value": -0.16313042252515567, 221 | "variable": "A" 222 | }, 223 | { 224 | "value": -0.0247512080682622, 225 | "variable": "A" 226 | }, 227 | { 228 | "value": 0.4582047341126467, 229 | "variable": "A" 230 | }, 231 | { 232 | "value": 0.7640931522868072, 233 | "variable": "A" 234 | }, 235 | { 236 | "value": 0.13934191383325467, 237 | "variable": "A" 238 | }, 239 | { 240 | "value": -2.595368819795762, 241 | "variable": "A" 242 | }, 243 | { 244 | "value": 1.1469702483563833, 245 | "variable": "A" 246 | }, 247 | { 248 | "value": 0.1569965665258978, 249 | "variable": "A" 250 | }, 251 | { 252 | "value": 1.2727001883205376, 253 | "variable": "A" 254 | }, 255 | { 256 | "value": 1.022066496022976, 257 | "variable": "A" 258 | }, 259 | { 260 | "value": 1.9412742747244585, 261 | "variable": "A" 262 | }, 263 | { 264 | "value": -0.17794910128507585, 265 | "variable": "B" 266 | }, 267 | { 268 | "value": -0.19125848427380304, 269 | "variable": "B" 270 | }, 271 | { 272 | "value": 1.2870713074028026, 273 | "variable": "B" 274 | }, 275 | { 276 | "value": -0.5125688683310612, 277 | "variable": "B" 278 | }, 279 | { 280 | "value": 0.4481312599603682, 281 | "variable": "B" 282 | }, 283 | { 284 | "value": 0.6524434972811275, 285 | "variable": "B" 286 | }, 287 | { 288 | "value": 0.13585646332755005, 289 | "variable": "B" 290 | }, 291 | { 292 | "value": 0.7553857040236626, 293 | "variable": "B" 294 | }, 295 | { 296 | "value": -2.1056619465687616, 297 | "variable": "B" 298 | }, 299 | { 300 | "value": -0.9536315716472301, 301 | "variable": "B" 302 | }, 303 | { 304 | "value": -0.7169477714702117, 305 | "variable": "B" 306 | }, 307 | { 308 | "value": 0.41664317515130195, 309 | "variable": "B" 310 | }, 311 | { 312 | "value": -1.457125154898018, 313 | "variable": "B" 314 | }, 315 | { 316 | "value": -0.5404389535609037, 317 | "variable": "B" 318 | }, 319 | { 320 | "value": 0.4441621019182134, 321 | "variable": "B" 322 | }, 323 | { 324 | "value": 0.6856720785530876, 325 | "variable": "B" 326 | }, 327 | { 328 | "value": -0.4275324669827531, 329 | "variable": "B" 330 | }, 331 | { 332 | "value": -0.15047880675178543, 333 | "variable": "B" 334 | }, 335 | { 336 | "value": 0.7518239402290684, 337 | "variable": "B" 338 | }, 339 | { 340 | "value": 0.10398054362137754, 341 | "variable": "B" 342 | }, 343 | { 344 | "value": 0.12138507068140678, 345 | "variable": "B" 346 | }, 347 | { 348 | "value": -0.8323046513564163, 349 | "variable": "B" 350 | }, 351 | { 352 | "value": 0.4984733821697992, 353 | "variable": "B" 354 | }, 355 | { 356 | "value": -0.7088761396238055, 357 | "variable": "B" 358 | }, 359 | { 360 | "value": 0.9943449751503719, 361 | "variable": "B" 362 | }, 363 | { 364 | "value": -1.7586532120383742, 365 | "variable": "B" 366 | }, 367 | { 368 | "value": -0.6607685905194645, 369 | "variable": "B" 370 | }, 371 | { 372 | "value": -0.024288387357977486, 373 | "variable": "B" 374 | }, 375 | { 376 | "value": 0.050276850655552104, 377 | "variable": "B" 378 | }, 379 | { 380 | "value": -0.7038782427342452, 381 | "variable": "B" 382 | }, 383 | { 384 | "value": -1.303511032553364, 385 | "variable": "C" 386 | }, 387 | { 388 | "value": 0.3672528437509079, 389 | "variable": "C" 390 | }, 391 | { 392 | "value": 0.15431746576611127, 393 | "variable": "C" 394 | }, 395 | { 396 | "value": -0.12050701912087032, 397 | "variable": "C" 398 | }, 399 | { 400 | "value": -1.001284933212565, 401 | "variable": "C" 402 | }, 403 | { 404 | "value": -0.2540785646235349, 405 | "variable": "C" 406 | }, 407 | { 408 | "value": -0.4228158652442165, 409 | "variable": "C" 410 | }, 411 | { 412 | "value": -0.27639931019436637, 413 | "variable": "C" 414 | }, 415 | { 416 | "value": 0.7386595693388794, 417 | "variable": "C" 418 | }, 419 | { 420 | "value": -0.17027595679665597, 421 | "variable": "C" 422 | }, 423 | { 424 | "value": 1.7070936875500302, 425 | "variable": "C" 426 | }, 427 | { 428 | "value": 0.6069723319741929, 429 | "variable": "C" 430 | }, 431 | { 432 | "value": 1.0270365962403802, 433 | "variable": "C" 434 | }, 435 | { 436 | "value": 0.46758760907703006, 437 | "variable": "C" 438 | }, 439 | { 440 | "value": 0.6415122037432663, 441 | "variable": "C" 442 | }, 443 | { 444 | "value": 0.41766557380695013, 445 | "variable": "C" 446 | }, 447 | { 448 | "value": 1.2868813156207748, 449 | "variable": "C" 450 | }, 451 | { 452 | "value": -1.0361781587260608, 453 | "variable": "C" 454 | }, 455 | { 456 | "value": -1.9501744425748684, 457 | "variable": "C" 458 | }, 459 | { 460 | "value": -1.5928820139123978, 461 | "variable": "C" 462 | }, 463 | { 464 | "value": 0.6704357409608932, 465 | "variable": "C" 466 | }, 467 | { 468 | "value": -2.4463859104477996, 469 | "variable": "C" 470 | }, 471 | { 472 | "value": -1.0543874494218193, 473 | "variable": "C" 474 | }, 475 | { 476 | "value": -0.795732408142419, 477 | "variable": "C" 478 | }, 479 | { 480 | "value": 1.2816163963081522, 481 | "variable": "C" 482 | }, 483 | { 484 | "value": -0.5406420949076187, 485 | "variable": "C" 486 | }, 487 | { 488 | "value": -0.2619083589268465, 489 | "variable": "C" 490 | }, 491 | { 492 | "value": 0.4286405470799978, 493 | "variable": "C" 494 | }, 495 | { 496 | "value": -1.8172257984960618, 497 | "variable": "C" 498 | }, 499 | { 500 | "value": 0.13706777478429144, 501 | "variable": "C" 502 | }, 503 | { 504 | "value": -0.10478529407365901, 505 | "variable": "D" 506 | }, 507 | { 508 | "value": -1.051841237172554, 509 | "variable": "D" 510 | }, 511 | { 512 | "value": -0.06470035542158659, 513 | "variable": "D" 514 | }, 515 | { 516 | "value": -0.8736172744954797, 517 | "variable": "D" 518 | }, 519 | { 520 | "value": 0.31846277878321944, 521 | "variable": "D" 522 | }, 523 | { 524 | "value": 0.6776674959069814, 525 | "variable": "D" 526 | }, 527 | { 528 | "value": 0.47032013560452635, 529 | "variable": "D" 530 | }, 531 | { 532 | "value": 0.5203263914878267, 533 | "variable": "D" 534 | }, 535 | { 536 | "value": -2.1171241240093925, 537 | "variable": "D" 538 | }, 539 | { 540 | "value": 0.7675097663726791, 541 | "variable": "D" 542 | }, 543 | { 544 | "value": 1.2069713544014675, 545 | "variable": "D" 546 | }, 547 | { 548 | "value": -1.6704803693691532, 549 | "variable": "D" 550 | }, 551 | { 552 | "value": 0.9805373629100806, 553 | "variable": "D" 554 | }, 555 | { 556 | "value": 0.6477843669847971, 557 | "variable": "D" 558 | }, 559 | { 560 | "value": -1.1035182772974017, 561 | "variable": "D" 562 | }, 563 | { 564 | "value": 1.1072729284383653, 565 | "variable": "D" 566 | }, 567 | { 568 | "value": -0.1365756040215114, 569 | "variable": "D" 570 | }, 571 | { 572 | "value": -1.019079604234089, 573 | "variable": "D" 574 | }, 575 | { 576 | "value": -0.870274743982925, 577 | "variable": "D" 578 | }, 579 | { 580 | "value": 0.23746890972001847, 581 | "variable": "D" 582 | }, 583 | { 584 | "value": 0.2507531542609818, 585 | "variable": "D" 586 | }, 587 | { 588 | "value": 0.5360813826240799, 589 | "variable": "D" 590 | }, 591 | { 592 | "value": -1.2879296527634119, 593 | "variable": "D" 594 | }, 595 | { 596 | "value": -0.03261748506034418, 597 | "variable": "D" 598 | }, 599 | { 600 | "value": 0.6480358361631877, 601 | "variable": "D" 602 | }, 603 | { 604 | "value": 0.9183735174873154, 605 | "variable": "D" 606 | }, 607 | { 608 | "value": -1.2900494712547064, 609 | "variable": "D" 610 | }, 611 | { 612 | "value": -1.8242065346117304, 613 | "variable": "D" 614 | }, 615 | { 616 | "value": -1.4123442845199492, 617 | "variable": "D" 618 | }, 619 | { 620 | "value": -2.9727260876991863, 621 | "variable": "D" 622 | } 623 | ] 624 | }, 625 | "encoding": { 626 | "x": { 627 | "field": "variable", 628 | "type": "nominal" 629 | }, 630 | "y": { 631 | "aggregate": "mean", 632 | "field": "value", 633 | "type": "quantitative" 634 | } 635 | }, 636 | "mark": "bar" 637 | }, 638 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAI4AAAFdCAYAAADVIFU9AAAR/klEQVR4Xu2dQagd1RnH/09r0bS1lAa6KJSUJ5hd2uCiUF2YjQtdiCVNShUKXQRSWwhYEytqahDzaEAoVpAiSFVsCnWltHaRjQm4CNLsFIkNhS4KioKYVKx95YvnPM+bzL1z5pu5886d+d1N8t6bc+ae//nd//fNnLnfWREvFHAosOJoQxMUEOAAgUsBwHHJRiPAgQGXAoDjko1GgAMDLgUAxyUbjYYG5+uSXpB0W5D+7vBzOhM/lvR8+MWrkuzni5KekHQg/P5pSYckXWIKt0aBocH5vqQdARaD6KCkEwkA10m6T9JTkt4L0FyQ9KakxyQ9GH6/NWpx1g0FhgbH3MNAOCOpCom9qSpMEbSzkk5K2hXe+c2hD6ZyixTYanB+LekZSW+F8deBs0fSKUn277EqcGtra4+sr68fTfXbvn37f2699dZrt0jTMZ72wurq6rfTgW01OGlYmuc4lhfFlzlVFbhNk3X8+PH1I0eODD22MQJzeUznz59fX11d3aTn0OJ6cxzLi+xlABk490h6blZyDDj9MlwCOLOuqh4K4chyn6arqnOS9iXh7QqVAGd84PQ7ohm9AU6/MpfgOP2OCHAG0RNwBpF5fCcBnPHN6SAjApxBZB7fSQBnfHM6yIgAZxCZx3cSwBnfnA4yIsAZRObxnQRwxjeng4wIcAaReXwnAZzxzekgIwKcQWQe30kAZ3xzOsiIAGcQmcd3EsAZ35wOMiLAGUTm8Z0EcMY3p4OMCHAGkXl8JwGc8c3pICMCnEFkHt9JAGd8czrIiABnEJnHdxLAGd+cDjIiwBlE5vGdBHDGN6eDjAhwBpF5fCcBnPHN6SAjApxBZB7fSQBnfHM6yIgAZxCZx3eSSYFz+oMdP/+f1q/pOo1XaeWTl4/vf7JrP8vcflrgvL/jQ63oK50nbF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6T31OIf5m7DPe8EUwIn3gqwDWHtst8m56eSuoITAflW0p9pHtfcapdF5kzKrD1HzdkimG3dMUJj21Ha2OPL3eeUwIliRcc5IOmGAsGZtYjbuEY3B8be+5wiOFWA3HYdVuptxT7emEzn7tWwMW1bx7E+DO53Kjc5LVzdEkJhW8cBnLaBPeP4Uq+qojPGIcQF34whXXFI9Y59Z8Cn7DieCaBNUABwQMGlAOC4ZKMR4MCASwHAcclGI8CBAZcCgOOSjUaAMywD8db/v8L3xerOHo+xv9m6V3qzz+45nZT0s8rSwbCjkAQ4g0veeELAaZRouQ6oukW8G2sLhy8l3+awUcW7vPGRC3OJfZL2hH+j48S/W5tz4W//DH19NcizP3n0wxZSU8eJDrRLUpcljtYzgeO0kyx9vMEeo/hdmGz7wmBcR9qd/N6+gWoP3seH61P47Nuqts5lq/VvBFgMKHsUw75S9L3Q97vhOAP0bALOm0l7W/G2JYpvOtey2qlAqGqtV5pjmHukE5V++qN7RHDiQ111OU66JmVOFcGJOY79ayDZy2D7Q8hx7Of4bZA4kMFcB8dpx06af9j3vOKzPTb5PwgOYbBEJ5oHzp+Ce9hTgxGW1HFywdmSJw0Bpx04dnTMS+Kn24ojREewq6C7JP0ygchcoc5xTgXHsL/FsGMhp22oStvMu1prP9I5LQCnvZwxKbYJM8dJYbL/2zPH36iEkzpwIiD2QJmFtn9L+oekByQ9LiknOU6T68HClA0ScNqDQwvAgQGvAjiOV7mJtwOciQPgHT7geJWbeDvAmTgA3uEDjle5ibcDnIkD4B0+4HiVm3i7/wN3kYrV+0/RTQAAAABJRU5ErkJggg==", 639 | "text/plain": [ 640 | "\n", 641 | "\n", 642 | "If you see this message, it means the renderer has not been properly enabled\n", 643 | "for the frontend that you are using. For more information, see\n", 644 | "https://altair-viz.github.io/user_guide/troubleshooting.html\n" 645 | ] 646 | }, 647 | "execution_count": 12, 648 | "metadata": {}, 649 | "output_type": "execute_result" 650 | } 651 | ], 652 | "source": [ 653 | "chart = alt.Chart(df).mark_bar().encode(\n", 654 | " x = \"variable:N\",\n", 655 | " y = \"mean(value):Q\",\n", 656 | ")\n", 657 | "chart" 658 | ] 659 | }, 660 | { 661 | "cell_type": "code", 662 | "execution_count": 13, 663 | "metadata": {}, 664 | "outputs": [ 665 | { 666 | "data": { 667 | "application/vnd.vegalite.v2+json": { 668 | "$schema": "https://vega.github.io/schema/vega-lite/v2.6.0.json", 669 | "config": { 670 | "arc": { 671 | "fill": "#4572a7" 672 | }, 673 | "area": { 674 | "fill": "#4572a7" 675 | }, 676 | "axis": { 677 | "bandPosition": 0.5, 678 | "grid": true, 679 | "gridColor": "#000000", 680 | "gridOpacity": 1, 681 | "gridWidth": 0.5, 682 | "labelPadding": 10, 683 | "tickSize": 5, 684 | "tickWidth": 0.5 685 | }, 686 | "axisBand": { 687 | "grid": false, 688 | "tickExtra": true 689 | }, 690 | "background": "#fff", 691 | "legend": { 692 | "labelBaseline": "middle", 693 | "labelFontSize": 11, 694 | "symbolSize": 50, 695 | "symbolType": "square" 696 | }, 697 | "line": { 698 | "stroke": "#4572a7", 699 | "strokeWidth": 2 700 | }, 701 | "path": { 702 | "stroke": "#4572a7" 703 | }, 704 | "range": { 705 | "category": [ 706 | "#4572a7", 707 | "#aa4643", 708 | "#8aa453", 709 | "#71598e", 710 | "#4598ae", 711 | "#d98445", 712 | "#94aace", 713 | "#d09393", 714 | "#b9cc98", 715 | "#a99cbc" 716 | ] 717 | }, 718 | "rect": { 719 | "fill": "#4572a7" 720 | }, 721 | "shape": { 722 | "stroke": "#4572a7" 723 | }, 724 | "symbol": { 725 | "fill": "#4572a7", 726 | "size": 50, 727 | "strokeWidth": 1.5 728 | } 729 | }, 730 | "data": { 731 | "name": "data-efb252e7c57bdc7da8542a41b9a92119" 732 | }, 733 | "datasets": { 734 | "data-efb252e7c57bdc7da8542a41b9a92119": [ 735 | { 736 | "value": -0.4610270322439197, 737 | "variable": "A" 738 | }, 739 | { 740 | "value": -0.6367343500532895, 741 | "variable": "A" 742 | }, 743 | { 744 | "value": 0.8774120795620142, 745 | "variable": "A" 746 | }, 747 | { 748 | "value": 0.03825863022523785, 749 | "variable": "A" 750 | }, 751 | { 752 | "value": 0.16534228478558757, 753 | "variable": "A" 754 | }, 755 | { 756 | "value": -1.2817002072378272, 757 | "variable": "A" 758 | }, 759 | { 760 | "value": -1.085245037265318, 761 | "variable": "A" 762 | }, 763 | { 764 | "value": -0.27755227699130036, 765 | "variable": "A" 766 | }, 767 | { 768 | "value": 1.3989583501573215, 769 | "variable": "A" 770 | }, 771 | { 772 | "value": 0.19046818945796665, 773 | "variable": "A" 774 | }, 775 | { 776 | "value": 0.19428312561992822, 777 | "variable": "A" 778 | }, 779 | { 780 | "value": -0.5676233531129963, 781 | "variable": "A" 782 | }, 783 | { 784 | "value": 0.500890590982962, 785 | "variable": "A" 786 | }, 787 | { 788 | "value": -1.3855716484122758, 789 | "variable": "A" 790 | }, 791 | { 792 | "value": -1.2546423680851004, 793 | "variable": "A" 794 | }, 795 | { 796 | "value": -0.3357912900788574, 797 | "variable": "A" 798 | }, 799 | { 800 | "value": -0.2205733984715034, 801 | "variable": "A" 802 | }, 803 | { 804 | "value": -0.38340036433532537, 805 | "variable": "A" 806 | }, 807 | { 808 | "value": 0.6614906436722245, 809 | "variable": "A" 810 | }, 811 | { 812 | "value": -0.16313042252515567, 813 | "variable": "A" 814 | }, 815 | { 816 | "value": -0.0247512080682622, 817 | "variable": "A" 818 | }, 819 | { 820 | "value": 0.4582047341126467, 821 | "variable": "A" 822 | }, 823 | { 824 | "value": 0.7640931522868072, 825 | "variable": "A" 826 | }, 827 | { 828 | "value": 0.13934191383325467, 829 | "variable": "A" 830 | }, 831 | { 832 | "value": -2.595368819795762, 833 | "variable": "A" 834 | }, 835 | { 836 | "value": 1.1469702483563833, 837 | "variable": "A" 838 | }, 839 | { 840 | "value": 0.1569965665258978, 841 | "variable": "A" 842 | }, 843 | { 844 | "value": 1.2727001883205376, 845 | "variable": "A" 846 | }, 847 | { 848 | "value": 1.022066496022976, 849 | "variable": "A" 850 | }, 851 | { 852 | "value": 1.9412742747244585, 853 | "variable": "A" 854 | }, 855 | { 856 | "value": -0.17794910128507585, 857 | "variable": "B" 858 | }, 859 | { 860 | "value": -0.19125848427380304, 861 | "variable": "B" 862 | }, 863 | { 864 | "value": 1.2870713074028026, 865 | "variable": "B" 866 | }, 867 | { 868 | "value": -0.5125688683310612, 869 | "variable": "B" 870 | }, 871 | { 872 | "value": 0.4481312599603682, 873 | "variable": "B" 874 | }, 875 | { 876 | "value": 0.6524434972811275, 877 | "variable": "B" 878 | }, 879 | { 880 | "value": 0.13585646332755005, 881 | "variable": "B" 882 | }, 883 | { 884 | "value": 0.7553857040236626, 885 | "variable": "B" 886 | }, 887 | { 888 | "value": -2.1056619465687616, 889 | "variable": "B" 890 | }, 891 | { 892 | "value": -0.9536315716472301, 893 | "variable": "B" 894 | }, 895 | { 896 | "value": -0.7169477714702117, 897 | "variable": "B" 898 | }, 899 | { 900 | "value": 0.41664317515130195, 901 | "variable": "B" 902 | }, 903 | { 904 | "value": -1.457125154898018, 905 | "variable": "B" 906 | }, 907 | { 908 | "value": -0.5404389535609037, 909 | "variable": "B" 910 | }, 911 | { 912 | "value": 0.4441621019182134, 913 | "variable": "B" 914 | }, 915 | { 916 | "value": 0.6856720785530876, 917 | "variable": "B" 918 | }, 919 | { 920 | "value": -0.4275324669827531, 921 | "variable": "B" 922 | }, 923 | { 924 | "value": -0.15047880675178543, 925 | "variable": "B" 926 | }, 927 | { 928 | "value": 0.7518239402290684, 929 | "variable": "B" 930 | }, 931 | { 932 | "value": 0.10398054362137754, 933 | "variable": "B" 934 | }, 935 | { 936 | "value": 0.12138507068140678, 937 | "variable": "B" 938 | }, 939 | { 940 | "value": -0.8323046513564163, 941 | "variable": "B" 942 | }, 943 | { 944 | "value": 0.4984733821697992, 945 | "variable": "B" 946 | }, 947 | { 948 | "value": -0.7088761396238055, 949 | "variable": "B" 950 | }, 951 | { 952 | "value": 0.9943449751503719, 953 | "variable": "B" 954 | }, 955 | { 956 | "value": -1.7586532120383742, 957 | "variable": "B" 958 | }, 959 | { 960 | "value": -0.6607685905194645, 961 | "variable": "B" 962 | }, 963 | { 964 | "value": -0.024288387357977486, 965 | "variable": "B" 966 | }, 967 | { 968 | "value": 0.050276850655552104, 969 | "variable": "B" 970 | }, 971 | { 972 | "value": -0.7038782427342452, 973 | "variable": "B" 974 | }, 975 | { 976 | "value": -1.303511032553364, 977 | "variable": "C" 978 | }, 979 | { 980 | "value": 0.3672528437509079, 981 | "variable": "C" 982 | }, 983 | { 984 | "value": 0.15431746576611127, 985 | "variable": "C" 986 | }, 987 | { 988 | "value": -0.12050701912087032, 989 | "variable": "C" 990 | }, 991 | { 992 | "value": -1.001284933212565, 993 | "variable": "C" 994 | }, 995 | { 996 | "value": -0.2540785646235349, 997 | "variable": "C" 998 | }, 999 | { 1000 | "value": -0.4228158652442165, 1001 | "variable": "C" 1002 | }, 1003 | { 1004 | "value": -0.27639931019436637, 1005 | "variable": "C" 1006 | }, 1007 | { 1008 | "value": 0.7386595693388794, 1009 | "variable": "C" 1010 | }, 1011 | { 1012 | "value": -0.17027595679665597, 1013 | "variable": "C" 1014 | }, 1015 | { 1016 | "value": 1.7070936875500302, 1017 | "variable": "C" 1018 | }, 1019 | { 1020 | "value": 0.6069723319741929, 1021 | "variable": "C" 1022 | }, 1023 | { 1024 | "value": 1.0270365962403802, 1025 | "variable": "C" 1026 | }, 1027 | { 1028 | "value": 0.46758760907703006, 1029 | "variable": "C" 1030 | }, 1031 | { 1032 | "value": 0.6415122037432663, 1033 | "variable": "C" 1034 | }, 1035 | { 1036 | "value": 0.41766557380695013, 1037 | "variable": "C" 1038 | }, 1039 | { 1040 | "value": 1.2868813156207748, 1041 | "variable": "C" 1042 | }, 1043 | { 1044 | "value": -1.0361781587260608, 1045 | "variable": "C" 1046 | }, 1047 | { 1048 | "value": -1.9501744425748684, 1049 | "variable": "C" 1050 | }, 1051 | { 1052 | "value": -1.5928820139123978, 1053 | "variable": "C" 1054 | }, 1055 | { 1056 | "value": 0.6704357409608932, 1057 | "variable": "C" 1058 | }, 1059 | { 1060 | "value": -2.4463859104477996, 1061 | "variable": "C" 1062 | }, 1063 | { 1064 | "value": -1.0543874494218193, 1065 | "variable": "C" 1066 | }, 1067 | { 1068 | "value": -0.795732408142419, 1069 | "variable": "C" 1070 | }, 1071 | { 1072 | "value": 1.2816163963081522, 1073 | "variable": "C" 1074 | }, 1075 | { 1076 | "value": -0.5406420949076187, 1077 | "variable": "C" 1078 | }, 1079 | { 1080 | "value": -0.2619083589268465, 1081 | "variable": "C" 1082 | }, 1083 | { 1084 | "value": 0.4286405470799978, 1085 | "variable": "C" 1086 | }, 1087 | { 1088 | "value": -1.8172257984960618, 1089 | "variable": "C" 1090 | }, 1091 | { 1092 | "value": 0.13706777478429144, 1093 | "variable": "C" 1094 | }, 1095 | { 1096 | "value": -0.10478529407365901, 1097 | "variable": "D" 1098 | }, 1099 | { 1100 | "value": -1.051841237172554, 1101 | "variable": "D" 1102 | }, 1103 | { 1104 | "value": -0.06470035542158659, 1105 | "variable": "D" 1106 | }, 1107 | { 1108 | "value": -0.8736172744954797, 1109 | "variable": "D" 1110 | }, 1111 | { 1112 | "value": 0.31846277878321944, 1113 | "variable": "D" 1114 | }, 1115 | { 1116 | "value": 0.6776674959069814, 1117 | "variable": "D" 1118 | }, 1119 | { 1120 | "value": 0.47032013560452635, 1121 | "variable": "D" 1122 | }, 1123 | { 1124 | "value": 0.5203263914878267, 1125 | "variable": "D" 1126 | }, 1127 | { 1128 | "value": -2.1171241240093925, 1129 | "variable": "D" 1130 | }, 1131 | { 1132 | "value": 0.7675097663726791, 1133 | "variable": "D" 1134 | }, 1135 | { 1136 | "value": 1.2069713544014675, 1137 | "variable": "D" 1138 | }, 1139 | { 1140 | "value": -1.6704803693691532, 1141 | "variable": "D" 1142 | }, 1143 | { 1144 | "value": 0.9805373629100806, 1145 | "variable": "D" 1146 | }, 1147 | { 1148 | "value": 0.6477843669847971, 1149 | "variable": "D" 1150 | }, 1151 | { 1152 | "value": -1.1035182772974017, 1153 | "variable": "D" 1154 | }, 1155 | { 1156 | "value": 1.1072729284383653, 1157 | "variable": "D" 1158 | }, 1159 | { 1160 | "value": -0.1365756040215114, 1161 | "variable": "D" 1162 | }, 1163 | { 1164 | "value": -1.019079604234089, 1165 | "variable": "D" 1166 | }, 1167 | { 1168 | "value": -0.870274743982925, 1169 | "variable": "D" 1170 | }, 1171 | { 1172 | "value": 0.23746890972001847, 1173 | "variable": "D" 1174 | }, 1175 | { 1176 | "value": 0.2507531542609818, 1177 | "variable": "D" 1178 | }, 1179 | { 1180 | "value": 0.5360813826240799, 1181 | "variable": "D" 1182 | }, 1183 | { 1184 | "value": -1.2879296527634119, 1185 | "variable": "D" 1186 | }, 1187 | { 1188 | "value": -0.03261748506034418, 1189 | "variable": "D" 1190 | }, 1191 | { 1192 | "value": 0.6480358361631877, 1193 | "variable": "D" 1194 | }, 1195 | { 1196 | "value": 0.9183735174873154, 1197 | "variable": "D" 1198 | }, 1199 | { 1200 | "value": -1.2900494712547064, 1201 | "variable": "D" 1202 | }, 1203 | { 1204 | "value": -1.8242065346117304, 1205 | "variable": "D" 1206 | }, 1207 | { 1208 | "value": -1.4123442845199492, 1209 | "variable": "D" 1210 | }, 1211 | { 1212 | "value": -2.9727260876991863, 1213 | "variable": "D" 1214 | } 1215 | ] 1216 | }, 1217 | "encoding": { 1218 | "x": { 1219 | "field": "variable", 1220 | "type": "nominal" 1221 | }, 1222 | "y": { 1223 | "aggregate": "mean", 1224 | "field": "value", 1225 | "type": "quantitative" 1226 | } 1227 | }, 1228 | "mark": "bar" 1229 | }, 1230 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAJYAAAEBCAYAAACaFVytAAARBklEQVR4Xu2dUUhdRxrHvyTdUn3V3bKUFhsW47Kwl2aFPkTCEpaaPK6hvUJ0S7ElxJaCYClUTEzEQKgglFTIQ9mHWFAhvvsQFzYtlOJKb2CXWCRIQh7Kpg99U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LCyWqkKsFIEi0PpcZF2B07Sqx2Fr+IWFhbo008/3YWMXaWWY504cUI5Dr+nuzXu0ly7QrPOXlebKctAACtlRfWgnRtUTxmYg3Be8/7DDz9UdVe1wNIA8YCfu84XX3yRXn31Vbp8+TJ98sknsQbv5uc2shtkSQFWymAh3BMFABZIEFEAYInIiqAACwyIKACwRGRFUIAFBkQUAFgisiIowAIDIgoALBFZEfT/bexpk4mOXz0AAAAASUVORK5CYII=", 1231 | "text/plain": [ 1232 | "\n", 1233 | "\n", 1234 | "If you see this message, it means the renderer has not been properly enabled\n", 1235 | "for the frontend that you are using. For more information, see\n", 1236 | "https://altair-viz.github.io/user_guide/troubleshooting.html\n" 1237 | ] 1238 | }, 1239 | "execution_count": 13, 1240 | "metadata": {}, 1241 | "output_type": "execute_result" 1242 | } 1243 | ], 1244 | "source": [ 1245 | "%run excel_theme.py\n", 1246 | "chart" 1247 | ] 1248 | }, 1249 | { 1250 | "cell_type": "code", 1251 | "execution_count": 14, 1252 | "metadata": {}, 1253 | "outputs": [ 1254 | { 1255 | "data": { 1256 | "application/vnd.vegalite.v2+json": { 1257 | "$schema": "https://vega.github.io/schema/vega-lite/v2.6.0.json", 1258 | "config": { 1259 | "arc": { 1260 | "fill": "#30a2da" 1261 | }, 1262 | "area": { 1263 | "fill": "#30a2da" 1264 | }, 1265 | "axisBand": { 1266 | "grid": false 1267 | }, 1268 | "axisBottom": { 1269 | "domain": false, 1270 | "domainColor": "black", 1271 | "domainWidth": 3, 1272 | "grid": true, 1273 | "gridColor": "#cbcbcb", 1274 | "gridWidth": 1, 1275 | "labelFontSize": 12, 1276 | "labelPadding": 4, 1277 | "tickColor": "#cbcbcb", 1278 | "tickSize": 10, 1279 | "titleFontSize": 14, 1280 | "titlePadding": 10 1281 | }, 1282 | "axisLeft": { 1283 | "domainColor": "#cbcbcb", 1284 | "domainWidth": 1, 1285 | "gridColor": "#cbcbcb", 1286 | "gridWidth": 1, 1287 | "labelFontSize": 12, 1288 | "labelPadding": 4, 1289 | "tickColor": "#cbcbcb", 1290 | "tickSize": 10, 1291 | "ticks": true, 1292 | "titleFontSize": 14, 1293 | "titlePadding": 10 1294 | }, 1295 | "axisRight": { 1296 | "domainColor": "#cbcbcb", 1297 | "domainWidth": 1, 1298 | "gridColor": "#cbcbcb", 1299 | "gridWidth": 1, 1300 | "labelFontSize": 12, 1301 | "labelPadding": 4, 1302 | "tickColor": "#cbcbcb", 1303 | "tickSize": 10, 1304 | "ticks": true, 1305 | "titleFontSize": 14, 1306 | "titlePadding": 10 1307 | }, 1308 | "axisTop": { 1309 | "domain": false, 1310 | "domainColor": "black", 1311 | "domainWidth": 3, 1312 | "grid": true, 1313 | "gridColor": "#cbcbcb", 1314 | "gridWidth": 1, 1315 | "labelFontSize": 12, 1316 | "labelPadding": 4, 1317 | "tickColor": "#cbcbcb", 1318 | "tickSize": 10, 1319 | "titleFontSize": 14, 1320 | "titlePadding": 10 1321 | }, 1322 | "background": "#f0f0f0", 1323 | "group": { 1324 | "fill": "#f0f0f0" 1325 | }, 1326 | "legend": { 1327 | "labelFontSize": 11, 1328 | "padding": 1, 1329 | "symbolSize": 30, 1330 | "symbolType": "square", 1331 | "titleFontSize": 14, 1332 | "titlePadding": 10 1333 | }, 1334 | "line": { 1335 | "stroke": "#30a2da", 1336 | "strokeWidth": 2 1337 | }, 1338 | "path": { 1339 | "stroke": "#30a2da", 1340 | "strokeWidth": 0.5 1341 | }, 1342 | "point": { 1343 | "filled": true 1344 | }, 1345 | "range": { 1346 | "category": [ 1347 | "#30a2da", 1348 | "#fc4f30", 1349 | "#e5ae38", 1350 | "#6d904f", 1351 | "#8b8b8b", 1352 | "#b96db8", 1353 | "#ff9e27", 1354 | "#56cc60", 1355 | "#52d2ca", 1356 | "#52689e", 1357 | "#545454", 1358 | "#9fe4f8" 1359 | ], 1360 | "diverging": [ 1361 | "#cc0020", 1362 | "#e77866", 1363 | "#f6e7e1", 1364 | "#d6e8ed", 1365 | "#91bfd9", 1366 | "#1d78b5" 1367 | ], 1368 | "heatmap": [ 1369 | "#d6e8ed", 1370 | "#cee0e5", 1371 | "#91bfd9", 1372 | "#549cc6", 1373 | "#1d78b5" 1374 | ] 1375 | }, 1376 | "rect": { 1377 | "fill": "#30a2da" 1378 | }, 1379 | "shape": { 1380 | "stroke": "#30a2da" 1381 | }, 1382 | "style": { 1383 | "bar": { 1384 | "binSpacing": 2, 1385 | "fill": "#30a2da", 1386 | "stroke": null 1387 | } 1388 | }, 1389 | "symbol": { 1390 | "opacity": 1, 1391 | "shape": "circle", 1392 | "size": 40, 1393 | "strokeWidth": 1 1394 | }, 1395 | "title": { 1396 | "anchor": "start", 1397 | "fontSize": 24, 1398 | "fontWeight": 600, 1399 | "offset": 20 1400 | } 1401 | }, 1402 | "data": { 1403 | "name": "data-efb252e7c57bdc7da8542a41b9a92119" 1404 | }, 1405 | "datasets": { 1406 | "data-efb252e7c57bdc7da8542a41b9a92119": [ 1407 | { 1408 | "value": -0.4610270322439197, 1409 | "variable": "A" 1410 | }, 1411 | { 1412 | "value": -0.6367343500532895, 1413 | "variable": "A" 1414 | }, 1415 | { 1416 | "value": 0.8774120795620142, 1417 | "variable": "A" 1418 | }, 1419 | { 1420 | "value": 0.03825863022523785, 1421 | "variable": "A" 1422 | }, 1423 | { 1424 | "value": 0.16534228478558757, 1425 | "variable": "A" 1426 | }, 1427 | { 1428 | "value": -1.2817002072378272, 1429 | "variable": "A" 1430 | }, 1431 | { 1432 | "value": -1.085245037265318, 1433 | "variable": "A" 1434 | }, 1435 | { 1436 | "value": -0.27755227699130036, 1437 | "variable": "A" 1438 | }, 1439 | { 1440 | "value": 1.3989583501573215, 1441 | "variable": "A" 1442 | }, 1443 | { 1444 | "value": 0.19046818945796665, 1445 | "variable": "A" 1446 | }, 1447 | { 1448 | "value": 0.19428312561992822, 1449 | "variable": "A" 1450 | }, 1451 | { 1452 | "value": -0.5676233531129963, 1453 | "variable": "A" 1454 | }, 1455 | { 1456 | "value": 0.500890590982962, 1457 | "variable": "A" 1458 | }, 1459 | { 1460 | "value": -1.3855716484122758, 1461 | "variable": "A" 1462 | }, 1463 | { 1464 | "value": -1.2546423680851004, 1465 | "variable": "A" 1466 | }, 1467 | { 1468 | "value": -0.3357912900788574, 1469 | "variable": "A" 1470 | }, 1471 | { 1472 | "value": -0.2205733984715034, 1473 | "variable": "A" 1474 | }, 1475 | { 1476 | "value": -0.38340036433532537, 1477 | "variable": "A" 1478 | }, 1479 | { 1480 | "value": 0.6614906436722245, 1481 | "variable": "A" 1482 | }, 1483 | { 1484 | "value": -0.16313042252515567, 1485 | "variable": "A" 1486 | }, 1487 | { 1488 | "value": -0.0247512080682622, 1489 | "variable": "A" 1490 | }, 1491 | { 1492 | "value": 0.4582047341126467, 1493 | "variable": "A" 1494 | }, 1495 | { 1496 | "value": 0.7640931522868072, 1497 | "variable": "A" 1498 | }, 1499 | { 1500 | "value": 0.13934191383325467, 1501 | "variable": "A" 1502 | }, 1503 | { 1504 | "value": -2.595368819795762, 1505 | "variable": "A" 1506 | }, 1507 | { 1508 | "value": 1.1469702483563833, 1509 | "variable": "A" 1510 | }, 1511 | { 1512 | "value": 0.1569965665258978, 1513 | "variable": "A" 1514 | }, 1515 | { 1516 | "value": 1.2727001883205376, 1517 | "variable": "A" 1518 | }, 1519 | { 1520 | "value": 1.022066496022976, 1521 | "variable": "A" 1522 | }, 1523 | { 1524 | "value": 1.9412742747244585, 1525 | "variable": "A" 1526 | }, 1527 | { 1528 | "value": -0.17794910128507585, 1529 | "variable": "B" 1530 | }, 1531 | { 1532 | "value": -0.19125848427380304, 1533 | "variable": "B" 1534 | }, 1535 | { 1536 | "value": 1.2870713074028026, 1537 | "variable": "B" 1538 | }, 1539 | { 1540 | "value": -0.5125688683310612, 1541 | "variable": "B" 1542 | }, 1543 | { 1544 | "value": 0.4481312599603682, 1545 | "variable": "B" 1546 | }, 1547 | { 1548 | "value": 0.6524434972811275, 1549 | "variable": "B" 1550 | }, 1551 | { 1552 | "value": 0.13585646332755005, 1553 | "variable": "B" 1554 | }, 1555 | { 1556 | "value": 0.7553857040236626, 1557 | "variable": "B" 1558 | }, 1559 | { 1560 | "value": -2.1056619465687616, 1561 | "variable": "B" 1562 | }, 1563 | { 1564 | "value": -0.9536315716472301, 1565 | "variable": "B" 1566 | }, 1567 | { 1568 | "value": -0.7169477714702117, 1569 | "variable": "B" 1570 | }, 1571 | { 1572 | "value": 0.41664317515130195, 1573 | "variable": "B" 1574 | }, 1575 | { 1576 | "value": -1.457125154898018, 1577 | "variable": "B" 1578 | }, 1579 | { 1580 | "value": -0.5404389535609037, 1581 | "variable": "B" 1582 | }, 1583 | { 1584 | "value": 0.4441621019182134, 1585 | "variable": "B" 1586 | }, 1587 | { 1588 | "value": 0.6856720785530876, 1589 | "variable": "B" 1590 | }, 1591 | { 1592 | "value": -0.4275324669827531, 1593 | "variable": "B" 1594 | }, 1595 | { 1596 | "value": -0.15047880675178543, 1597 | "variable": "B" 1598 | }, 1599 | { 1600 | "value": 0.7518239402290684, 1601 | "variable": "B" 1602 | }, 1603 | { 1604 | "value": 0.10398054362137754, 1605 | "variable": "B" 1606 | }, 1607 | { 1608 | "value": 0.12138507068140678, 1609 | "variable": "B" 1610 | }, 1611 | { 1612 | "value": -0.8323046513564163, 1613 | "variable": "B" 1614 | }, 1615 | { 1616 | "value": 0.4984733821697992, 1617 | "variable": "B" 1618 | }, 1619 | { 1620 | "value": -0.7088761396238055, 1621 | "variable": "B" 1622 | }, 1623 | { 1624 | "value": 0.9943449751503719, 1625 | "variable": "B" 1626 | }, 1627 | { 1628 | "value": -1.7586532120383742, 1629 | "variable": "B" 1630 | }, 1631 | { 1632 | "value": -0.6607685905194645, 1633 | "variable": "B" 1634 | }, 1635 | { 1636 | "value": -0.024288387357977486, 1637 | "variable": "B" 1638 | }, 1639 | { 1640 | "value": 0.050276850655552104, 1641 | "variable": "B" 1642 | }, 1643 | { 1644 | "value": -0.7038782427342452, 1645 | "variable": "B" 1646 | }, 1647 | { 1648 | "value": -1.303511032553364, 1649 | "variable": "C" 1650 | }, 1651 | { 1652 | "value": 0.3672528437509079, 1653 | "variable": "C" 1654 | }, 1655 | { 1656 | "value": 0.15431746576611127, 1657 | "variable": "C" 1658 | }, 1659 | { 1660 | "value": -0.12050701912087032, 1661 | "variable": "C" 1662 | }, 1663 | { 1664 | "value": -1.001284933212565, 1665 | "variable": "C" 1666 | }, 1667 | { 1668 | "value": -0.2540785646235349, 1669 | "variable": "C" 1670 | }, 1671 | { 1672 | "value": -0.4228158652442165, 1673 | "variable": "C" 1674 | }, 1675 | { 1676 | "value": -0.27639931019436637, 1677 | "variable": "C" 1678 | }, 1679 | { 1680 | "value": 0.7386595693388794, 1681 | "variable": "C" 1682 | }, 1683 | { 1684 | "value": -0.17027595679665597, 1685 | "variable": "C" 1686 | }, 1687 | { 1688 | "value": 1.7070936875500302, 1689 | "variable": "C" 1690 | }, 1691 | { 1692 | "value": 0.6069723319741929, 1693 | "variable": "C" 1694 | }, 1695 | { 1696 | "value": 1.0270365962403802, 1697 | "variable": "C" 1698 | }, 1699 | { 1700 | "value": 0.46758760907703006, 1701 | "variable": "C" 1702 | }, 1703 | { 1704 | "value": 0.6415122037432663, 1705 | "variable": "C" 1706 | }, 1707 | { 1708 | "value": 0.41766557380695013, 1709 | "variable": "C" 1710 | }, 1711 | { 1712 | "value": 1.2868813156207748, 1713 | "variable": "C" 1714 | }, 1715 | { 1716 | "value": -1.0361781587260608, 1717 | "variable": "C" 1718 | }, 1719 | { 1720 | "value": -1.9501744425748684, 1721 | "variable": "C" 1722 | }, 1723 | { 1724 | "value": -1.5928820139123978, 1725 | "variable": "C" 1726 | }, 1727 | { 1728 | "value": 0.6704357409608932, 1729 | "variable": "C" 1730 | }, 1731 | { 1732 | "value": -2.4463859104477996, 1733 | "variable": "C" 1734 | }, 1735 | { 1736 | "value": -1.0543874494218193, 1737 | "variable": "C" 1738 | }, 1739 | { 1740 | "value": -0.795732408142419, 1741 | "variable": "C" 1742 | }, 1743 | { 1744 | "value": 1.2816163963081522, 1745 | "variable": "C" 1746 | }, 1747 | { 1748 | "value": -0.5406420949076187, 1749 | "variable": "C" 1750 | }, 1751 | { 1752 | "value": -0.2619083589268465, 1753 | "variable": "C" 1754 | }, 1755 | { 1756 | "value": 0.4286405470799978, 1757 | "variable": "C" 1758 | }, 1759 | { 1760 | "value": -1.8172257984960618, 1761 | "variable": "C" 1762 | }, 1763 | { 1764 | "value": 0.13706777478429144, 1765 | "variable": "C" 1766 | }, 1767 | { 1768 | "value": -0.10478529407365901, 1769 | "variable": "D" 1770 | }, 1771 | { 1772 | "value": -1.051841237172554, 1773 | "variable": "D" 1774 | }, 1775 | { 1776 | "value": -0.06470035542158659, 1777 | "variable": "D" 1778 | }, 1779 | { 1780 | "value": -0.8736172744954797, 1781 | "variable": "D" 1782 | }, 1783 | { 1784 | "value": 0.31846277878321944, 1785 | "variable": "D" 1786 | }, 1787 | { 1788 | "value": 0.6776674959069814, 1789 | "variable": "D" 1790 | }, 1791 | { 1792 | "value": 0.47032013560452635, 1793 | "variable": "D" 1794 | }, 1795 | { 1796 | "value": 0.5203263914878267, 1797 | "variable": "D" 1798 | }, 1799 | { 1800 | "value": -2.1171241240093925, 1801 | "variable": "D" 1802 | }, 1803 | { 1804 | "value": 0.7675097663726791, 1805 | "variable": "D" 1806 | }, 1807 | { 1808 | "value": 1.2069713544014675, 1809 | "variable": "D" 1810 | }, 1811 | { 1812 | "value": -1.6704803693691532, 1813 | "variable": "D" 1814 | }, 1815 | { 1816 | "value": 0.9805373629100806, 1817 | "variable": "D" 1818 | }, 1819 | { 1820 | "value": 0.6477843669847971, 1821 | "variable": "D" 1822 | }, 1823 | { 1824 | "value": -1.1035182772974017, 1825 | "variable": "D" 1826 | }, 1827 | { 1828 | "value": 1.1072729284383653, 1829 | "variable": "D" 1830 | }, 1831 | { 1832 | "value": -0.1365756040215114, 1833 | "variable": "D" 1834 | }, 1835 | { 1836 | "value": -1.019079604234089, 1837 | "variable": "D" 1838 | }, 1839 | { 1840 | "value": -0.870274743982925, 1841 | "variable": "D" 1842 | }, 1843 | { 1844 | "value": 0.23746890972001847, 1845 | "variable": "D" 1846 | }, 1847 | { 1848 | "value": 0.2507531542609818, 1849 | "variable": "D" 1850 | }, 1851 | { 1852 | "value": 0.5360813826240799, 1853 | "variable": "D" 1854 | }, 1855 | { 1856 | "value": -1.2879296527634119, 1857 | "variable": "D" 1858 | }, 1859 | { 1860 | "value": -0.03261748506034418, 1861 | "variable": "D" 1862 | }, 1863 | { 1864 | "value": 0.6480358361631877, 1865 | "variable": "D" 1866 | }, 1867 | { 1868 | "value": 0.9183735174873154, 1869 | "variable": "D" 1870 | }, 1871 | { 1872 | "value": -1.2900494712547064, 1873 | "variable": "D" 1874 | }, 1875 | { 1876 | "value": -1.8242065346117304, 1877 | "variable": "D" 1878 | }, 1879 | { 1880 | "value": -1.4123442845199492, 1881 | "variable": "D" 1882 | }, 1883 | { 1884 | "value": -2.9727260876991863, 1885 | "variable": "D" 1886 | } 1887 | ] 1888 | }, 1889 | "encoding": { 1890 | "x": { 1891 | "field": "variable", 1892 | "type": "nominal" 1893 | }, 1894 | "y": { 1895 | "aggregate": "mean", 1896 | "field": "value", 1897 | "type": "quantitative" 1898 | } 1899 | }, 1900 | "mark": "bar" 1901 | }, 1902 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKMAAAELCAYAAAC1VDa3AAAUAklEQVR4Xu2dMWgeRxbHR3YSzsEJOZsUAiNUnHXF4TMGc5EbNW50B27j4lAhEZtDhFwTKXJAlUCyLUgRhxQ2WEW4wmlSCIJBMYY0TiAgcl+VuDEhkOKIE66IiS+2j7fmfZ5vtPvt7Ly3q7fa/9ck8jfzdvbN73szszvvPyM///zzE4cPPGDAAyOA0UAvoAmZBwAjQDDjAcBopivQEMAIBsx4ADCa6Qo0BDCCATMeAIxmugINMQvj3bt33dzcnOv1elkvXb161b3++us7emxYucuXL7vV1dV+nSIbwMCGB8zCSCBNTU25yclJR8BdvHjRra+vu0OHDg14rq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g==", 1903 | "text/plain": [ 1904 | "\n", 1905 | "\n", 1906 | "If you see this message, it means the renderer has not been properly enabled\n", 1907 | "for the frontend that you are using. For more information, see\n", 1908 | "https://altair-viz.github.io/user_guide/troubleshooting.html\n" 1909 | ] 1910 | }, 1911 | "execution_count": 14, 1912 | "metadata": {}, 1913 | "output_type": "execute_result" 1914 | } 1915 | ], 1916 | "source": [ 1917 | "%run fivethirtyeight_theme.py\n", 1918 | "chart" 1919 | ] 1920 | }, 1921 | { 1922 | "cell_type": "code", 1923 | "execution_count": 15, 1924 | "metadata": {}, 1925 | "outputs": [ 1926 | { 1927 | "data": { 1928 | "application/vnd.vegalite.v2+json": { 1929 | "$schema": "https://vega.github.io/schema/vega-lite/v2.6.0.json", 1930 | "config": { 1931 | "arc": { 1932 | "fill": "#000" 1933 | }, 1934 | "area": { 1935 | "fill": "#000" 1936 | }, 1937 | "axis": { 1938 | "domain": false, 1939 | "grid": true, 1940 | "gridColor": "#FFFFFF", 1941 | "gridOpacity": 1, 1942 | "labelColor": "#7F7F7F", 1943 | "labelPadding": 4, 1944 | "tickColor": "#7F7F7F", 1945 | "tickSize": 5.67, 1946 | "titleFontSize": 16, 1947 | "titleFontWeight": "normal" 1948 | }, 1949 | "group": { 1950 | "fill": "#e5e5e5" 1951 | }, 1952 | "legend": { 1953 | "labelBaseline": "middle", 1954 | "labelFontSize": 11, 1955 | "symbolSize": 40 1956 | }, 1957 | "line": { 1958 | "stroke": "#000" 1959 | }, 1960 | "path": { 1961 | "stroke": "#000" 1962 | }, 1963 | "range": { 1964 | "category": [ 1965 | "#000000", 1966 | "#7F7F7F", 1967 | "#1A1A1A", 1968 | "#999999", 1969 | "#333333", 1970 | "#B0B0B0", 1971 | "#4D4D4D", 1972 | "#C9C9C9", 1973 | "#666666", 1974 | "#DCDCDC" 1975 | ] 1976 | }, 1977 | "rect": { 1978 | "fill": "#000" 1979 | }, 1980 | "shape": { 1981 | "stroke": "#000" 1982 | }, 1983 | "symbol": { 1984 | "fill": "#000", 1985 | "size": 40 1986 | } 1987 | }, 1988 | "data": { 1989 | "name": "data-efb252e7c57bdc7da8542a41b9a92119" 1990 | }, 1991 | "datasets": { 1992 | "data-efb252e7c57bdc7da8542a41b9a92119": [ 1993 | { 1994 | "value": -0.4610270322439197, 1995 | "variable": "A" 1996 | }, 1997 | { 1998 | "value": -0.6367343500532895, 1999 | "variable": "A" 2000 | }, 2001 | { 2002 | "value": 0.8774120795620142, 2003 | "variable": "A" 2004 | }, 2005 | { 2006 | "value": 0.03825863022523785, 2007 | "variable": "A" 2008 | }, 2009 | { 2010 | "value": 0.16534228478558757, 2011 | "variable": "A" 2012 | }, 2013 | { 2014 | "value": -1.2817002072378272, 2015 | "variable": "A" 2016 | }, 2017 | { 2018 | "value": -1.085245037265318, 2019 | "variable": "A" 2020 | }, 2021 | { 2022 | "value": -0.27755227699130036, 2023 | "variable": "A" 2024 | }, 2025 | { 2026 | "value": 1.3989583501573215, 2027 | "variable": "A" 2028 | }, 2029 | { 2030 | "value": 0.19046818945796665, 2031 | "variable": "A" 2032 | }, 2033 | { 2034 | "value": 0.19428312561992822, 2035 | "variable": "A" 2036 | }, 2037 | { 2038 | "value": -0.5676233531129963, 2039 | "variable": "A" 2040 | }, 2041 | { 2042 | "value": 0.500890590982962, 2043 | "variable": "A" 2044 | }, 2045 | { 2046 | "value": -1.3855716484122758, 2047 | "variable": "A" 2048 | }, 2049 | { 2050 | "value": -1.2546423680851004, 2051 | "variable": "A" 2052 | }, 2053 | { 2054 | "value": -0.3357912900788574, 2055 | "variable": "A" 2056 | }, 2057 | { 2058 | "value": -0.2205733984715034, 2059 | "variable": "A" 2060 | }, 2061 | { 2062 | "value": -0.38340036433532537, 2063 | "variable": "A" 2064 | }, 2065 | { 2066 | "value": 0.6614906436722245, 2067 | "variable": "A" 2068 | }, 2069 | { 2070 | "value": -0.16313042252515567, 2071 | "variable": "A" 2072 | }, 2073 | { 2074 | "value": -0.0247512080682622, 2075 | "variable": "A" 2076 | }, 2077 | { 2078 | "value": 0.4582047341126467, 2079 | "variable": "A" 2080 | }, 2081 | { 2082 | "value": 0.7640931522868072, 2083 | "variable": "A" 2084 | }, 2085 | { 2086 | "value": 0.13934191383325467, 2087 | "variable": "A" 2088 | }, 2089 | { 2090 | "value": -2.595368819795762, 2091 | "variable": "A" 2092 | }, 2093 | { 2094 | "value": 1.1469702483563833, 2095 | "variable": "A" 2096 | }, 2097 | { 2098 | "value": 0.1569965665258978, 2099 | "variable": "A" 2100 | }, 2101 | { 2102 | "value": 1.2727001883205376, 2103 | "variable": "A" 2104 | }, 2105 | { 2106 | "value": 1.022066496022976, 2107 | "variable": "A" 2108 | }, 2109 | { 2110 | "value": 1.9412742747244585, 2111 | "variable": "A" 2112 | }, 2113 | { 2114 | "value": -0.17794910128507585, 2115 | "variable": "B" 2116 | }, 2117 | { 2118 | "value": -0.19125848427380304, 2119 | "variable": "B" 2120 | }, 2121 | { 2122 | "value": 1.2870713074028026, 2123 | "variable": "B" 2124 | }, 2125 | { 2126 | "value": -0.5125688683310612, 2127 | "variable": "B" 2128 | }, 2129 | { 2130 | "value": 0.4481312599603682, 2131 | "variable": "B" 2132 | }, 2133 | { 2134 | "value": 0.6524434972811275, 2135 | "variable": "B" 2136 | }, 2137 | { 2138 | "value": 0.13585646332755005, 2139 | "variable": "B" 2140 | }, 2141 | { 2142 | "value": 0.7553857040236626, 2143 | "variable": "B" 2144 | }, 2145 | { 2146 | "value": -2.1056619465687616, 2147 | "variable": "B" 2148 | }, 2149 | { 2150 | "value": -0.9536315716472301, 2151 | "variable": "B" 2152 | }, 2153 | { 2154 | "value": -0.7169477714702117, 2155 | "variable": "B" 2156 | }, 2157 | { 2158 | "value": 0.41664317515130195, 2159 | "variable": "B" 2160 | }, 2161 | { 2162 | "value": -1.457125154898018, 2163 | "variable": "B" 2164 | }, 2165 | { 2166 | "value": -0.5404389535609037, 2167 | "variable": "B" 2168 | }, 2169 | { 2170 | "value": 0.4441621019182134, 2171 | "variable": "B" 2172 | }, 2173 | { 2174 | "value": 0.6856720785530876, 2175 | "variable": "B" 2176 | }, 2177 | { 2178 | "value": -0.4275324669827531, 2179 | "variable": "B" 2180 | }, 2181 | { 2182 | "value": -0.15047880675178543, 2183 | "variable": "B" 2184 | }, 2185 | { 2186 | "value": 0.7518239402290684, 2187 | "variable": "B" 2188 | }, 2189 | { 2190 | "value": 0.10398054362137754, 2191 | "variable": "B" 2192 | }, 2193 | { 2194 | "value": 0.12138507068140678, 2195 | "variable": "B" 2196 | }, 2197 | { 2198 | "value": -0.8323046513564163, 2199 | "variable": "B" 2200 | }, 2201 | { 2202 | "value": 0.4984733821697992, 2203 | "variable": "B" 2204 | }, 2205 | { 2206 | "value": -0.7088761396238055, 2207 | "variable": "B" 2208 | }, 2209 | { 2210 | "value": 0.9943449751503719, 2211 | "variable": "B" 2212 | }, 2213 | { 2214 | "value": -1.7586532120383742, 2215 | "variable": "B" 2216 | }, 2217 | { 2218 | "value": -0.6607685905194645, 2219 | "variable": "B" 2220 | }, 2221 | { 2222 | "value": -0.024288387357977486, 2223 | "variable": "B" 2224 | }, 2225 | { 2226 | "value": 0.050276850655552104, 2227 | "variable": "B" 2228 | }, 2229 | { 2230 | "value": -0.7038782427342452, 2231 | "variable": "B" 2232 | }, 2233 | { 2234 | "value": -1.303511032553364, 2235 | "variable": "C" 2236 | }, 2237 | { 2238 | "value": 0.3672528437509079, 2239 | "variable": "C" 2240 | }, 2241 | { 2242 | "value": 0.15431746576611127, 2243 | "variable": "C" 2244 | }, 2245 | { 2246 | "value": -0.12050701912087032, 2247 | "variable": "C" 2248 | }, 2249 | { 2250 | "value": -1.001284933212565, 2251 | "variable": "C" 2252 | }, 2253 | { 2254 | "value": -0.2540785646235349, 2255 | "variable": "C" 2256 | }, 2257 | { 2258 | "value": -0.4228158652442165, 2259 | "variable": "C" 2260 | }, 2261 | { 2262 | "value": -0.27639931019436637, 2263 | "variable": "C" 2264 | }, 2265 | { 2266 | "value": 0.7386595693388794, 2267 | "variable": "C" 2268 | }, 2269 | { 2270 | "value": -0.17027595679665597, 2271 | "variable": "C" 2272 | }, 2273 | { 2274 | "value": 1.7070936875500302, 2275 | "variable": "C" 2276 | }, 2277 | { 2278 | "value": 0.6069723319741929, 2279 | "variable": "C" 2280 | }, 2281 | { 2282 | "value": 1.0270365962403802, 2283 | "variable": "C" 2284 | }, 2285 | { 2286 | "value": 0.46758760907703006, 2287 | "variable": "C" 2288 | }, 2289 | { 2290 | "value": 0.6415122037432663, 2291 | "variable": "C" 2292 | }, 2293 | { 2294 | "value": 0.41766557380695013, 2295 | "variable": "C" 2296 | }, 2297 | { 2298 | "value": 1.2868813156207748, 2299 | "variable": "C" 2300 | }, 2301 | { 2302 | "value": -1.0361781587260608, 2303 | "variable": "C" 2304 | }, 2305 | { 2306 | "value": -1.9501744425748684, 2307 | "variable": "C" 2308 | }, 2309 | { 2310 | "value": -1.5928820139123978, 2311 | "variable": "C" 2312 | }, 2313 | { 2314 | "value": 0.6704357409608932, 2315 | "variable": "C" 2316 | }, 2317 | { 2318 | "value": -2.4463859104477996, 2319 | "variable": "C" 2320 | }, 2321 | { 2322 | "value": -1.0543874494218193, 2323 | "variable": "C" 2324 | }, 2325 | { 2326 | "value": -0.795732408142419, 2327 | "variable": "C" 2328 | }, 2329 | { 2330 | "value": 1.2816163963081522, 2331 | "variable": "C" 2332 | }, 2333 | { 2334 | "value": -0.5406420949076187, 2335 | "variable": "C" 2336 | }, 2337 | { 2338 | "value": -0.2619083589268465, 2339 | "variable": "C" 2340 | }, 2341 | { 2342 | "value": 0.4286405470799978, 2343 | "variable": "C" 2344 | }, 2345 | { 2346 | "value": -1.8172257984960618, 2347 | "variable": "C" 2348 | }, 2349 | { 2350 | "value": 0.13706777478429144, 2351 | "variable": "C" 2352 | }, 2353 | { 2354 | "value": -0.10478529407365901, 2355 | "variable": "D" 2356 | }, 2357 | { 2358 | "value": -1.051841237172554, 2359 | "variable": "D" 2360 | }, 2361 | { 2362 | "value": -0.06470035542158659, 2363 | "variable": "D" 2364 | }, 2365 | { 2366 | "value": -0.8736172744954797, 2367 | "variable": "D" 2368 | }, 2369 | { 2370 | "value": 0.31846277878321944, 2371 | "variable": "D" 2372 | }, 2373 | { 2374 | "value": 0.6776674959069814, 2375 | "variable": "D" 2376 | }, 2377 | { 2378 | "value": 0.47032013560452635, 2379 | "variable": "D" 2380 | }, 2381 | { 2382 | "value": 0.5203263914878267, 2383 | "variable": "D" 2384 | }, 2385 | { 2386 | "value": -2.1171241240093925, 2387 | "variable": "D" 2388 | }, 2389 | { 2390 | "value": 0.7675097663726791, 2391 | "variable": "D" 2392 | }, 2393 | { 2394 | "value": 1.2069713544014675, 2395 | "variable": "D" 2396 | }, 2397 | { 2398 | "value": -1.6704803693691532, 2399 | "variable": "D" 2400 | }, 2401 | { 2402 | "value": 0.9805373629100806, 2403 | "variable": "D" 2404 | }, 2405 | { 2406 | "value": 0.6477843669847971, 2407 | "variable": "D" 2408 | }, 2409 | { 2410 | "value": -1.1035182772974017, 2411 | "variable": "D" 2412 | }, 2413 | { 2414 | "value": 1.1072729284383653, 2415 | "variable": "D" 2416 | }, 2417 | { 2418 | "value": -0.1365756040215114, 2419 | "variable": "D" 2420 | }, 2421 | { 2422 | "value": -1.019079604234089, 2423 | "variable": "D" 2424 | }, 2425 | { 2426 | "value": -0.870274743982925, 2427 | "variable": "D" 2428 | }, 2429 | { 2430 | "value": 0.23746890972001847, 2431 | "variable": "D" 2432 | }, 2433 | { 2434 | "value": 0.2507531542609818, 2435 | "variable": "D" 2436 | }, 2437 | { 2438 | "value": 0.5360813826240799, 2439 | "variable": "D" 2440 | }, 2441 | { 2442 | "value": -1.2879296527634119, 2443 | "variable": "D" 2444 | }, 2445 | { 2446 | "value": -0.03261748506034418, 2447 | "variable": "D" 2448 | }, 2449 | { 2450 | "value": 0.6480358361631877, 2451 | "variable": "D" 2452 | }, 2453 | { 2454 | "value": 0.9183735174873154, 2455 | "variable": "D" 2456 | }, 2457 | { 2458 | "value": -1.2900494712547064, 2459 | "variable": "D" 2460 | }, 2461 | { 2462 | "value": -1.8242065346117304, 2463 | "variable": "D" 2464 | }, 2465 | { 2466 | "value": -1.4123442845199492, 2467 | "variable": "D" 2468 | }, 2469 | { 2470 | "value": -2.9727260876991863, 2471 | "variable": "D" 2472 | } 2473 | ] 2474 | }, 2475 | "encoding": { 2476 | "x": { 2477 | "field": "variable", 2478 | "type": "nominal" 2479 | }, 2480 | "y": { 2481 | "aggregate": "mean", 2482 | "field": "value", 2483 | "type": "quantitative" 2484 | } 2485 | }, 2486 | "mark": "bar" 2487 | }, 2488 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAJYAAAEACAYAAABRSY8IAAATZklEQVR4Xu2dX4hdxR3Hf3Nu2KJUu8RSChapChX7B18MDWpK2oJJs9YHNeymKhSC8SGtaaqtrbp37964NSJBlPpgbEpBRbdp+tI0NQ9tQzUSEQpSLVpQRBoopRLXPEQ3e+6U33ImGSfn3Plzz9w7d+/3vmRz72/mnPOdz/n9ZubM/I4gfKBABAVEhDpRJRQggAUIoigAsKLIikoBFhiIogDAiiIrKgVYYCCKAgAriqyoNAmwms3m80KISW4OKeXRLMs2tVqtD1XzTE9Pf10IcVgI8ZnC5pZ2u32g1Wo1pZSzxXcLUsoNu3btegXNOngFBg7W/ffff3Gj0diTZdk2hqnZbO6VUu7TAWGAOp3OGwxTAdnWdru9jYEkov38/eClxBnoCgwcLB0UPjEdInWiOmwKxDzP7240GvNCiGsLjzXfbren0LxpKJAkWAVg7S5gzS8uLu4YGxt7LM/zybm5ueNlQE5PT38ly7LXTanXrFnzwcTExHgaTTD8Z7GwsPDu+Pj4pSvCY6nQqS6GwTKBrGqyt99+W15++eXWm0pKKYUQVjsfNFZinWV61iqaj8DKNrSPxf0wIcRMlmVTRd9sh5TymEvnHWDZW8rnBkgSLL7EslFhnudXKnCKv7uOCtm21WqdCZ/dpANYIwKW/TLrtQBYdj1XhMeyX2a9FgDLrifAsmt0jgXAsosGsOwaAawAjQBWgGjwW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nOPU6/RSpsAZY/jJyo7K3UY1regUdMtWhNj1dGTQmWNzg/NEBNsuVQaEf6+8GWOa5c/3quE/X2cEHWP5guUCie7JnSsIhA8JQKDj1Bi4bFbKtSpKih8My+HTQf6+Bpf42va0KqSbE/spoJQCWv3xmODQ70Gb/ivtW/zPCowtYev9KwfRZIzyGgHVnxSXrYdlfFaMEwAqTUIUU7qxzp10PI2UjtTIv181jqRBmepeyUGh6Gj20uXqsMBW6lAJYYZIqUA4QES8JVp3yqglJBpFDohoZ2jzWmxWTpQyjfjwbxGYfq8w+yiQqwAoDSzUGhxVzuG52qPXQeFsBjA0sBYQa3fEgQA+NClDV9+plVFjWoQ9TBX2snnXjCpQXUrCoSnXo+DvuH/G8F0Oghvk2sNjOnG86XIwQeQrikQJQ1cfi46jOvd5XcpnH4nr1QUQt4sBj1SIjKjEVAFhgIooCACuKrKgUYIGBKAoArCiyolKABQaiKACwosiKSgEWGIiiAMCKIisqBVhgIIoC/weagWDS+/7dFwAAAABJRU5ErkJggg==", 2489 | "text/plain": [ 2490 | "\n", 2491 | "\n", 2492 | "If you see this message, it means the renderer has not been properly enabled\n", 2493 | "for the frontend that you are using. For more information, see\n", 2494 | "https://altair-viz.github.io/user_guide/troubleshooting.html\n" 2495 | ] 2496 | }, 2497 | "execution_count": 15, 2498 | "metadata": {}, 2499 | "output_type": "execute_result" 2500 | } 2501 | ], 2502 | "source": [ 2503 | "%run ggplot2_theme.py\n", 2504 | "chart" 2505 | ] 2506 | }, 2507 | { 2508 | "cell_type": "code", 2509 | "execution_count": 16, 2510 | "metadata": {}, 2511 | "outputs": [ 2512 | { 2513 | "data": { 2514 | "application/vnd.vegalite.v2+json": { 2515 | "$schema": "https://vega.github.io/schema/vega-lite/v2.6.0.json", 2516 | "config": { 2517 | "arc": { 2518 | "fill": "#3e5c69" 2519 | }, 2520 | "area": { 2521 | "fill": "#3e5c69" 2522 | }, 2523 | "axis": { 2524 | "domainWidth": 0.5, 2525 | "grid": true, 2526 | "labelPadding": 2, 2527 | "tickSize": 5, 2528 | "tickWidth": 0.5, 2529 | "titleFontWeight": "normal" 2530 | }, 2531 | "axisBand": { 2532 | "grid": false 2533 | }, 2534 | "axisX": { 2535 | "gridWidth": 0.2 2536 | }, 2537 | "axisY": { 2538 | "gridDash": [ 2539 | 3 2540 | ], 2541 | "gridWidth": 0.4 2542 | }, 2543 | "background": "#fff", 2544 | "legend": { 2545 | "labelFontSize": 11, 2546 | "padding": 1, 2547 | "symbolType": "square" 2548 | }, 2549 | "line": { 2550 | "stroke": "#3e5c69" 2551 | }, 2552 | "path": { 2553 | "stroke": "#3e5c69" 2554 | }, 2555 | "range": { 2556 | "category": [ 2557 | "#3e5c69", 2558 | "#6793a6", 2559 | "#182429", 2560 | "#0570b0", 2561 | "#3690c0", 2562 | "#74a9cf", 2563 | "#a6bddb", 2564 | "#e2ddf2" 2565 | ] 2566 | }, 2567 | "rect": { 2568 | "fill": "#3e5c69" 2569 | }, 2570 | "shape": { 2571 | "stroke": "#3e5c69" 2572 | }, 2573 | "symbol": { 2574 | "fill": "#3e5c69" 2575 | } 2576 | }, 2577 | "data": { 2578 | "name": "data-efb252e7c57bdc7da8542a41b9a92119" 2579 | }, 2580 | "datasets": { 2581 | "data-efb252e7c57bdc7da8542a41b9a92119": [ 2582 | { 2583 | "value": -0.4610270322439197, 2584 | "variable": "A" 2585 | }, 2586 | { 2587 | "value": -0.6367343500532895, 2588 | "variable": "A" 2589 | }, 2590 | { 2591 | "value": 0.8774120795620142, 2592 | "variable": "A" 2593 | }, 2594 | { 2595 | "value": 0.03825863022523785, 2596 | "variable": "A" 2597 | }, 2598 | { 2599 | "value": 0.16534228478558757, 2600 | "variable": "A" 2601 | }, 2602 | { 2603 | "value": -1.2817002072378272, 2604 | "variable": "A" 2605 | }, 2606 | { 2607 | "value": -1.085245037265318, 2608 | "variable": "A" 2609 | }, 2610 | { 2611 | "value": -0.27755227699130036, 2612 | "variable": "A" 2613 | }, 2614 | { 2615 | "value": 1.3989583501573215, 2616 | "variable": "A" 2617 | }, 2618 | { 2619 | "value": 0.19046818945796665, 2620 | "variable": "A" 2621 | }, 2622 | { 2623 | "value": 0.19428312561992822, 2624 | "variable": "A" 2625 | }, 2626 | { 2627 | "value": -0.5676233531129963, 2628 | "variable": "A" 2629 | }, 2630 | { 2631 | "value": 0.500890590982962, 2632 | "variable": "A" 2633 | }, 2634 | { 2635 | "value": -1.3855716484122758, 2636 | "variable": "A" 2637 | }, 2638 | { 2639 | "value": -1.2546423680851004, 2640 | "variable": "A" 2641 | }, 2642 | { 2643 | "value": -0.3357912900788574, 2644 | "variable": "A" 2645 | }, 2646 | { 2647 | "value": -0.2205733984715034, 2648 | "variable": "A" 2649 | }, 2650 | { 2651 | "value": -0.38340036433532537, 2652 | "variable": "A" 2653 | }, 2654 | { 2655 | "value": 0.6614906436722245, 2656 | "variable": "A" 2657 | }, 2658 | { 2659 | "value": -0.16313042252515567, 2660 | "variable": "A" 2661 | }, 2662 | { 2663 | "value": -0.0247512080682622, 2664 | "variable": "A" 2665 | }, 2666 | { 2667 | "value": 0.4582047341126467, 2668 | "variable": "A" 2669 | }, 2670 | { 2671 | "value": 0.7640931522868072, 2672 | "variable": "A" 2673 | }, 2674 | { 2675 | "value": 0.13934191383325467, 2676 | "variable": "A" 2677 | }, 2678 | { 2679 | "value": -2.595368819795762, 2680 | "variable": "A" 2681 | }, 2682 | { 2683 | "value": 1.1469702483563833, 2684 | "variable": "A" 2685 | }, 2686 | { 2687 | "value": 0.1569965665258978, 2688 | "variable": "A" 2689 | }, 2690 | { 2691 | "value": 1.2727001883205376, 2692 | "variable": "A" 2693 | }, 2694 | { 2695 | "value": 1.022066496022976, 2696 | "variable": "A" 2697 | }, 2698 | { 2699 | "value": 1.9412742747244585, 2700 | "variable": "A" 2701 | }, 2702 | { 2703 | "value": -0.17794910128507585, 2704 | "variable": "B" 2705 | }, 2706 | { 2707 | "value": -0.19125848427380304, 2708 | "variable": "B" 2709 | }, 2710 | { 2711 | "value": 1.2870713074028026, 2712 | "variable": "B" 2713 | }, 2714 | { 2715 | "value": -0.5125688683310612, 2716 | "variable": "B" 2717 | }, 2718 | { 2719 | "value": 0.4481312599603682, 2720 | "variable": "B" 2721 | }, 2722 | { 2723 | "value": 0.6524434972811275, 2724 | "variable": "B" 2725 | }, 2726 | { 2727 | "value": 0.13585646332755005, 2728 | "variable": "B" 2729 | }, 2730 | { 2731 | "value": 0.7553857040236626, 2732 | "variable": "B" 2733 | }, 2734 | { 2735 | "value": -2.1056619465687616, 2736 | "variable": "B" 2737 | }, 2738 | { 2739 | "value": -0.9536315716472301, 2740 | "variable": "B" 2741 | }, 2742 | { 2743 | "value": -0.7169477714702117, 2744 | "variable": "B" 2745 | }, 2746 | { 2747 | "value": 0.41664317515130195, 2748 | "variable": "B" 2749 | }, 2750 | { 2751 | "value": -1.457125154898018, 2752 | "variable": "B" 2753 | }, 2754 | { 2755 | "value": -0.5404389535609037, 2756 | "variable": "B" 2757 | }, 2758 | { 2759 | "value": 0.4441621019182134, 2760 | "variable": "B" 2761 | }, 2762 | { 2763 | "value": 0.6856720785530876, 2764 | "variable": "B" 2765 | }, 2766 | { 2767 | "value": -0.4275324669827531, 2768 | "variable": "B" 2769 | }, 2770 | { 2771 | "value": -0.15047880675178543, 2772 | "variable": "B" 2773 | }, 2774 | { 2775 | "value": 0.7518239402290684, 2776 | "variable": "B" 2777 | }, 2778 | { 2779 | "value": 0.10398054362137754, 2780 | "variable": "B" 2781 | }, 2782 | { 2783 | "value": 0.12138507068140678, 2784 | "variable": "B" 2785 | }, 2786 | { 2787 | "value": -0.8323046513564163, 2788 | "variable": "B" 2789 | }, 2790 | { 2791 | "value": 0.4984733821697992, 2792 | "variable": "B" 2793 | }, 2794 | { 2795 | "value": -0.7088761396238055, 2796 | "variable": "B" 2797 | }, 2798 | { 2799 | "value": 0.9943449751503719, 2800 | "variable": "B" 2801 | }, 2802 | { 2803 | "value": -1.7586532120383742, 2804 | "variable": "B" 2805 | }, 2806 | { 2807 | "value": -0.6607685905194645, 2808 | "variable": "B" 2809 | }, 2810 | { 2811 | "value": -0.024288387357977486, 2812 | "variable": "B" 2813 | }, 2814 | { 2815 | "value": 0.050276850655552104, 2816 | "variable": "B" 2817 | }, 2818 | { 2819 | "value": -0.7038782427342452, 2820 | "variable": "B" 2821 | }, 2822 | { 2823 | "value": -1.303511032553364, 2824 | "variable": "C" 2825 | }, 2826 | { 2827 | "value": 0.3672528437509079, 2828 | "variable": "C" 2829 | }, 2830 | { 2831 | "value": 0.15431746576611127, 2832 | "variable": "C" 2833 | }, 2834 | { 2835 | "value": -0.12050701912087032, 2836 | "variable": "C" 2837 | }, 2838 | { 2839 | "value": -1.001284933212565, 2840 | "variable": "C" 2841 | }, 2842 | { 2843 | "value": -0.2540785646235349, 2844 | "variable": "C" 2845 | }, 2846 | { 2847 | "value": -0.4228158652442165, 2848 | "variable": "C" 2849 | }, 2850 | { 2851 | "value": -0.27639931019436637, 2852 | "variable": "C" 2853 | }, 2854 | { 2855 | "value": 0.7386595693388794, 2856 | "variable": "C" 2857 | }, 2858 | { 2859 | "value": -0.17027595679665597, 2860 | "variable": "C" 2861 | }, 2862 | { 2863 | "value": 1.7070936875500302, 2864 | "variable": "C" 2865 | }, 2866 | { 2867 | "value": 0.6069723319741929, 2868 | "variable": "C" 2869 | }, 2870 | { 2871 | "value": 1.0270365962403802, 2872 | "variable": "C" 2873 | }, 2874 | { 2875 | "value": 0.46758760907703006, 2876 | "variable": "C" 2877 | }, 2878 | { 2879 | "value": 0.6415122037432663, 2880 | "variable": "C" 2881 | }, 2882 | { 2883 | "value": 0.41766557380695013, 2884 | "variable": "C" 2885 | }, 2886 | { 2887 | "value": 1.2868813156207748, 2888 | "variable": "C" 2889 | }, 2890 | { 2891 | "value": -1.0361781587260608, 2892 | "variable": "C" 2893 | }, 2894 | { 2895 | "value": -1.9501744425748684, 2896 | "variable": "C" 2897 | }, 2898 | { 2899 | "value": -1.5928820139123978, 2900 | "variable": "C" 2901 | }, 2902 | { 2903 | "value": 0.6704357409608932, 2904 | "variable": "C" 2905 | }, 2906 | { 2907 | "value": -2.4463859104477996, 2908 | "variable": "C" 2909 | }, 2910 | { 2911 | "value": -1.0543874494218193, 2912 | "variable": "C" 2913 | }, 2914 | { 2915 | "value": -0.795732408142419, 2916 | "variable": "C" 2917 | }, 2918 | { 2919 | "value": 1.2816163963081522, 2920 | "variable": "C" 2921 | }, 2922 | { 2923 | "value": -0.5406420949076187, 2924 | "variable": "C" 2925 | }, 2926 | { 2927 | "value": -0.2619083589268465, 2928 | "variable": "C" 2929 | }, 2930 | { 2931 | "value": 0.4286405470799978, 2932 | "variable": "C" 2933 | }, 2934 | { 2935 | "value": -1.8172257984960618, 2936 | "variable": "C" 2937 | }, 2938 | { 2939 | "value": 0.13706777478429144, 2940 | "variable": "C" 2941 | }, 2942 | { 2943 | "value": -0.10478529407365901, 2944 | "variable": "D" 2945 | }, 2946 | { 2947 | "value": -1.051841237172554, 2948 | "variable": "D" 2949 | }, 2950 | { 2951 | "value": -0.06470035542158659, 2952 | "variable": "D" 2953 | }, 2954 | { 2955 | "value": -0.8736172744954797, 2956 | "variable": "D" 2957 | }, 2958 | { 2959 | "value": 0.31846277878321944, 2960 | "variable": "D" 2961 | }, 2962 | { 2963 | "value": 0.6776674959069814, 2964 | "variable": "D" 2965 | }, 2966 | { 2967 | "value": 0.47032013560452635, 2968 | "variable": "D" 2969 | }, 2970 | { 2971 | "value": 0.5203263914878267, 2972 | "variable": "D" 2973 | }, 2974 | { 2975 | "value": -2.1171241240093925, 2976 | "variable": "D" 2977 | }, 2978 | { 2979 | "value": 0.7675097663726791, 2980 | "variable": "D" 2981 | }, 2982 | { 2983 | "value": 1.2069713544014675, 2984 | "variable": "D" 2985 | }, 2986 | { 2987 | "value": -1.6704803693691532, 2988 | "variable": "D" 2989 | }, 2990 | { 2991 | "value": 0.9805373629100806, 2992 | "variable": "D" 2993 | }, 2994 | { 2995 | "value": 0.6477843669847971, 2996 | "variable": "D" 2997 | }, 2998 | { 2999 | "value": -1.1035182772974017, 3000 | "variable": "D" 3001 | }, 3002 | { 3003 | "value": 1.1072729284383653, 3004 | "variable": "D" 3005 | }, 3006 | { 3007 | "value": -0.1365756040215114, 3008 | "variable": "D" 3009 | }, 3010 | { 3011 | "value": -1.019079604234089, 3012 | "variable": "D" 3013 | }, 3014 | { 3015 | "value": -0.870274743982925, 3016 | "variable": "D" 3017 | }, 3018 | { 3019 | "value": 0.23746890972001847, 3020 | "variable": "D" 3021 | }, 3022 | { 3023 | "value": 0.2507531542609818, 3024 | "variable": "D" 3025 | }, 3026 | { 3027 | "value": 0.5360813826240799, 3028 | "variable": "D" 3029 | }, 3030 | { 3031 | "value": -1.2879296527634119, 3032 | "variable": "D" 3033 | }, 3034 | { 3035 | "value": -0.03261748506034418, 3036 | "variable": "D" 3037 | }, 3038 | { 3039 | "value": 0.6480358361631877, 3040 | "variable": "D" 3041 | }, 3042 | { 3043 | "value": 0.9183735174873154, 3044 | "variable": "D" 3045 | }, 3046 | { 3047 | "value": -1.2900494712547064, 3048 | "variable": "D" 3049 | }, 3050 | { 3051 | "value": -1.8242065346117304, 3052 | "variable": "D" 3053 | }, 3054 | { 3055 | "value": -1.4123442845199492, 3056 | "variable": "D" 3057 | }, 3058 | { 3059 | "value": -2.9727260876991863, 3060 | "variable": "D" 3061 | } 3062 | ] 3063 | }, 3064 | "encoding": { 3065 | "x": { 3066 | "field": "variable", 3067 | "type": "nominal" 3068 | }, 3069 | "y": { 3070 | "aggregate": "mean", 3071 | "field": "value", 3072 | "type": "quantitative" 3073 | } 3074 | }, 3075 | "mark": "bar" 3076 | }, 3077 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAI4AAAD5CAYAAADx2g1xAAAQUklEQVR4Xu2dT2hXVxbHTzSTNBa6SUZoqZC6MA6zsFChC8MwZGFiKRQqJQuTRXEhxKCk/FyFxMSQnRgo8oMswsAkhRqYQmkXjQUHpumiTBGzmMGASEhwVd0Uqk3GmuFce+P9PX/v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=", 3078 | "text/plain": [ 3079 | "\n", 3080 | "\n", 3081 | "If you see this message, it means the renderer has not been properly enabled\n", 3082 | "for the frontend that you are using. For more information, see\n", 3083 | "https://altair-viz.github.io/user_guide/troubleshooting.html\n" 3084 | ] 3085 | }, 3086 | "execution_count": 16, 3087 | "metadata": {}, 3088 | "output_type": "execute_result" 3089 | } 3090 | ], 3091 | "source": [ 3092 | "%run vox_theme.py\n", 3093 | "chart" 3094 | ] 3095 | }, 3096 | { 3097 | "cell_type": "code", 3098 | "execution_count": null, 3099 | "metadata": {}, 3100 | "outputs": [], 3101 | "source": [] 3102 | } 3103 | ], 3104 | "metadata": { 3105 | "kernelspec": { 3106 | "display_name": "Python 3", 3107 | "language": "python", 3108 | "name": "python3" 3109 | }, 3110 | "language_info": { 3111 | "codemirror_mode": { 3112 | "name": "ipython", 3113 | "version": 3 3114 | }, 3115 | "file_extension": ".py", 3116 | "mimetype": "text/x-python", 3117 | "name": "python", 3118 | "nbconvert_exporter": "python", 3119 | "pygments_lexer": "ipython3", 3120 | "version": "3.6.3" 3121 | } 3122 | }, 3123 | "nbformat": 4, 3124 | "nbformat_minor": 2 3125 | } 3126 | -------------------------------------------------------------------------------- /notebooks/000 importing packages.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "Solving environment: done\n", 13 | "\n", 14 | "\n", 15 | "==> WARNING: A newer version of conda exists. <==\n", 16 | " current version: 4.5.8\n", 17 | " latest version: 4.5.11\n", 18 | "\n", 19 | "Please update conda by running\n", 20 | "\n", 21 | " $ conda update -n base conda\n", 22 | "\n", 23 | "\n", 24 | "\n", 25 | "## Package Plan ##\n", 26 | "\n", 27 | " environment location: /opt/conda\n", 28 | "\n", 29 | " added / updated specs: \n", 30 | " - altair\n", 31 | " - vega\n", 32 | " - vega_datasets\n", 33 | "\n", 34 | "\n", 35 | "The following packages will be downloaded:\n", 36 | "\n", 37 | " package | build\n", 38 | " ---------------------------|-----------------\n", 39 | " jupyter-1.0.0 | py_1 6 KB conda-forge\n", 40 | " vega_datasets-0.5.0 | py_0 163 KB conda-forge\n", 41 | " vega-1.4.0 | py36_1 1.6 MB conda-forge\n", 42 | " qt-5.6.3 | h39df351_0 44.6 MB defaults\n", 43 | " altair-2.2.2 | py36_1 461 KB conda-forge\n", 44 | " jupyter_console-5.2.0 | py36_1 34 KB conda-forge\n", 45 | " pyqt-5.6.0 | py36h8210e8a_7 5.4 MB conda-forge\n", 46 | " certifi-2018.8.24 | py36_1001 139 KB conda-forge\n", 47 | " qtconsole-4.4.1 | py36_1 156 KB conda-forge\n", 48 | " ------------------------------------------------------------\n", 49 | " Total: 52.6 MB\n", 50 | "\n", 51 | "The following NEW packages will be INSTALLED:\n", 52 | "\n", 53 | " altair: 2.2.2-py36_1 conda-forge\n", 54 | " jupyter: 1.0.0-py_1 conda-forge\n", 55 | " jupyter_console: 5.2.0-py36_1 conda-forge\n", 56 | " pyqt: 5.6.0-py36h8210e8a_7 conda-forge\n", 57 | " qt: 5.6.3-h39df351_0 defaults \n", 58 | " qtconsole: 4.4.1-py36_1 conda-forge\n", 59 | " vega: 1.4.0-py36_1 conda-forge\n", 60 | " vega_datasets: 0.5.0-py_0 conda-forge\n", 61 | "\n", 62 | "The following packages will be UPDATED:\n", 63 | "\n", 64 | " certifi: 2018.8.24-py36_1 conda-forge --> 2018.8.24-py36_1001 conda-forge\n", 65 | "\n", 66 | "\n", 67 | "Downloading and Extracting Packages\n", 68 | "jupyter-1.0.0 | 6 KB | ####################################### | 100% \n", 69 | "vega_datasets-0.5.0 | 163 KB | ####################################### | 100% \n", 70 | "vega-1.4.0 | 1.6 MB | ####################################### | 100% \n", 71 | "qt-5.6.3 | 44.6 MB | ####################################### | 100% \n", 72 | "altair-2.2.2 | 461 KB | ####################################### | 100% \n", 73 | "jupyter_console-5.2. | 34 KB | ####################################### | 100% \n", 74 | "pyqt-5.6.0 | 5.4 MB | ####################################### | 100% \n", 75 | "certifi-2018.8.24 | 139 KB | ####################################### | 100% \n", 76 | "qtconsole-4.4.1 | 156 KB | ####################################### | 100% \n", 77 | "Preparing transaction: done\n", 78 | "Verifying transaction: done\n", 79 | "Executing transaction: done\n" 80 | ] 81 | } 82 | ], 83 | "source": [ 84 | "!conda install -c conda-forge altair vega vega_datasets -y" 85 | ] 86 | }, 87 | { 88 | "cell_type": "code", 89 | "execution_count": null, 90 | "metadata": {}, 91 | "outputs": [], 92 | "source": [] 93 | } 94 | ], 95 | "metadata": { 96 | "kernelspec": { 97 | "display_name": "Python 3", 98 | "language": "python", 99 | "name": "python3" 100 | }, 101 | "language_info": { 102 | "codemirror_mode": { 103 | "name": "ipython", 104 | "version": 3 105 | }, 106 | "file_extension": ".py", 107 | "mimetype": "text/x-python", 108 | "name": "python", 109 | "nbconvert_exporter": "python", 110 | "pygments_lexer": "ipython3", 111 | "version": "3.6.3" 112 | } 113 | }, 114 | "nbformat": 4, 115 | "nbformat_minor": 2 116 | } 117 | -------------------------------------------------------------------------------- /notebooks/excel_theme.py: -------------------------------------------------------------------------------- 1 | def excel_theme(): 2 | markColor = '#4572a7' 3 | return { 4 | 'config': { 5 | 'background': '#fff', 6 | 'arc': { 7 | 'fill': markColor 8 | }, 9 | 'area': { 10 | 'fill': markColor 11 | }, 12 | 'line': { 13 | 'stroke': markColor, 14 | 'strokeWidth': 2 15 | }, 16 | 'path': { 17 | 'stroke': markColor 18 | }, 19 | 'rect': { 20 | 'fill': markColor 21 | }, 22 | 'shape': { 23 | 'stroke': markColor 24 | }, 25 | 'symbol': { 26 | 'fill': markColor, 27 | 'strokeWidth': 1.5, 28 | 'size': 50 29 | }, 30 | 'axis': { 31 | 'bandPosition': 0.5, 32 | 'grid': True, 33 | 'gridColor': '#000000', 34 | 'gridOpacity': 1, 35 | 'gridWidth': 0.5, 36 | 'labelPadding': 10, 37 | 'tickSize': 5, 38 | 'tickWidth': 0.5, 39 | }, 40 | 'axisBand': { 41 | 'grid': False, 42 | 'tickExtra': True, 43 | }, 44 | 'legend': { 45 | 'labelBaseline': 'middle', 46 | 'labelFontSize': 11, 47 | 'symbolSize': 50, 48 | 'symbolType': 'square', 49 | }, 50 | 'range': { 51 | 'category': [ 52 | '#4572a7', 53 | '#aa4643', 54 | '#8aa453', 55 | '#71598e', 56 | '#4598ae', 57 | '#d98445', 58 | '#94aace', 59 | '#d09393', 60 | '#b9cc98', 61 | '#a99cbc', 62 | ], 63 | }, 64 | } 65 | 66 | } 67 | 68 | import altair as alt 69 | 70 | # register the custom theme under a chosen name 71 | alt.themes.register('excel_theme', excel_theme) 72 | 73 | # enable the newly registered theme 74 | alt.themes.enable('excel_theme') -------------------------------------------------------------------------------- /notebooks/fivethirtyeight_theme.py: -------------------------------------------------------------------------------- 1 | def fivethirtyeight_theme(): 2 | markColor = '#30a2da' 3 | axisColor = '#cbcbcb' 4 | backgroundColor = '#f0f0f0' 5 | return { 6 | 'config': { 7 | 'arc': { 8 | 'fill': markColor 9 | }, 10 | 'area': { 11 | 'fill': markColor 12 | }, 13 | 'axisBand': { 14 | 'grid': False, 15 | }, 16 | 'axisBottom': { 17 | 'domain': False, 18 | 'domainColor': 'black', 19 | 'domainWidth': 3, 20 | 'grid': True, 21 | 'gridColor': axisColor, 22 | 'gridWidth': 1, 23 | 'labelFontSize': 12, 24 | 'labelPadding': 4, 25 | 'tickColor': axisColor, 26 | 'tickSize': 10, 27 | 'titleFontSize': 14, 28 | 'titlePadding': 10, 29 | }, 30 | 'axisLeft': { 31 | 'domainColor': axisColor, 32 | 'domainWidth': 1, 33 | 'gridColor': axisColor, 34 | 'gridWidth': 1, 35 | 'labelFontSize': 12, 36 | 'labelPadding': 4, 37 | 'tickColor': axisColor, 38 | 'tickSize': 10, 39 | 'ticks': True, 40 | 'titleFontSize': 14, 41 | 'titlePadding': 10, 42 | }, 43 | 'axisRight': { 44 | 'domainColor': axisColor, 45 | 'domainWidth': 1, 46 | 'gridColor': axisColor, 47 | 'gridWidth': 1, 48 | 'labelFontSize': 12, 49 | 'labelPadding': 4, 50 | 'tickColor': axisColor, 51 | 'tickSize': 10, 52 | 'ticks': True, 53 | 'titleFontSize': 14, 54 | 'titlePadding': 10, 55 | }, 56 | 'axisTop': { 57 | 'domain': False, 58 | 'domainColor': 'black', 59 | 'domainWidth': 3, 60 | 'grid': True, 61 | 'gridColor': axisColor, 62 | 'gridWidth': 1, 63 | 'labelFontSize': 12, 64 | 'labelPadding': 4, 65 | 'tickColor': axisColor, 66 | 'tickSize': 10, 67 | 'titleFontSize': 14, 68 | 'titlePadding': 10, 69 | }, 70 | 'background': backgroundColor, 71 | 'group': { 72 | 'fill': backgroundColor, 73 | }, 74 | 'legend': { 75 | 'labelFontSize': 11, 76 | 'padding': 1, 77 | 'symbolSize': 30, 78 | 'symbolType': 'square', 79 | 'titleFontSize': 14, 80 | 'titlePadding': 10, 81 | }, 82 | 'line': { 83 | 'stroke': markColor, 84 | 'strokeWidth': 2, 85 | }, 86 | 'path': { 87 | 'stroke': markColor, 88 | 'strokeWidth': 0.5 89 | }, 90 | 'point': { 91 | 'filled': True 92 | }, 93 | 'rect': { 94 | 'fill': markColor 95 | }, 96 | 'range': { 97 | 'category': [ 98 | '#30a2da', 99 | '#fc4f30', 100 | '#e5ae38', 101 | '#6d904f', 102 | '#8b8b8b', 103 | '#b96db8', 104 | '#ff9e27', 105 | '#56cc60', 106 | '#52d2ca', 107 | '#52689e', 108 | '#545454', 109 | '#9fe4f8', 110 | ], 111 | 'diverging': [ 112 | '#cc0020', 113 | '#e77866', 114 | '#f6e7e1', 115 | '#d6e8ed', 116 | '#91bfd9', 117 | '#1d78b5', 118 | ], 119 | 'heatmap': ['#d6e8ed', '#cee0e5', '#91bfd9', '#549cc6', '#1d78b5'], 120 | }, 121 | 'symbol': { 122 | 'opacity': 1, 123 | 'shape': 'circle', 124 | 'size': 40, 125 | 'strokeWidth': 1, 126 | }, 127 | 'shape': { 128 | 'stroke': markColor 129 | }, 130 | 'style': { 131 | 'bar': { 132 | 'binSpacing': 2, 133 | 'fill': markColor, 134 | 'stroke': None, 135 | }, 136 | }, 137 | 'title': { 138 | 'anchor': 'start', 139 | 'fontSize': 24, 140 | 'fontWeight': 600, 141 | 'offset': 20, 142 | }, 143 | } 144 | } 145 | 146 | import altair as alt 147 | 148 | # register the custom theme under a chosen name 149 | alt.themes.register('fivethirtyeight_theme', fivethirtyeight_theme) 150 | 151 | # enable the newly registered theme 152 | alt.themes.enable('fivethirtyeight_theme') -------------------------------------------------------------------------------- /notebooks/ggplot2_theme.py: -------------------------------------------------------------------------------- 1 | def ggplot2_theme(): 2 | markColor = '#000' 3 | return { 4 | 'config': { 5 | 'group': { 6 | 'fill': '#e5e5e5', 7 | }, 8 | 'arc': { 9 | 'fill': markColor 10 | }, 11 | 'area': { 12 | 'fill': markColor 13 | }, 14 | 'line': { 15 | 'stroke': markColor 16 | }, 17 | 'path': { 18 | 'stroke': markColor 19 | }, 20 | 'rect': { 21 | 'fill': markColor 22 | }, 23 | 'shape': { 24 | 'stroke': markColor 25 | }, 26 | 'symbol': { 27 | 'fill': markColor, 28 | 'size': 40 29 | }, 30 | 'axis': { 31 | 'domain': False, 32 | 'grid': True, 33 | 'gridColor': '#FFFFFF', 34 | 'gridOpacity': 1, 35 | 'labelColor': '#7F7F7F', 36 | 'labelPadding': 4, 37 | 'tickColor': '#7F7F7F', 38 | 'tickSize': 5.67, 39 | 'titleFontSize': 16, 40 | 'titleFontWeight': 'normal', 41 | }, 42 | 'legend': { 43 | 'labelBaseline': 'middle', 44 | 'labelFontSize': 11, 45 | 'symbolSize': 40, 46 | }, 47 | 'range': { 48 | 'category': [ 49 | '#000000', 50 | '#7F7F7F', 51 | '#1A1A1A', 52 | '#999999', 53 | '#333333', 54 | '#B0B0B0', 55 | '#4D4D4D', 56 | '#C9C9C9', 57 | '#666666', 58 | '#DCDCDC', 59 | ], 60 | }, 61 | } 62 | } 63 | 64 | 65 | import altair as alt 66 | 67 | # register the custom theme under a chosen name 68 | alt.themes.register('ggplot2_theme', ggplot2_theme) 69 | 70 | # enable the newly registered theme 71 | alt.themes.enable('ggplot2_theme') -------------------------------------------------------------------------------- /notebooks/theme.py: -------------------------------------------------------------------------------- 1 | def custom_theme(): 2 | markColor = "#282828" 3 | axisColor = "#282828" 4 | backgroundColor = "#FFFAFA" 5 | font = "Lato" 6 | labelfont = "Lato" 7 | sourcefont = "Lato" 8 | gridColor = "#C9C9C9" 9 | return { 10 | "width": 685, 11 | # "height": 400, 12 | "autosize": "fit", 13 | "config": { 14 | "padding": 10, 15 | "geoshape": { 16 | "fill": "#C0C0C0", 17 | }, 18 | "arc": { 19 | "fill": markColor, 20 | }, 21 | "area": { 22 | "fill": markColor, 23 | }, 24 | "axisBand": { 25 | "grid": False, 26 | }, 27 | "axisBottom": { 28 | "domain": False, 29 | "domainColor": "black", 30 | "domainWidth": 3, 31 | "grid": True, 32 | "gridColor": gridColor, 33 | "gridWidth": 1, 34 | "labelFontSize": 20, 35 | "labelFont": labelfont, 36 | "labelPadding": 8, 37 | "labelAngle": 0, 38 | "tickColor": axisColor, 39 | "tickSize": 10, 40 | "titleFontSize": 16, 41 | "titlePadding": 10, 42 | "titleFont": font, 43 | "title": "", 44 | }, 45 | "axisLeft": { 46 | "domainColor": axisColor, 47 | "domainWidth": 1, 48 | "gridColor": gridColor, 49 | "gridWidth": 1, 50 | "labelFontSize": 20, 51 | "labelFont": labelfont, 52 | "labelPadding": 8, 53 | "tickColor": axisColor, 54 | "tickSize": 10, 55 | "tickCount": 10, 56 | "ticks": True, 57 | "titleFontSize": 18, 58 | "titlePadding": 10, 59 | "titleFont": font, 60 | }, 61 | "axisRight": { 62 | "domainColor": axisColor, 63 | "domainWidth": 1, 64 | "gridColor": gridColor, 65 | "gridWidth": 1, 66 | "labelFontSize": 12, 67 | "labelFont": labelfont, 68 | "labelPadding": 4, 69 | "tickColor": axisColor, 70 | "tickSize": 10, 71 | "ticks": True, 72 | "titleFontSize": 14, 73 | "titlePadding": 10, 74 | "titleFont": font, 75 | }, 76 | "axisTop": { 77 | "domain": False, 78 | "domainColor": "black", 79 | "domainWidth": 3, 80 | "grid": True, 81 | "gridColor": gridColor, 82 | "gridWidth": 1, 83 | "labelFontSize": 12, 84 | "labelFont": labelfont, 85 | "labelPadding": 4, 86 | "tickColor": axisColor, 87 | "tickSize": 10, 88 | "titleFontSize": 14, 89 | "titlePadding": 10, 90 | "titleFont": font, 91 | }, 92 | "background": backgroundColor, 93 | "group": { 94 | "fill": backgroundColor, 95 | }, 96 | "legend": { 97 | "labelFontSize": 30, 98 | "labelFont": labelfont, 99 | "labelLimit": 500, 100 | "padding": 10, 101 | "symbolSize": 500, 102 | "symbolType": "square", 103 | "titleFontSize": 30, 104 | "titlePadding": 10, 105 | "titleFont": font, 106 | }, 107 | "line": { 108 | "color": markColor, 109 | "stroke": markColor, 110 | "strokewidth": 5, 111 | }, 112 | "trail": { 113 | "color": markColor, 114 | "stroke": markColor, 115 | "strokeWidth": 0, 116 | "size": 5, 117 | }, 118 | "path": { 119 | "stroke": markColor, 120 | "strokeWidth": 0.5, 121 | }, 122 | "point": { 123 | "filled": True, 124 | }, 125 | "rect": { 126 | "fill": "#A20C4B", 127 | "opacity": 0.3, 128 | }, 129 | "range": { 130 | "category": ["#dc0d7a", "#02a3cd", "#e4a100", "#dc0d12", "#0DDC6F","#074a7e", "#e46800", "#aa3594", "#a20c4b"], 131 | "diverging": [ 132 | "#dc0d12", 133 | "#e9686b", 134 | "#fbe1e1", 135 | "#dff4f9", 136 | "#81d1e6", 137 | "#03a3cd" 138 | ], 139 | "heatmap": [ 140 | "#fcdfef", 141 | "#f8bfde", 142 | "#f59fce", 143 | "#f180be", 144 | "#ee60ad", 145 | "#eb409d", 146 | "#e7208c", 147 | "#e4007c", 148 | ], 149 | }, 150 | "symbol": { 151 | "opacity": 1, 152 | "shape": "circle", 153 | "size": 40, 154 | "strokeWidth": 1, 155 | }, 156 | "style": { 157 | "bar": { 158 | "binSpacing": 2, 159 | "fill": markColor, 160 | "stroke": False, 161 | }, 162 | "text": { 163 | "font": sourcefont, 164 | "fontSize": 10, 165 | "align": "right", 166 | "text": "Made by @ChekosWH", 167 | "href": "https://twitter.com/ChekosWH", 168 | "fontWeight": 100, 169 | "size": 10, 170 | "dx": 300, 171 | } 172 | }, 173 | "title":{ 174 | "anchor": "start", 175 | "fontSize": 12, 176 | "fontWeight": 200, 177 | "font": font, 178 | "offset": 20, 179 | }, 180 | "view": { 181 | "stroke": False, 182 | "padding": 15, 183 | }, 184 | "header": { 185 | "fontWeight": 400, 186 | "labelFontSize": 28, 187 | "labelFont": labelfont, 188 | "titleFontSize": 28, 189 | "titleFont": font, 190 | "title": " ", 191 | "titleBaseline": "bottom", 192 | "titleOffset": -30, 193 | }, 194 | }, 195 | } 196 | 197 | 198 | import altair as alt 199 | alt.themes.register("my_theme", custom_theme) 200 | alt.themes.enable("my_theme") -------------------------------------------------------------------------------- /notebooks/urban_theme.py: -------------------------------------------------------------------------------- 1 | def urban_theme(): 2 | markColor = "#1696d2" 3 | axisColor = "#000000" 4 | backgroundColor = "#FFFFFF" 5 | font = "Lato" 6 | labelFont = "Lato" 7 | sourceFont = "Lato" 8 | gridColor = "#DEDDDD" 9 | main_palette = ["#1696d2", 10 | "#d2d2d2", 11 | "#000000", 12 | "#fdbf11", 13 | "#ec008b", 14 | "#55b748", 15 | "#5c5859", 16 | "#db2b27", 17 | ] 18 | sequential_palette = ["#cfe8f3", 19 | "#a2d4ec", 20 | "#73bfe2", 21 | "#46abdb", 22 | "#1696d2", 23 | "#12719e", 24 | ] 25 | return { 26 | "width": 685, 27 | "height": 380, 28 | # "autosize": "fit", 29 | "config": { 30 | "title": { 31 | "anchor": "start", 32 | "fontSize": 18, 33 | "font": font, 34 | "fontColor": "#000000" 35 | }, 36 | "axisX": { 37 | "domain": True, 38 | "domainColor": axisColor, 39 | "domainWidth": 1, 40 | "grid": False, 41 | "labelFontSize": 12, 42 | "labelFont": labelFont, 43 | "labelAngle": 0, 44 | "tickColor": axisColor, 45 | "tickSize": 5, 46 | "titleFontSize": 12, 47 | "titlePadding": 10, 48 | "titleFont": font, 49 | "title": "", 50 | }, 51 | "axisY": { 52 | "domain": False, 53 | "grid": True, 54 | "gridColor": gridColor, 55 | "gridWidth": 1, 56 | "labelFontSize": 12, 57 | "labelFont": labelFont, 58 | "labelPadding": 8, 59 | "ticks": False, 60 | "titleFontSize": 12, 61 | "titlePadding": 10, 62 | "titleFont": font, 63 | "titleAngle": 0, 64 | "titleY": -10, 65 | "titleX": 18, 66 | }, 67 | "background": backgroundColor, 68 | "legend": { 69 | "labelFontSize": 12, 70 | "labelFont": labelFont, 71 | "symbolSize": 100, 72 | "symbolType": "square", 73 | "titleFontSize": 12, 74 | "titlePadding": 10, 75 | "titleFont": font, 76 | "title": "", 77 | "orient": "top-left", 78 | "offset": 0, 79 | }, 80 | "view": { 81 | "stroke": "transparent", 82 | }, 83 | "range": { 84 | "category": main_palette, 85 | "diverging": sequential_palette, 86 | }, 87 | "area": { 88 | "fill": markColor, 89 | }, 90 | "line": { 91 | "color": markColor, 92 | "stroke": markColor, 93 | "strokewidth": 5, 94 | }, 95 | "trail": { 96 | "color": markColor, 97 | "stroke": markColor, 98 | "strokeWidth": 0, 99 | "size": 1, 100 | }, 101 | "path": { 102 | "stroke": markColor, 103 | "strokeWidth": 0.5, 104 | }, 105 | "point": { 106 | "filled": True, 107 | }, 108 | "text": { 109 | "font": sourceFont, 110 | "color": markColor, 111 | "fontSize": 11, 112 | "align": "right", 113 | "fontWeight": 400, 114 | "size": 11, 115 | }, 116 | "bar": { 117 | "size": 40, 118 | "binSpacing": 1, 119 | "continuousBandSize": 30, 120 | "discreteBandSize": 30, 121 | "fill": markColor, 122 | "stroke": False, 123 | }, 124 | }, 125 | } 126 | 127 | 128 | import altair as alt 129 | alt.themes.register("my_custom_theme", urban_theme) 130 | alt.themes.enable("my_custom_theme") -------------------------------------------------------------------------------- /notebooks/vox_theme.py: -------------------------------------------------------------------------------- 1 | def vox_theme(): 2 | markColor = '#3e5c69' 3 | 4 | return { 5 | 'config': { 6 | 'background': '#fff', 7 | 'arc': { 8 | 'fill': markColor 9 | }, 10 | 'area': { 11 | 'fill': markColor 12 | }, 13 | 'line': { 14 | 'stroke': markColor 15 | }, 16 | 'path': { 17 | 'stroke': markColor 18 | }, 19 | 'rect': { 20 | 'fill': markColor 21 | }, 22 | 'shape': { 23 | 'stroke': markColor 24 | }, 25 | 'symbol': { 26 | 'fill': markColor 27 | }, 28 | 'axis': { 29 | 'domainWidth': 0.5, 30 | 'grid': True, 31 | 'labelPadding': 2, 32 | 'tickSize': 5, 33 | 'tickWidth': 0.5, 34 | 'titleFontWeight': 'normal', 35 | }, 36 | 'axisBand': { 37 | 'grid': False, 38 | }, 39 | 'axisX': { 40 | 'gridWidth': 0.2, 41 | }, 42 | 'axisY': { 43 | 'gridDash': [3], 44 | 'gridWidth': 0.4, 45 | }, 46 | 'legend': { 47 | 'labelFontSize': 11, 48 | 'padding': 1, 49 | 'symbolType': 'square', 50 | }, 51 | 'range': { 52 | 'category': [ 53 | '#3e5c69', 54 | '#6793a6', 55 | '#182429', 56 | '#0570b0', 57 | '#3690c0', 58 | '#74a9cf', 59 | '#a6bddb', 60 | '#e2ddf2', 61 | ], 62 | }, 63 | } 64 | 65 | } 66 | 67 | import altair as alt 68 | 69 | # register the custom theme under a chosen name 70 | alt.themes.register('vox_theme', vox_theme) 71 | 72 | # enable the newly registered theme 73 | alt.themes.enable('vox_theme') --------------------------------------------------------------------------------