Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
jupyter-naas
GitHub Repository: jupyter-naas/awesome-notebooks
Path: blob/master/Advertools/Advertools_Visualize_status_codes_OK_KO.ipynb
2973 views
Kernel: Python 3

Advertools.png

Advertools - Visualize status codes OK and KO

Give Feedback | Bug report

Tags: #advertools #adviz #status_code #asset #plotly #naas

Author: Elias Dabbas

Last update: 2023-07-20 (Created: 2023-07-20)

Description: This notebook creates a plotly treemap to visualize status code OK and KO from list.

References:

Input

Import libraries

try: import adviz except ModuleNotFoundError: !pip install adviz --user import adviz import naas

Setup Variables

  • title: This is a string variable that stores the title of the chart or output.

  • width: This is an integer variable that defines the width of the output chart or visualization.

  • height: Similar to width, this integer variable sets the height of the output chart or visualization.

  • status_code_list: This is a list that contains different status codes. These are HTTP status codes which are standard response codes given by web site servers on the internet. The codes help identify the cause of the problem when a web page or other resource does not load properly.

  • html_path: This is a string variable that stores the path where the HTML output will be saved.

# Inputs title = "Status Codes results" width = None height = None status_code_list = [ 200, 400, 201, 401, 405, 503 ] # Outputs html_path = "status_code_treemap.html"

Model

Visualize status codes OK and KO

adviz.status_codes( status_code_list, title=title, width=width, height=height, export_to_html=html_path )

Output

Share asset with naas

You have the capability to distribute this chart using the provided public URL

naas.asset.add(html_path, params={"inline": True})