All Plugin Functions
All the functions available on this instance of nadi, are listed here.
Env Functions
Plugin | Function | Help |
---|---|---|
attributes | float_div | map values from the attribute based on the given table |
attributes | float_transform | map values from the attribute based on the given table |
core | int | make an int from the value |
files | from_file | Reads the file contents as string |
debug | echo | Echo the string to stdout or stderr |
core | min | Minimum of the variables |
core | sum | Sum of the variables |
core | concat | Concat the strings |
logic | ifelse | Simple if else condition |
logic | lt | Greater than check |
core | max | Minimum of the variables |
core | day | day from date/datetime |
core | append | append a value to an array |
core | count_str | Get a count of unique string values |
core | float | make a float from value |
core | month | month from date/datetime |
attributes | parse_attr | Set node attributes based on string templates |
debug | debug | Print the args and kwargs on this function |
attributes | strmap | map values from the attribute based on the given table |
core | year | year from date/datetime |
core | length | length of an array or hashmap |
core | unique_str | Get a list of unique string values |
debug | clip | Echo the ––8<–– line for clipping syntax |
debug | sleep | sleep for given number of milliseconds |
files | to_file | Writes the string to the file |
logic | gt | Greater than check |
logic | eq | Greater than check |
logic | and | Boolean and |
logic | or | boolean or |
logic | not | boolean not |
core | prod | Product of the variables |
core | array | make an array from the arguments |
attributes | parse_attrmap | Set node attributes based on string templates |
regex | str_match | Check if the given pattern matches the value or not |
regex | str_replace | Replace the occurances of the given match |
core | count | Count the number of true values in the array |
core | type_name | Type name of the arguments |
core | isna | check if a float is nan |
core | str | make a string from value |
core | isinf | check if a float is +/- infinity |
attributes | float_mult | map values from the attribute based on the given table |
core | attrmap | make an array from the arguments |
core | max_num | Minimum of the variables |
files | exists | Checks if the given path exists |
logic | all | check if all of the bool are true |
regex | str_filter | Check if the given pattern matches the value or not |
core | min_num | Minimum of the variables |
regex | str_find | Find the given pattern in the value |
logic | any | check if any of the bool are true |
regex | str_find_all | Find all the matches of the given pattern in the value |
regex | str_count | Count the number of matches of given pattern in the value |
render | render | Render the template based on the node attributes |
Node Functions
Plugin | Function | Help |
---|---|---|
series | sr_to_array | Make an array from the series |
timeseries | ts_list | List all timeseries in the node |
attributes | print_attrs | Print the given node attributes if present |
series | sr_dtype | Type name of the series |
timeseries | ts_print | Print the given timeseries values in csv format |
dams | count_node_if | Count the number of nodes upstream at each point that satisfies a certain condition |
streamflow | check_negative | Check the given streamflow timeseries for negative values |
errors | calc_ts_error | Calculate Error from two timeseries values in the node |
attributes | set_attrs_ifelse | if else condition with multiple attributes |
series | set_series | set the following series to the node |
errors | calc_ts_errors | Calculate Error from two timeseries values in the node |
datafill | datafill_experiment | |
timeseries | ts_count | Number of timeseries in the node |
attributes | first_attr | Return the first Attribute that exists |
command | run | Run the node as if it’s a command if inputs are changed |
timeseries | ts_dtype | Type name of the timeseries |
render | render | Render the template based on the node attributes |
attributes | load_toml_render | Set node attributes based on string templates |
series | sr_list | List all series in the node |
series | sr_mean | Type name of the series |
timeseries | ts_len | Length of the timeseries |
print_node | print_node | Print the node with its inputs and outputs |
files | exists | Checks if the given path exists when rendering the template |
core | inputs_count | Count the number of input nodes in the node |
series | sr_sum | Sum of the series |
attributes | get_attr | Retrive attribute |
attributes | has_attr | Check if the attribute is present |
series | sr_len | Length of the series |
attributes | print_all_attrs | Print all attrs in a node |
core | output_attr | Get attributes of the output node |
command | command | Run the given template as a shell command. |
attributes | set_attrs | Set node attributes |
datafill | load_csv_fill | |
dams | min_year | Propagate the minimum year downstream |
core | inputs_attr | Get attributes of the input nodes |
core | has_outlet | Node has an outlet or not |
attributes | set_attrs_render | Set node attributes based on string templates |
attributes | load_attrs | Loads attrs from file for all nodes based on the given template |
series | sr_count | Number of series in the node |
Network Functions
Plugin | Function | Help |
---|---|---|
connections | subset | Take a subset of network by only including the selected nodes |
print_node | print_attr_csv | Print the given attributes in csv format with first column with node name |
table | table_to_markdown | Render the Table as a rendered markdown |
connections | load_str | Load the given file into the network |
render | render_template | Render a File template for the nodes in the whole network |
connections | load_file | Load the given file into the network |
command | parallel | Run the given template as a shell command for each nodes in the network in parallel. |
render | render_nodes | Render each node of the network and combine to same variable |
timeseries | series_csv | Write the given nodes to csv with given attributes and series |
table | save_csv | Save CSV |
attributes | set_attrs | Set network attributes |
render | render | Render from network attributes |
graphviz | save_graphviz | Save the network as a graphviz file |
visuals | set_nodesize_attrs | Set the node size of the nodes based on the attribute value |
visuals | svg_save | Exports the network as a svg |
command | command | Run the given template as a shell command. |
core | count | Count the number of nodes in the network |
timeseries | ts_print_csv | Save timeseries from all nodes into a single csv file |
gis | gis_load_attrs | Load node attributes from a GIS file |
html | export_map | Exports the network as a HTML map |
attributes | set_attrs_render | Set network attributes based on string templates |
fancy_print | fancy_print | Fancy print a network |
datafill | save_experiments_csv | Write the given nodes to csv with given attributes and experiment results |
gis | gis_load_network | Load network from a GIS file |
errors | calc_attr_error | Calculate Error from two attribute values in the network |
gis | gis_save_nodes | Save GIS file of the nodes |
gis | gis_save_connections | Save GIS file of the connections |
connections | save_file | Save the network into the given file |
connections | load_edges | Load the given edges into the network |
gnuplot | plot_timeseries | Generate a gnuplot file that plots the timeseries data in the network |