<jupyter_start><jupyter_text>A Post Exploring Altair> A tutorial of fastpages for Jupyter notebooks.- toc: true - badges: false- comments: false- categories: [altair,jupyter,python]  This Is The Tool We HaveI'm trying out the fastpages in hopes that I wont have to spend the time building out my own website toolset. I've been slowly building something out of [Wagtail](https://wagtail.io/) which is a really just Djnago with some bells.The real allure though is going to be the Notebook conversions - specifically the Data Visualizations. The library for interactive version is [Altair](https://altair-viz.github.io/getting_started/overview.html) and we're going to explore some data!<jupyter_code># hide
import altair as alt

# load a simple dataset as a pandas DataFrame
from vega_datasets import data<jupyter_output><empty_output><jupyter_text>Lets Explore!So, the tutorial for **Scatter Plot** uses the car data but I figured we mind as well do the classic Iris dataset.We'll start by importing the dataset from `vega_datasets` - which is the Javascript library that **Altair** is built on top of - using `iris = data.iris()`.<jupyter_code>iris = data.iris()
iris<jupyter_output><empty_output><jupyter_text>First lets see the graph - and then we'll discuss the functions<jupyter_code>alt\
    .Chart(iris)\
    .mark_point()\
    .encode(
        x='sepalLength',
        y='sepalWidth',
        color='species',
        tooltip = ['species', 'petalLength', 'petalWidth']
    )\
    .interactive()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09138381201044386, 'fraction_numerical': 0.0, 'mean_word_length': 4.594890510948905, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '234282', 'license': 'Apache-2.0', 'n_tokens_mistral': 481, 'n_tokens_neox': 464, 'n_words': 174, 'path': '_notebooks/2020-09-06-exploring-altair-visualization.ipynb', 'repo_name': 'Shoklan/fast-pride', 'size': '1532'}