A python package to visualize npath outputs in python..
Project description
tdnpathviz
tdnpathviz is a Python package that provides a set of convenient functions to generate various types of visualizations directly within a Teradata Vantage database. It leverages the in-database capabilities of Teradata Vantage including path analysis and in-database plotting (TD_PLOT) for Teradata SQLE 17.20 and later versions.
Installation
Install the package via pip:
pip install tdnpathviz
Usage
Here are the available functions in the Vantage Visualizer package:
plot_first_main_paths()
create_all_pathes_views()
scatter_plot()
pair_plot()
plot_correlation_heatmap()
plotcurves()
plotcurvescluster()
plot_with_background_image()
Example: Plotting First Main Paths
Here is an example of how to use the plot_first_main_paths()
function:
from vantage_visualizer import plot_first_main_paths
# Assume 'myPathAnalysis' is your DataFrame which contains path analysis data
plot_first_main_paths(
myPathAnalysis=myPathAnalysis,
path_column='your_path_column',
id_column='your_id_column',
nb_paths=15,
print_query=False,
font_size=10,
width=1200,
height=800,
weight_column = 'your_weight_column',
weight_agg = 'count',
justify='left'
)
## Example: Correlation Heatmap
Here is an example of how to use the `plot_correlation_heatmap()` function to create a correlation heatmap:
```python
from vantage_visualizer import plot_correlation_heatmap
# Assume 'tddf' is your teradata DataFrame
# plot_correlation_heatmap(tddf)
# You can pass additional parameters, e.g., ax for specific matplotlib axis, no_plot if you don't want to display the plot,
# or a title for your plot.
# plot_correlation_heatmap(tddf, ax=your_matplotlib_axis, no_plot=True, title="My Correlation Heatmap")
Example: Scatter Plot
Here is an example of how to use the scatter_plot()
function:
from vantage_visualizer import scatter_plot
# Assume 'tddf' is your teradata DataFrame
scatter_plot(
tddf=tddf,
x_col='your_x_column',
y_col='your_y_column',
width=600,
height=600,
row_axis_type='SEQUENCE',
series_id='your_series_id',
color='b',
marker='o',
markersize=3,
noplot=False,
title='Your Title',
x_range=(x_min, x_max),
y_range=(y_min, y_max)
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
tdnpathviz-0.1.2.16-py3-none-any.whl
(386.7 kB
view hashes)
Close
Hashes for tdnpathviz-0.1.2.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7693c9bf2ae4f47a42102dc9d22611dfc2a2090940a810b13537314dd2f6a6d7 |
|
MD5 | 503b1a98ba7142a61b68b3cc33e21fb8 |
|
BLAKE2b-256 | b7dd509b57332508993c30cca14d4ac8b97aa7bce7710dc87d9f4ada561551a5 |