Skip to content

Instantly share code, notes, and snippets.

View khurchla's full-sized avatar
📊
studio|classroom|office

Kathryn Hurchla khurchla

📊
studio|classroom|office
View GitHub Profile
@khurchla
khurchla / Notebook_Profile_Visualizer_double_histogram_chart_density.py
Last active June 7, 2022 00:35
shorthand version of steps for making double histogram chart on the density data feature using UCI wine quality dataset example
visualization.double_histogram(feature_name="density")
@khurchla
khurchla / turtle_normal_dist_line_graph.py
Created May 11, 2022 17:22
Code a turtle named Squirtle to draw and annotate a normally distributed line plot on a graph paper image background.
# import the turtle library
import turtle
# add a graph paper image from file as a background
turtle.bgpic("Probability_Graph_Paper_Template-landscape.png")
# change the shape back to the cute little turtle
turtle.shape("turtle")
# give it a good name (optional but motivating)
squirtle = turtle
@khurchla
khurchla / Lag_Plot_Time_Series_pd_mpl
Created May 15, 2022 23:03
Pandas & Matplotlib Lag Plot Time Series Analysis
{
"cell_type": "markdown",
"id": "d4a7d047",
"metadata": {},
"source": [
"### Combine these plots in a subplot grid\n",
"\n",
"Note, it's not essential to align these y axis ranges because you are analyzing the dots within each change, and you are not comparing each chart to its neighbor as with some other plot types."
]
},
@khurchla
khurchla / Node_Colormap_nx_mpl
Created May 15, 2022 23:29
Directional node graph of colormap with NetworkX Matplotlib
{
"cell_type": "code",
"execution_count": 13,
"id": "922307c8",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA24AAANuCAYAAABuUVpnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAACayklEQVR4nOzdd5gV5f3+8XtO20pHqpQFBMSCdERULFhQsYEIFkBFZElUEmtibFF/lq89LASiYMNGVFRQBI0apEgRUFBU2GXpnWXZes6Z5/fHqrGgAntm5pT367q8YmB3PvfiAuc+zzPPWMYYIwAAAABA3PJ5HQAAAAAA8NsobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAAAEOcobgAAAAAQ5yhuAAAAABDnKG4AAAA
@khurchla
khurchla / radial_charts.py
Created May 27, 2022 23:05
Plotly Dash Python Radial Chart manual subplots
values = {'Timestamp':['5/20/2022 19:44:43', '5/20/2022 20:14:36',
'5/20/2022 20:14:38', '5/20/2022 20:14:39',
'5/20/2022 19:44:43', '5/20/2022 20:14:46',
'5/20/2022 20:14:47', '5/20/2022 19:44:49',
'5/20/2022 20:14:51', '5/20/2022 20:14:53',
'5/20/2022 20:14:56'],
'Build':[6, 4, 6, 6, 3, 6, 1, 4, 5, 6, 2],
'Story':[6, 3, 6, 5, 6, 3, 1, 3, 3, 3, 1],
'Design':[6, 6, 5, 4, 4, 4, 2, 6, 1, 2, 2],
'Systems':[6, 2, 6, 1, 1, 5, 6, 1, 2, 3, 2],
@khurchla
khurchla / profile_visualizer_visualization_write.py
Last active June 7, 2022 02:47
download whylogs profile visualizer charts or report in HTML format
# write the Difference Distribution bar chart of the citric acid feature to file
# in an output subdirectory
import os
os.getcwd()
visualization.write(
rendered_html=visualization.difference_distribution_chart(
feature_name="citric acid", profile="target"
),
html_file_name=os.getcwd() + "/output/diff_dist_citric_acid_example",
)
@khurchla
khurchla / whylogs_profile_visualizer_install_dependencies.ipynb
Last active June 7, 2022 01:33
whylogs v1 profile visualizer install dependencies in a Jupyter Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@khurchla
khurchla / Notebook_Profile_Visualizer_drift_analysis-wine_quality_drift_report.ipynb
Last active June 7, 2022 01:47
demo example of whylogs v1 profile visualizer summary drift report to compare two data profile views
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@khurchla
khurchla / profile_visualizer_initialize
Created June 7, 2022 01:55
initialize whylogs v1 profile visualizer
from whylogs.viz import NotebookProfileVisualizer
visualization = NotebookProfileVisualizer()
visualization.set_profiles(target_profile_view=prof_view, reference_profile_view=prof_view_ref)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.