All Plugin Functions

All the functions available on this instance of nadi, are listed here.

Env Functions

PluginFunctionHelp
logiceqGreater than check
attrsfloat_transformmap values from the attribute based on the given table
corefloatmake a float from value
regexstr_replaceReplace the occurances of the given match
logicltGreater than check
corestrmake a string from value
coreintmake an int from the value
regexstr_matchCheck if the given pattern matches the value or not
regexstr_countCount the number of matches of given pattern in the value
logicifelseSimple if else condition
regexstr_findFind the given pattern in the value
commandexistsChecks if the given path exists
coreattrmapmake an array from the arguments
logicorboolean or
logicnotboolean not
regexstr_find_allFind all the matches of the given pattern in the value
logicandBoolean and
attrsstrmapmap values from the attribute based on the given table
corearraymake an array from the arguments
logicgtGreater than check
coretype_nameType name of the arguments

Node Functions

PluginFunctionHelp
errorscalc_ts_errorCalculate Error from two timeseries values in the node
datafillload_csv_fill
timeseriests_lenLength of the timeseries
print_nodeprint_nodePrint the node with its inputs and outputs
commandexistsChecks if the given path exists when rendering the template
seriessr_meanType name of the series
attrsprint_all_attrsPrint all attrs in a node
renderrenderRender the template based on the node attributes
timeseriests_dtypeType name of the timeseries
attrsprint_attrsPrint the given node attributes if present
timeseriests_listList all timeseries in the node
commandrunRun the node as if it’s a command if inputs are changed
seriesset_seriesset the following series to the node
seriessr_to_arrayMake an array from the series
attrshas_attrCheck if the attribute is present
seriessr_countNumber of series in the node
seriessr_sumSum of the series
attrsset_attrs_ifelseif else condition with multiple attributes
errorscalc_ts_errorsCalculate Error from two timeseries values in the node
attrsget_attrRetrive attribute
seriessr_dtypeType name of the series
streamflowcheck_negativeCheck the given streamflow timeseries for negative values
seriessr_lenLength of the series
seriessr_listList all series in the node
timeseriests_countNumber of timeseries in the node
attrsfirst_attrReturn the first Attribute that exists
attrsset_attrsSet node attributes
attrsload_attrsLoads attrs from file for all nodes based on the given template
graphicsattr_fraction_svgCreate a SVG file with the given network structure
damscount_node_ifCount the number of nodes upstream at each point that satisfies a certain condition
damsmin_yearPropagate the minimum year downstream
commandcommandRun the given template as a shell command.
attrsset_attrs_renderSet node attributes based on string templates
attrsload_toml_renderSet node attributes based on string templates
timeseriests_printPrint the given timeseries values in csv format

Network Functions

PluginFunctionHelp
attrsset_attrs_renderSet network attributes based on string templates
graphicstable_to_svgCreate a SVG file with the given network structure
errorscalc_attr_errorCalculate Error from two attribute values in the network
corecountCount the number of nodes in the network
commandcommandRun the given template as a shell command.
graphvizsave_graphvizSave the network as a graphviz file
graphicsexport_svgCreate a SVG file with the given network structure
tablesave_csvSave CSV
connectionsload_fileLoad the given file into the network
gnuplotplot_timeseriesGenerate a gnuplot file that plots the timeseries data in the network
debugdebugPrint the args and kwargs on this function
fancy_printfancy_printFancy print a network
graphicscsv_count_naCount the number of na values in CSV file for each nodes in a network
debugechoEcho the string to stdout or stderr
nadi_gisgis_load_attrsLoad node attributes from a GIS file
print_nodeprint_attr_csvPrint the given attributes in csv format with first column with node name
renderrenderRender a File template for the nodes in the whole network
debugclipEcho the ––8<–– line for clipping syntax
graphicscsv_load_tsCount the number of na values in CSV file for each nodes in a network
attrsset_attrsSet network attributes
commandparallelRun the given template as a shell command for each nodes in the network in parallel.
timeseriests_print_csvSave timeseries from all nodes into a single csv file
connectionssubsetTake a subset of network by only including the selected nodes
visualsset_nodesize_attrsSet the node size of the nodes based on the attribute value
nadi_gisgis_save_connectionsSave GIS file of the connections
connectionssave_fileSave the network into the given file
htmlexport_mapExports the network as a HTML map
graphicscsv_data_blocks_svgDraw the data blocks with arrows in timeline
tabletable_to_markdownRender the Table as a rendered markdown
nadi_gisgis_save_nodesSave GIS file of the nodes