saber.table
init(drain_table=None, gauge_table=None, reg_table=None, cluster_table=None, cache=True)
Joins the drain_table.csv and gauge_table.csv to create the assign_table.csv
Parameters:
Name | Type | Description | Default |
---|---|---|---|
drain_table |
pd.DataFrame
|
the drain table dataframe |
None
|
gauge_table |
pd.DataFrame
|
the gauge table dataframe |
None
|
reg_table |
pd.DataFrame
|
the regulatory structure table dataframe |
None
|
cluster_table |
pd.DataFrame
|
a dataframe with a column for the assigned cluster label and a column for the model_id |
None
|
cache |
bool
|
whether to cache the assign table immediately |
True
|
Returns:
Type | Description |
---|---|
pd.DataFrame
|
pd.DataFrame |
Source code in saber/table.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
mp_prop_gauges(df, n_processes=None)
Traverses dendritic stream networks to identify upstream and downstream river reaches
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
pd.DataFrame
|
the assign table dataframe |
required |
n_processes |
the number of processes to use for multiprocessing |
None
|
Returns:
Type | Description |
---|---|
pd.DataFrame
|
pd.DataFrame |
Source code in saber/table.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|
mp_prop_regulated(df, n_processes=None)
Traverses dendritic stream networks downstream from regulatory structures
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
pd.DataFrame
|
the assign table dataframe |
required |
n_processes |
the number of processes to use for multiprocessing |
None
|
Returns:
Type | Description |
---|---|
pd.DataFrame
|
pd.DataFrame |
Source code in saber/table.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
|