<jupyter_start><jupyter_text>Example 1: Diamonds DatasetThe first example we will use is the classic diamonds dataset packaged with ggplot as well as seaborn. This first example is great for getting introduced to the basic discrete and continuous summaries.Recommended Explorations:  - Try playing with number of bins on carat  - Try removing outliers for the x, y, and z variables<jupyter_code>data = sns.load_dataset("diamonds")
data["cut"] = pd.Categorical(data["cut"], categories=["Fair", "Good", "Very Good", "Premium", "Ideal"], ordered=True)
data["color"] = pd.Categorical(data["color"], categories=["D", "E", "F", "G", "H", "I", "J"], ordered=True)
data["clarity"] = pd.Categorical(data["clarity"], categories=["I1", "SI1", "SI2", "VS2", "VS1", "VVS2", "VVS1", "IF"], ordered=True)
univariate_eda_interact(data, notes_file="tmp.json", figure_dir=".")<jupyter_output><empty_output><jupyter_text>Example 2: Tidy Tuesday GDPR ViolationsRecommended Explorations:- Try using a log transform on the price column.- Check out the date column for an example of a datetime summary. Try setting the Lower Trim option to 20 so you can see the main time series.- Check out the summary column for an example of a text summary. By default, doesn't compute top ngrams so you can check the 'Plot most common ngrams' option to plot the top unigrams-trigrams. Also, since text tokenizing can be time consuming, it turns auto updating off so you have to press the 'Run Interact' button to update the summary when control options are changed.- Check out the article_violated column for an example of a collections summary- Check out the source column for an example of a url summary<jupyter_code>data = pd.read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-04-21/gdpr_violations.tsv", sep="\t")
data["date"] = pd.to_datetime(data["date"])
data["article_violated"] = data["article_violated"].apply(lambda x: x.split("|"))
univariate_eda_interact(data)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11741293532338308, 'fraction_numerical': 0.011442786069651741, 'mean_word_length': 6.156583629893238, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '517281', 'license': 'MIT', 'n_tokens_mistral': 634, 'n_tokens_neox': 591, 'n_words': 229, 'path': 'demo/univariate_eda_demo.ipynb', 'repo_name': 'mattboggess/intedact', 'size': '2010'}