All Plugin Functions
All the functions available on this instance of nadi, are listed here.
Env Functions
Plugin | Function | Help |
---|---|---|
logic | eq | Greater than check |
attrs | float_transform | map values from the attribute based on the given table |
core | float | make a float from value |
regex | str_replace | Replace the occurances of the given match |
logic | lt | Greater than check |
core | str | make a string from value |
core | int | make an int from the value |
regex | str_match | Check if the given pattern matches the value or not |
regex | str_count | Count the number of matches of given pattern in the value |
logic | ifelse | Simple if else condition |
regex | str_find | Find the given pattern in the value |
command | exists | Checks if the given path exists |
core | attrmap | make an array from the arguments |
logic | or | boolean or |
logic | not | boolean not |
regex | str_find_all | Find all the matches of the given pattern in the value |
logic | and | Boolean and |
attrs | strmap | map values from the attribute based on the given table |
core | array | make an array from the arguments |
logic | gt | Greater than check |
core | type_name | Type name of the arguments |
Node Functions
Plugin | Function | Help |
---|---|---|
errors | calc_ts_error | Calculate Error from two timeseries values in the node |
datafill | load_csv_fill | |
timeseries | ts_len | Length of the timeseries |
print_node | print_node | Print the node with its inputs and outputs |
command | exists | Checks if the given path exists when rendering the template |
series | sr_mean | Type name of the series |
attrs | print_all_attrs | Print all attrs in a node |
render | render | Render the template based on the node attributes |
timeseries | ts_dtype | Type name of the timeseries |
attrs | print_attrs | Print the given node attributes if present |
timeseries | ts_list | List all timeseries in the node |
command | run | Run the node as if it’s a command if inputs are changed |
series | set_series | set the following series to the node |
series | sr_to_array | Make an array from the series |
attrs | has_attr | Check if the attribute is present |
series | sr_count | Number of series in the node |
series | sr_sum | Sum of the series |
attrs | set_attrs_ifelse | if else condition with multiple attributes |
errors | calc_ts_errors | Calculate Error from two timeseries values in the node |
attrs | get_attr | Retrive attribute |
series | sr_dtype | Type name of the series |
streamflow | check_negative | Check the given streamflow timeseries for negative values |
series | sr_len | Length of the series |
series | sr_list | List all series in the node |
timeseries | ts_count | Number of timeseries in the node |
attrs | first_attr | Return the first Attribute that exists |
attrs | set_attrs | Set node attributes |
attrs | load_attrs | Loads attrs from file for all nodes based on the given template |
graphics | attr_fraction_svg | Create a SVG file with the given network structure |
dams | count_node_if | Count the number of nodes upstream at each point that satisfies a certain condition |
dams | min_year | Propagate the minimum year downstream |
command | command | Run the given template as a shell command. |
attrs | set_attrs_render | Set node attributes based on string templates |
attrs | load_toml_render | Set node attributes based on string templates |
timeseries | ts_print | Print the given timeseries values in csv format |
Network Functions
Plugin | Function | Help |
---|---|---|
attrs | set_attrs_render | Set network attributes based on string templates |
graphics | table_to_svg | Create a SVG file with the given network structure |
errors | calc_attr_error | Calculate Error from two attribute values in the network |
core | count | Count the number of nodes in the network |
command | command | Run the given template as a shell command. |
graphviz | save_graphviz | Save the network as a graphviz file |
graphics | export_svg | Create a SVG file with the given network structure |
table | save_csv | Save CSV |
connections | load_file | Load the given file into the network |
gnuplot | plot_timeseries | Generate a gnuplot file that plots the timeseries data in the network |
debug | debug | Print the args and kwargs on this function |
fancy_print | fancy_print | Fancy print a network |
graphics | csv_count_na | Count the number of na values in CSV file for each nodes in a network |
debug | echo | Echo the string to stdout or stderr |
nadi_gis | gis_load_attrs | Load node attributes from a GIS file |
print_node | print_attr_csv | Print the given attributes in csv format with first column with node name |
render | render | Render a File template for the nodes in the whole network |
debug | clip | Echo the ––8<–– line for clipping syntax |
graphics | csv_load_ts | Count the number of na values in CSV file for each nodes in a network |
attrs | set_attrs | Set network attributes |
command | parallel | Run the given template as a shell command for each nodes in the network in parallel. |
timeseries | ts_print_csv | Save timeseries from all nodes into a single csv file |
connections | subset | Take a subset of network by only including the selected nodes |
visuals | set_nodesize_attrs | Set the node size of the nodes based on the attribute value |
nadi_gis | gis_save_connections | Save GIS file of the connections |
connections | save_file | Save the network into the given file |
html | export_map | Exports the network as a HTML map |
graphics | csv_data_blocks_svg | Draw the data blocks with arrows in timeline |
table | table_to_markdown | Render the Table as a rendered markdown |
nadi_gis | gis_save_nodes | Save GIS file of the nodes |