saber.gis
create_maps(assign_df=None, drain_gis=None, prefix='')
Runs all the clip functions which create subsets of the drainage lines GIS dataset based on how they were assigned for bias correction.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
assign_df |
pd.DataFrame
|
the assignment table dataframe |
None
|
drain_gis |
gpd.GeoDataFrame
|
a geodataframe of the drainage lines gis dataset |
None
|
prefix |
str
|
a prefix for names of the outputs to distinguish between data generated in separate instances |
''
|
Returns:
Type | Description |
---|---|
None
|
None |
Source code in saber/gis.py
24 25 26 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 |
|
histomaps(gdf, metric, prct)
Creates a histogram of the KGE2012 values for the validation set
Parameters:
Name | Type | Description | Default |
---|---|---|---|
gdf |
gpd.GeoDataFrame
|
a GeoDataFrame containing validation metrics |
required |
metric |
str
|
name of th emetric to plot |
required |
prct |
str
|
Percentile of the validation set used to generate the histogram |
required |
Returns:
Type | Description |
---|---|
None
|
None |
Source code in saber/gis.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
|
map_by_cluster(assign_table, drain_gis, prefix='')
Creates Geopackage files in workdir/gis_outputs of the drainage lines based on the fdc cluster they were assigned to
Parameters:
Name | Type | Description | Default |
---|---|---|---|
assign_table |
pd.DataFrame
|
the assignment table dataframe |
required |
drain_gis |
str
|
path to a drainage line shapefile which can be clipped |
required |
prefix |
str
|
optional, a prefix to prepend to each created file's name |
''
|
Returns:
Type | Description |
---|---|
None
|
None |
Source code in saber/gis.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
map_by_reason(assign_df, drain_gis, prefix='')
Creates Geopackage files in workdir/gis_outputs for each unique value in the assignment column
Parameters:
Name | Type | Description | Default |
---|---|---|---|
assign_df |
pd.DataFrame
|
the assignment table dataframe |
required |
drain_gis |
path to a drainage line shapefile which can be clipped |
required | |
prefix |
str
|
a prefix for names of the outputs to distinguish between data generated at separate instances |
''
|
Returns:
Type | Description |
---|---|
None
|
None |
Source code in saber/gis.py
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 |
|
map_ids(ids, drain_gis, prefix='', id_column=COL_MID)
Creates Geopackage files in workdir/gis_outputs of the subset of 'drain_shape' with an ID in the specified list
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ids |
list
|
any iterable containing a series of model_ids |
required |
drain_gis |
str
|
path to the drainage shapefile to be clipped |
required |
prefix |
str
|
optional, a prefix to prepend to each created file's name |
''
|
id_column |
str
|
name of the id column in the attributes of the shape table |
COL_MID
|
Returns:
Type | Description |
---|---|
None
|
None |
Source code in saber/gis.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|
map_unassigned(assign_table, drain_gis, prefix='')
Creates Geopackage files in workdir/gis_outputs of the drainage lines which haven't been assigned a gauge yet
Parameters:
Name | Type | Description | Default |
---|---|---|---|
assign_table |
pd.DataFrame
|
the assignment table dataframe |
required |
drain_gis |
str
|
path to a drainage line shapefile which can be clipped |
required |
prefix |
str
|
optional, a prefix to prepend to each created file's name |
''
|
Returns:
Type | Description |
---|---|
None
|
None |
Source code in saber/gis.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|