Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

All Plugin Functions

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

Env Functions

PluginFunctionHelp
attributesfloat_divmap values from the attribute based on the given table
attributesfloat_transformmap values from the attribute based on the given table
coreintmake an int from the value
filesfrom_fileReads the file contents as string
debugechoEcho the string to stdout or stderr
coreminMinimum of the variables
coresumSum of the variables
coreconcatConcat the strings
logicifelseSimple if else condition
logicltGreater than check
coremaxMinimum of the variables
coredayday from date/datetime
coreappendappend a value to an array
corecount_strGet a count of unique string values
corefloatmake a float from value
coremonthmonth from date/datetime
attributesparse_attrSet node attributes based on string templates
debugdebugPrint the args and kwargs on this function
attributesstrmapmap values from the attribute based on the given table
coreyearyear from date/datetime
corelengthlength of an array or hashmap
coreunique_strGet a list of unique string values
debugclipEcho the ––8<–– line for clipping syntax
debugsleepsleep for given number of milliseconds
filesto_fileWrites the string to the file
logicgtGreater than check
logiceqGreater than check
logicandBoolean and
logicorboolean or
logicnotboolean not
coreprodProduct of the variables
corearraymake an array from the arguments
attributesparse_attrmapSet node attributes based on string templates
regexstr_matchCheck if the given pattern matches the value or not
regexstr_replaceReplace the occurances of the given match
corecountCount the number of true values in the array
coretype_nameType name of the arguments
coreisnacheck if a float is nan
corestrmake a string from value
coreisinfcheck if a float is +/- infinity
attributesfloat_multmap values from the attribute based on the given table
coreattrmapmake an array from the arguments
coremax_numMinimum of the variables
filesexistsChecks if the given path exists
logicallcheck if all of the bool are true
regexstr_filterCheck if the given pattern matches the value or not
coremin_numMinimum of the variables
regexstr_findFind the given pattern in the value
logicanycheck if any of the bool are true
regexstr_find_allFind all the matches of the given pattern in the value
regexstr_countCount the number of matches of given pattern in the value
renderrenderRender the template based on the node attributes

Node Functions

PluginFunctionHelp
seriessr_to_arrayMake an array from the series
timeseriests_listList all timeseries in the node
attributesprint_attrsPrint the given node attributes if present
seriessr_dtypeType name of the series
timeseriests_printPrint the given timeseries values in csv format
damscount_node_ifCount the number of nodes upstream at each point that satisfies a certain condition
streamflowcheck_negativeCheck the given streamflow timeseries for negative values
errorscalc_ts_errorCalculate Error from two timeseries values in the node
attributesset_attrs_ifelseif else condition with multiple attributes
seriesset_seriesset the following series to the node
errorscalc_ts_errorsCalculate Error from two timeseries values in the node
datafilldatafill_experiment
timeseriests_countNumber of timeseries in the node
attributesfirst_attrReturn the first Attribute that exists
commandrunRun the node as if it’s a command if inputs are changed
timeseriests_dtypeType name of the timeseries
renderrenderRender the template based on the node attributes
attributesload_toml_renderSet node attributes based on string templates
seriessr_listList all series in the node
seriessr_meanType name of the series
timeseriests_lenLength of the timeseries
print_nodeprint_nodePrint the node with its inputs and outputs
filesexistsChecks if the given path exists when rendering the template
coreinputs_countCount the number of input nodes in the node
seriessr_sumSum of the series
attributesget_attrRetrive attribute
attributeshas_attrCheck if the attribute is present
seriessr_lenLength of the series
attributesprint_all_attrsPrint all attrs in a node
coreoutput_attrGet attributes of the output node
commandcommandRun the given template as a shell command.
attributesset_attrsSet node attributes
datafillload_csv_fill
damsmin_yearPropagate the minimum year downstream
coreinputs_attrGet attributes of the input nodes
corehas_outletNode has an outlet or not
attributesset_attrs_renderSet node attributes based on string templates
attributesload_attrsLoads attrs from file for all nodes based on the given template
seriessr_countNumber of series in the node

Network Functions

PluginFunctionHelp
connectionssubsetTake a subset of network by only including the selected nodes
print_nodeprint_attr_csvPrint the given attributes in csv format with first column with node name
tabletable_to_markdownRender the Table as a rendered markdown
connectionsload_strLoad the given file into the network
renderrender_templateRender a File template for the nodes in the whole network
connectionsload_fileLoad the given file into the network
commandparallelRun the given template as a shell command for each nodes in the network in parallel.
renderrender_nodesRender each node of the network and combine to same variable
timeseriesseries_csvWrite the given nodes to csv with given attributes and series
tablesave_csvSave CSV
attributesset_attrsSet network attributes
renderrenderRender from network attributes
graphvizsave_graphvizSave the network as a graphviz file
visualsset_nodesize_attrsSet the node size of the nodes based on the attribute value
visualssvg_saveExports the network as a svg
commandcommandRun the given template as a shell command.
corecountCount the number of nodes in the network
timeseriests_print_csvSave timeseries from all nodes into a single csv file
gisgis_load_attrsLoad node attributes from a GIS file
htmlexport_mapExports the network as a HTML map
attributesset_attrs_renderSet network attributes based on string templates
fancy_printfancy_printFancy print a network
datafillsave_experiments_csvWrite the given nodes to csv with given attributes and experiment results
gisgis_load_networkLoad network from a GIS file
errorscalc_attr_errorCalculate Error from two attribute values in the network
gisgis_save_nodesSave GIS file of the nodes
gisgis_save_connectionsSave GIS file of the connections
connectionssave_fileSave the network into the given file
connectionsload_edgesLoad the given edges into the network
gnuplotplot_timeseriesGenerate a gnuplot file that plots the timeseries data in the network