diff --git a/docs/example_notebooks/example_echopop_workflow.ipynb b/docs/example_notebooks/example_echopop_workflow.ipynb
index b9c28f0c..0c08e711 100644
--- a/docs/example_notebooks/example_echopop_workflow.ipynb
+++ b/docs/example_notebooks/example_echopop_workflow.ipynb
@@ -40,8 +40,8 @@
"metadata": {},
"outputs": [],
"source": [
- "survey = Survey( init_config_path = \"C:/Users/Brandyn/Documents/GitHub/echopop/config_files/initialization_config.yml\" ,\n",
- " survey_year_config_path = \"C:/Users/Brandyn/Documents/GitHub/echopop/config_files/survey_year_2019_config.yml\" )"
+ "survey = Survey(init_config_path = \"C:/Users/Brandyn/Documents/GitHub/echopop/config_files/initialization_config.yml\",\n",
+ " survey_year_config_path = \"C:/Users/Brandyn/Documents/GitHub/echopop/config_files/survey_year_2019_config.yml\")"
]
},
{
@@ -71,12 +71,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "{'provenance': {'date': '2024-09-09 09:24:56', 'imported_datasets': set()}}\n"
+ "{'provenance': {'date': '2024-11-15 18:12:28', 'imported_datasets': set()}}\n"
]
}
],
"source": [
- "pprint.pprint( survey.meta )"
+ "pprint.pprint(survey.meta)"
]
},
{
@@ -96,7 +96,7 @@
{
"data": {
"text/plain": [
- "dict_keys(['stratified_survey_mean_parameters', 'nasc_exports', 'haul_to_transect_mapping', 'transect_region_mapping', 'TS_length_regression_parameters', 'geospatial', 'kriging_parameters', 'survey_year', 'species', 'CAN_haul_offset', 'data_root_dir', 'biological', 'stratification', 'NASC', 'export_regions', 'gear_data', 'kriging', 'biometrics'])"
+ "dict_keys(['stratified_survey_mean_parameters', 'kriging_parameters', 'TS_length_regression_parameters', 'geospatial', 'nasc_exports', 'transect_region_mapping', 'survey_year', 'biological', 'stratification', 'NASC', 'species', 'kriging', 'data_root_dir', 'CAN_haul_offset', 'biometrics'])"
]
},
"execution_count": 4,
@@ -105,7 +105,7 @@
}
],
"source": [
- "survey.config.keys( )"
+ "survey.config.keys()"
]
},
{
@@ -143,10 +143,6 @@
" 'sheetname': 'biodata_catch_CAN'},\n",
" 'US': {'filename': 'Biological/US/2019_biodata_catch.xlsx',\n",
" 'sheetname': 'biodata_catch'}},\n",
- " 'haul_to_transect': {'CAN': {'filename': 'Biological/CAN/haul_to_transect_mapping_2019_CAN.xlsx',\n",
- " 'sheetname': 'Sheet1'},\n",
- " 'US': {'filename': 'Biological/US/haul_to_transect_mapping_2019.xlsx',\n",
- " 'sheetname': 'Sheet1'}},\n",
" 'length': {'CAN': {'filename': 'Biological/CAN/2019_biodata_length_CAN.xlsx',\n",
" 'sheetname': 'biodata_length_CAN'},\n",
" 'US': {'filename': 'Biological/US/2019_biodata_length.xlsx',\n",
@@ -157,22 +153,8 @@
" 'sheetname': 'biodata_specimen'}}},\n",
" 'biometrics': {'bio_hake_age_bin': [1, 22, 22],\n",
" 'bio_hake_len_bin': [2, 80, 40]},\n",
- " 'data_root_dir': 'C:/Users/Brandyn/Documents/GitHub/EchoPro_data/2019_consolidated_files',\n",
- " 'export_regions': {'all_ages': {'filename': 'Stratification/CAN_US_2019_transect_region_haul_all_ages.xlsx',\n",
- " 'sheetname': 'Sheet1'},\n",
- " 'no_age1': {'filename': 'Stratification/CAN_US_2019_transect_region_haul_no_age1.xlsx',\n",
- " 'sheetname': 'Sheet1'}},\n",
- " 'gear_data': {'CAN': {'filename': 'Biological/CAN/2019_biodata_gear_CAN.xlsx',\n",
- " 'sheetname': 'biodata_gear_CAN'},\n",
- " 'US': {'filename': 'Biological/US/2019_biodata_gear.xlsx',\n",
- " 'sheetname': 'biodata_gear'}},\n",
+ " 'data_root_dir': 'C:/Users/Brandyn/Documents/GitHub/EchoPro_data/Data/',\n",
" 'geospatial': {'init': 'epsg:4326'},\n",
- " 'haul_to_transect_mapping': {'country_code': ['CAN', 'US'],\n",
- " 'file_settings': {'CAN': {'directory': '/Biological/CAN',\n",
- " 'sheetname': 'Sheet1'},\n",
- " 'US': {'directory': '/Biological/US',\n",
- " 'sheetname': 'Sheet1'}},\n",
- " 'save_file_template': 'haul_to_transect_mapping_{YEAR}_{COUNTRY}'},\n",
" 'kriging': {'isobath_200m': {'filename': 'Kriging_files/Kriging_grid_files/transformation_isobath_coordinates.xlsx',\n",
" 'sheetname': 'Smoothing_EasyKrig'},\n",
" 'mesh': {'filename': 'Kriging_files/Kriging_grid_files/krig_grid2_5nm_cut_centroids_2013.xlsx',\n",
@@ -235,10 +217,7 @@
" 'pattern': 'hake_mix'},\n",
" {'label': 'Hake',\n",
" 'pattern': 'hake'}]},\n",
- " 'pattern': '{REGION_CLASS}{HAUL_NUM}{COUNTRY}',\n",
- " 'save_file_directory': '/Stratification',\n",
- " 'save_file_sheetname': 'Sheet1',\n",
- " 'save_file_template': '{COUNTRY}_{YEAR}_transect_region_haul_{GROUP}.xlsx'}}\n"
+ " 'pattern': '{REGION_CLASS}{HAUL_NUM}{COUNTRY}'}}\n"
]
}
],
@@ -317,7 +296,7 @@
"The method `Survey.load_acoustic_data(...)` ingests and preprocessed acoustic backscatter data in several forms, including consolidated `*.xlsx` files defined in the `Survey`-class configuration file (`survey_year_config_path`). This class-method currently takes six user arguments:\n",
"\n",
"* `index_variable (string, list)`: Index columns used for defining discrete acoustic backscatter samples and vertical integration (default: `[\"transect_num\", \"interval\"]`).\n",
- "* `ingest_exports ('echoview', 'echopype', None)`: The type of acoustic backscatter exports required for generating the associated consolidated `*.xlsx` files (default: `None`). When `ingest_exports = \"echoview\"`, this searches a directory defined within `init_config_path` for associated Echoview exports (`layers`, `intervals`, `analysis`, `cells`). \n",
+ "* `ingest_exports (\"echoview\", \"echopype\", None)`: The type of acoustic backscatter exports required for generating the associated consolidated `*.xlsx` files (default: `None`). When `ingest_exports = \"echoview\"`, this searches a directory defined within `init_config_path` for associated Echoview exports (`layers`, `intervals`, `analysis`, `cells`). \n",
"* `region_class_column (string)`: Dataframe column denoting the Echoview export region class such as \"zooplankton\" (default: `\"region_class\"`). \n",
"* `transect_pattern (string)`: A (raw) string that corresponds to the transect number embedded within the base name of the file path associated with each export file (default: ``r'T(\\\\d+)'``).\n",
"* `unique_region_id (string)`: Dataframe column that denotes region-specific names and identifiers (default: `\"region_id\"`).\n",
@@ -352,16 +331,7 @@
"cell_type": "code",
"execution_count": 8,
"metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Haul-to-transect mapping file for 'US' saved at 'C:\\Users\\Brandyn\\Documents\\GitHub\\EchoPro_data\\2019_consolidated_files\\Biological\\US\\haul_to_transect_mapping_2019_US.xlsx'.\n",
- "Haul-to-transect mapping file for 'CAN' saved at 'C:\\Users\\Brandyn\\Documents\\GitHub\\EchoPro_data\\2019_consolidated_files\\Biological\\CAN\\haul_to_transect_mapping_2019_CAN.xlsx'.\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"survey.load_survey_data()"
]
@@ -456,7 +426,7 @@
}
],
"source": [
- "survey.analysis.keys( )"
+ "survey.analysis.keys()"
]
},
{
@@ -481,12 +451,13 @@
" 'exclude_age1': True,\n",
" 'species_id': 22500,\n",
" 'stratum': 'ks',\n",
- " 'stratum_name': 'stratum_num'}\n"
+ " 'stratum_name': 'stratum_num',\n",
+ " 'unique_strata': array([0, 1, 2, 3, 4, 5, 6, 7, 8], dtype=int64)}\n"
]
}
],
"source": [
- "pprint.pprint( survey.analysis[ 'settings' ][ 'transect' ] )"
+ "pprint.pprint(survey.analysis[\"settings\"][\"transect\"])"
]
},
{
@@ -513,7 +484,7 @@
}
],
"source": [
- "survey.analysis[ 'transect' ].keys()"
+ "survey.analysis[\"transect\"].keys()"
]
},
{
@@ -566,13 +537,13 @@
"1 female 3.950822e+06 8.282280e+08 8.321788e+08\n",
"2 male 3.919170e+06 8.146258e+08 8.185449e+08\n",
"3 unsexed 0.000000e+00 3.609296e+05 3.609296e+05\n",
- "4 mixed -4.656613e-10 3.680784e+07 3.680784e+07},\n",
+ "4 mixed 9.313226e-10 3.680784e+07 3.680784e+07},\n",
" 'variogram': {}}\n"
]
}
],
"source": [
- "pprint.pprint( survey.results )"
+ "pprint.pprint(survey.results)"
]
},
{
@@ -588,7 +559,7 @@
" 1 female 3.950822e+06 8.282280e+08 8.321788e+08\n",
" 2 male 3.919170e+06 8.146258e+08 8.185449e+08\n",
" 3 unsexed 0.000000e+00 3.609296e+05 3.609296e+05\n",
- " 4 mixed -4.656613e-10 3.680784e+07 3.680784e+07}"
+ " 4 mixed 9.313226e-10 3.680784e+07 3.680784e+07}"
]
},
"execution_count": 15,
@@ -597,7 +568,7 @@
}
],
"source": [
- "survey.results[ 'transect' ]"
+ "survey.results[\"transect\"]"
]
},
{
@@ -613,9 +584,9 @@
"\n",
"The method `Survey.fit_variogram(...)` uses a non-linear least squares optimizer to evaluate best-fit variogram parameters. This optimization uses the empirical variogram computed from the dataset. populates various analysis variables (`Survey.analysis`) and results (`Survey.results`). This class-method currently takes ten user arguments:\n",
"\n",
- "* `variogram_parameters (VariogramBase)`: A dictionary comprising various arguments required for computing the model variogram (default: `{}`). The allowed variogram parameters include: `[\"sill\", \"nugget\", \"correlation_range\", \"hole_effect_range\", \"decay_power\", \"enhance_semivariance\"]`; however, the exact parameters required depend on the chosen semivariogram model. \n",
- "* `optimization_parameters (VariogramOptimize)`: A dictionary comprising various arguments for optimizing the variogram fit via non-linear least squares (default: `{}`).\n",
- "* `initialize_variogram (VariogramInitial)`: A dictionary or list that indicates how each variogram parameter is configured for optimization (default: `[\"nugget\", \"sill\", \"correlation_range\", \"hole_effect_range\", \"sill\"]`). Including parameter names in a list will incorporate default initial values imported from the associated file in the configuration `*.yaml` are used instead. This also occurs when `initialize_variogram` is formatted as a dictionary and the `'value'` key is not present for defined parameters. Parameter names excluded from either the list or dictionary keys are assumed to be held as fixed values.\n",
+ "* `variogram_parameters (dictionary)`: A dictionary comprising various arguments required for computing the model variogram (default: `{}`). The allowed variogram parameters include: `[\"sill\", \"nugget\", \"correlation_range\", \"hole_effect_range\", \"decay_power\", \"enhance_semivariance\"]`; however, the exact parameters required depend on the chosen semivariogram model. \n",
+ "* `optimization_parameters (dictionary)`: A dictionary comprising various arguments for optimizing the variogram fit via non-linear least squares (default: `{}`).\n",
+ "* `initialize_variogram (list or dictionary)`: A dictionary or list that indicates how each variogram parameter is configured for optimization (default: `[\"nugget\", \"sill\", \"correlation_range\", \"hole_effect_range\", \"sill\"]`). Including parameter names in a list will incorporate default initial values imported from the associated file in the configuration `*.yaml` are used instead. This also occurs when `initialize_variogram` is formatted as a dictionary and the `'value'` key is not present for defined parameters. Parameter names excluded from either the list or dictionary keys are assumed to be held as fixed values.\n",
"* `model (list, string)`: A string or list of model names. A single name represents a single family model. Two inputs represent the desired composite model (e.g. the composite J-Bessel and exponential model) (default: `[\"bessel\", \"exponential\"]`).\n",
"* `azimuth_range (float)`: The total azimuth angle range that is allowed for constraining the relative angles between spatial points, particularly for cases where a high degree of directionality is assumed (default: `360.0`).\n",
"* `n_lags (int)`: The number of lags (default: `30`).\n",
@@ -666,7 +637,10 @@
}
],
"source": [
- "survey.fit_variogram(model=[\"bessel\", \"exponential\"], n_lags=30, initialize_variogram=[\"decay_power\", \"nugget\", \"sill\", \"correlation_range\", \"hole_effect_range\"])"
+ "survey.fit_variogram(model=[\"bessel\", \"exponential\"], \n",
+ " n_lags=30, \n",
+ " initialize_variogram=[\"decay_power\", \"nugget\", \"sill\", \"correlation_range\", \n",
+ " \"hole_effect_range\"])"
]
},
{
@@ -677,10 +651,10 @@
{
"data": {
"text/plain": [
- "{'model_fit': {'decay_power': 1.515771020973907,\n",
+ "{'model_fit': {'decay_power': 1.5157710104601525,\n",
" 'nugget': 9.999999999970078e-11,\n",
- " 'sill': 0.9452901787383056,\n",
- " 'correlation_range': 0.007947505231867843,\n",
+ " 'sill': 0.9452901785611683,\n",
+ " 'correlation_range': 0.007947505337776415,\n",
" 'hole_effect_range': 1e-10},\n",
" 'model': ['bessel', 'exponential']}"
]
@@ -705,38 +679,29 @@
},
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "{'model': ['bessel', 'exponential'],\n",
- " 'n_lags': 30,\n",
- " 'lag_resolution': 0.002,\n",
- " 'max_range': None,\n",
- " 'sill': 0.91,\n",
- " 'nugget': 0.0,\n",
- " 'hole_effect_range': 0.0,\n",
- " 'correlation_range': 0.007,\n",
- " 'enhance_semivariance': None,\n",
- " 'decay_power': 1.5}"
+ "{'model': ['exponential', 'bessel'], 'n_lags': 30}"
]
},
- "execution_count": 18,
+ "execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "from echopop.utils.validate import VariogramBase, VariogramOptimize, VariogramInitial\n",
+ "from echopop.utils.validate_dict import VariogramBase, VariogramOptimize, VariogramInitial\n",
"\n",
- "VariogramBase.create(**{})"
+ "VariogramBase.create(**{\"model\": [\"exponential\", \"bessel\"], \"n_lags\": 30})"
]
},
{
"cell_type": "code",
- "execution_count": 19,
+ "execution_count": 23,
"metadata": {},
"outputs": [
{
@@ -744,15 +709,15 @@
"text/plain": [
"{'max_fun_evaluations': 500,\n",
" 'cost_fun_tolerance': 1e-06,\n",
- " 'solution_tolerance': 1e-06,\n",
" 'gradient_tolerance': 0.0001,\n",
+ " 'solution_tolerance': 1e-06,\n",
" 'finite_step_size': 1e-08,\n",
" 'trust_region_solver': 'exact',\n",
" 'x_scale': 'jacobian',\n",
" 'jacobian_approx': 'central'}"
]
},
- "execution_count": 19,
+ "execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
@@ -763,26 +728,26 @@
},
{
"cell_type": "code",
- "execution_count": 20,
+ "execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "{'sill': {'min': 0.0, 'value': 0.0, 'max': inf},\n",
- " 'nugget': {'min': 0.0, 'value': 0.0, 'max': inf},\n",
- " 'correlation_range': {'min': 0.0, 'value': 0.0, 'max': inf},\n",
- " 'hole_effect_range': {'min': 0.0, 'value': 0.0, 'max': inf},\n",
- " 'decay_power': {'min': 0.0, 'value': 0.0, 'max': inf}}"
+ "{'nugget': {'min': 0.0, 'value': 0.5, 'max': 1.0, 'vary': True},\n",
+ " 'sill': {'min': 0.0, 'value': 0.75, 'max': inf, 'vary': True},\n",
+ " 'correlation_range': {'value': 0.0, 'vary': False}}"
]
},
- "execution_count": 20,
+ "execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "VariogramInitial.create([\"sill\", \"nugget\", \"correlation_range\", \"hole_effect_range\", \"decay_power\"])"
+ "VariogramInitial.create(**{\"nugget\": {\"value\": 0.50, \"max\": 1.0, \"vary\": True}, \n",
+ " \"sill\": {\"value\": 0.75, \"vary\": True},\n",
+ " \"correlation_range\": {\"vary\": False}})"
]
},
{
@@ -870,11 +835,11 @@
"metadata": {},
"source": [
"`Survey.stratified_analysis(...)` computes various stratified statistics, including the coefficient of variation (*CV*) estimates using the Jolly and Hampton (1990) stratified sampling method. There are a variety of arguments used for this function: \n",
- "* `dataset ('transect', 'kriging')`: data input selection (default: `'transect'`). This will use either the results of `Survey.transect_analysis(...)` or `Survey.kriging_analysis(...)`\n",
- "* `stratum ('ks','inpfc')`: the stratum used for the various acoustic and biological calculations (default: `'inpfc'`)\n",
- "* `variable( 'abundance' , 'biomass' , 'nasc')`: the data variable that will be used for the stratified resampling analysis (default: `'biomass'`)\n",
+ "* `dataset (\"transect\", \"kriging\")`: data input selection (default: `\"transect\"`). This will use either the results of `Survey.transect_analysis(...)` or `Survey.kriging_analysis(...)`\n",
+ "* `stratum (\"ks\", \"inpfc\")`: the stratum used for the various acoustic and biological calculations (default: `'inpfc'`)\n",
+ "* `variable(\"abundance\", \"biomass\", \"nasc\")`: the data variable that will be used for the stratified resampling analysis (default: `\"biomass\"`)\n",
"* `bootstrap_ci`: the confidence interval (default: `0.95`) used for copmuting the uncertainty intervals around population and coefficient of variation (*CV*) estimates\n",
- "* `bootstrap_ci_method`: the specific method/algorithm used for computing the bootstrap intervals (default: `'BCa'`)\n",
+ "* `bootstrap_ci_method`: the specific method/algorithm used for computing the bootstrap intervals (default: `\"t-jackknife\"`)\n",
"* `bootstrap_ci_method_alt`: an optional argument that provides an alternative `bootstrap_ci_method` in case of skewness issues\n",
"* `bootstrap_adjust_bias`: a boolean argument (default: `True`) that determines whether the bootstrap intervals should be adjusted to account for the bootstrap bias\n",
"* `verbose (boolean)`: dialogue messages will appear in the console including a summary report of the results when this is set to `True` (default: `True`)\n",
@@ -888,7 +853,7 @@
},
{
"cell_type": "code",
- "execution_count": 41,
+ "execution_count": 35,
"metadata": {
"tags": [
"scroll-output"
@@ -909,30 +874,36 @@
"| Age-1 fish excluded: True\n",
"| Bootstrap replicates: 10000 samples\n",
"| Resampling proportion: 0.75\n",
- "| Bootstrap interval method: BCa (CI: 95.0%)\n",
+ "| Bootstrap interval method: t-jackknife (CI: 95.0%)\n",
"--------------------------------\n",
"STRATUM-SPECIFIC ESTIMATES\n",
"--------------------------------\n",
"| Stratum area coverage (n = 6):\n",
" 4246.0 | 10042.0 | 5774.0 | 7060.0 | 7068.0 | 19319.0 nmi^2\n",
"| Stratum mean biomass density (kmt/nmi^2):\n",
- " 0.002 [-0.0, 0.003] | 0.041 [0.03, 0.046] | 0.057 [0.037, 0.067]\n",
- " 0.063 [0.046, 0.076] | 0.038 [0.025, 0.045] | 0.01 [0.005, 0.013]\n",
+ " 0.002 [0.0, 0.003] | 0.041 [0.032, 0.047] | 0.057 [0.039, 0.068]\n",
+ " 0.063 [0.046, 0.076] | 0.038 [0.027, 0.046] | 0.01 [0.005, 0.014]\n",
"| Stratum mean biomass (kmt):\n",
- " 8.2 [-0.5, 11.0] | 417.3 [309.2, 462.2] | 327.3 [214.6, 386.6]\n",
- " 446.5 [326.2, 542.4] | 267.3 [178.8, 318.6] | 176.5 [75.1, 232.1]\n",
+ " 8.2 [1.7, 11.3] | 417.3 [329.1, 472.8] | 327.3 [222.5, 390.3]\n",
+ " 446.5 [327.1, 543.9] | 267.3 [193.0, 323.3] | 176.5 [84.3, 258.9]\n",
"--------------------------------\n",
"SURVEY RESULTS\n",
"--------------------------------\n",
- "| Survey mean biomass density (kmt/nmi^2): 0.035 [0.031, 0.038]\n",
- "| Survey mean biomass (kmt): 1643.2 [1417.4, 1825.0]\n",
- "| Survey CV: 0.1328 [0.1283, 0.1465]\n",
+ "| Survey mean biomass density (kmt/nmi^2): 0.035 [0.031, 0.039]\n",
+ "| Survey mean biomass (kmt): 1643.2 [1428.3, 1834.3]\n",
+ "| Survey CV: 0.1328 [0.127, 0.1436]\n",
"--------------------------------\n"
]
}
],
"source": [
- "survey.stratified_analysis( dataset = 'transect' , stratum = 'inpfc' , variable = 'biomass' , bootstrap_ci = 0.95 , bootstrap_ci_method = \"BCa\" , bootstrap_ci_method_alt = \"t-jackknife\", verbose = True )"
+ "survey.stratified_analysis(dataset=\"transect\",\n",
+ " stratum=\"inpfc\",\n",
+ " variable=\"biomass\",\n",
+ " bootstrap_ci=0.95,\n",
+ " bootstrap_ci_method=\"t-jackknife\", \n",
+ " bootstrap_ci_method_alt = \"t-standard\", \n",
+ " verbose = True )"
]
},
{
@@ -953,7 +924,7 @@
},
{
"cell_type": "code",
- "execution_count": 26,
+ "execution_count": 37,
"metadata": {},
"outputs": [
{
@@ -962,13 +933,13 @@
"dict_keys(['transect'])"
]
},
- "execution_count": 26,
+ "execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "survey.analysis[ 'stratified' ].keys( )"
+ "survey.analysis[\"stratified\"].keys()"
]
},
{
@@ -980,7 +951,7 @@
},
{
"cell_type": "code",
- "execution_count": 27,
+ "execution_count": 36,
"metadata": {},
"outputs": [
{
@@ -989,18 +960,18 @@
"dict_keys(['stratified_replicates_df'])"
]
},
- "execution_count": 27,
+ "execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "survey.analysis[ 'stratified' ][ 'transect' ].keys()"
+ "survey.analysis[\"stratified\"][\"transect\"].keys()"
]
},
{
"cell_type": "code",
- "execution_count": 28,
+ "execution_count": 38,
"metadata": {},
"outputs": [
{
@@ -1036,47 +1007,47 @@
"
\n",
" 0 | \n",
" 1 | \n",
- " 31655.306244 | \n",
- " 1.693844e+09 | \n",
- " 8.965528e+11 | \n",
- " 1.350835e+22 | \n",
- " 0.129636 | \n",
+ " 31029.275246 | \n",
+ " 1.660345e+09 | \n",
+ " 8.872128e+11 | \n",
+ " 1.295939e+22 | \n",
+ " 0.128311 | \n",
"
\n",
" \n",
" 1 | \n",
" 2 | \n",
- " 28991.180148 | \n",
- " 1.551289e+09 | \n",
- " 8.308540e+11 | \n",
- " 1.147280e+22 | \n",
- " 0.128917 | \n",
+ " 30373.456534 | \n",
+ " 1.625253e+09 | \n",
+ " 8.559442e+11 | \n",
+ " 1.304884e+22 | \n",
+ " 0.133457 | \n",
"
\n",
" \n",
" 2 | \n",
" 3 | \n",
- " 30398.111427 | \n",
- " 1.626572e+09 | \n",
- " 8.521054e+11 | \n",
- " 1.271536e+22 | \n",
- " 0.132334 | \n",
+ " 29777.890226 | \n",
+ " 1.593385e+09 | \n",
+ " 8.737404e+11 | \n",
+ " 1.248043e+22 | \n",
+ " 0.127859 | \n",
"
\n",
" \n",
" 3 | \n",
" 4 | \n",
- " 29589.815642 | \n",
- " 1.583321e+09 | \n",
- " 7.952773e+11 | \n",
- " 1.207085e+22 | \n",
- " 0.138150 | \n",
+ " 27417.606462 | \n",
+ " 1.467089e+09 | \n",
+ " 7.923159e+11 | \n",
+ " 1.046485e+22 | \n",
+ " 0.129112 | \n",
"
\n",
" \n",
" 4 | \n",
" 5 | \n",
- " 29297.810263 | \n",
- " 1.567696e+09 | \n",
- " 8.139463e+11 | \n",
- " 1.184596e+22 | \n",
- " 0.133718 | \n",
+ " 27326.837435 | \n",
+ " 1.462232e+09 | \n",
+ " 7.367372e+11 | \n",
+ " 1.073620e+22 | \n",
+ " 0.140641 | \n",
"
\n",
" \n",
" ... | \n",
@@ -1090,47 +1061,47 @@
"
\n",
" 9995 | \n",
" 9996 | \n",
- " 28333.429587 | \n",
- " 1.516093e+09 | \n",
- " 7.876042e+11 | \n",
- " 1.106522e+22 | \n",
- " 0.133559 | \n",
+ " 30120.948160 | \n",
+ " 1.611742e+09 | \n",
+ " 8.645756e+11 | \n",
+ " 1.240905e+22 | \n",
+ " 0.128845 | \n",
"
\n",
" \n",
" 9996 | \n",
" 9997 | \n",
- " 33293.751742 | \n",
- " 1.781515e+09 | \n",
- " 9.262805e+11 | \n",
- " 1.517008e+22 | \n",
- " 0.132969 | \n",
+ " 29505.301011 | \n",
+ " 1.578799e+09 | \n",
+ " 8.328856e+11 | \n",
+ " 1.177702e+22 | \n",
+ " 0.130296 | \n",
"
\n",
" \n",
" 9997 | \n",
" 9998 | \n",
- " 27751.804583 | \n",
- " 1.484971e+09 | \n",
- " 7.491701e+11 | \n",
- " 1.145281e+22 | \n",
- " 0.142848 | \n",
+ " 28972.147500 | \n",
+ " 1.550271e+09 | \n",
+ " 7.920749e+11 | \n",
+ " 1.207231e+22 | \n",
+ " 0.138717 | \n",
"
\n",
" \n",
" 9998 | \n",
" 9999 | \n",
- " 28916.711688 | \n",
- " 1.547304e+09 | \n",
- " 8.315393e+11 | \n",
- " 1.179917e+22 | \n",
- " 0.130630 | \n",
+ " 29690.242350 | \n",
+ " 1.588695e+09 | \n",
+ " 8.608747e+11 | \n",
+ " 1.228657e+22 | \n",
+ " 0.128758 | \n",
"
\n",
" \n",
" 9999 | \n",
" 10000 | \n",
- " 28934.369745 | \n",
- " 1.548249e+09 | \n",
- " 8.427457e+11 | \n",
- " 1.189358e+22 | \n",
- " 0.129408 | \n",
+ " 28906.531852 | \n",
+ " 1.546760e+09 | \n",
+ " 8.414476e+11 | \n",
+ " 1.154063e+22 | \n",
+ " 0.127670 | \n",
"
\n",
" \n",
"\n",
@@ -1139,41 +1110,41 @@
],
"text/plain": [
" realization unweighted_survey_density unweighted_survey_total \\\n",
- "0 1 31655.306244 1.693844e+09 \n",
- "1 2 28991.180148 1.551289e+09 \n",
- "2 3 30398.111427 1.626572e+09 \n",
- "3 4 29589.815642 1.583321e+09 \n",
- "4 5 29297.810263 1.567696e+09 \n",
+ "0 1 31029.275246 1.660345e+09 \n",
+ "1 2 30373.456534 1.625253e+09 \n",
+ "2 3 29777.890226 1.593385e+09 \n",
+ "3 4 27417.606462 1.467089e+09 \n",
+ "4 5 27326.837435 1.462232e+09 \n",
"... ... ... ... \n",
- "9995 9996 28333.429587 1.516093e+09 \n",
- "9996 9997 33293.751742 1.781515e+09 \n",
- "9997 9998 27751.804583 1.484971e+09 \n",
- "9998 9999 28916.711688 1.547304e+09 \n",
- "9999 10000 28934.369745 1.548249e+09 \n",
+ "9995 9996 30120.948160 1.611742e+09 \n",
+ "9996 9997 29505.301011 1.578799e+09 \n",
+ "9997 9998 28972.147500 1.550271e+09 \n",
+ "9998 9999 29690.242350 1.588695e+09 \n",
+ "9999 10000 28906.531852 1.546760e+09 \n",
"\n",
" weighted_survey_total weighted_survey_variance survey_cv \n",
- "0 8.965528e+11 1.350835e+22 0.129636 \n",
- "1 8.308540e+11 1.147280e+22 0.128917 \n",
- "2 8.521054e+11 1.271536e+22 0.132334 \n",
- "3 7.952773e+11 1.207085e+22 0.138150 \n",
- "4 8.139463e+11 1.184596e+22 0.133718 \n",
+ "0 8.872128e+11 1.295939e+22 0.128311 \n",
+ "1 8.559442e+11 1.304884e+22 0.133457 \n",
+ "2 8.737404e+11 1.248043e+22 0.127859 \n",
+ "3 7.923159e+11 1.046485e+22 0.129112 \n",
+ "4 7.367372e+11 1.073620e+22 0.140641 \n",
"... ... ... ... \n",
- "9995 7.876042e+11 1.106522e+22 0.133559 \n",
- "9996 9.262805e+11 1.517008e+22 0.132969 \n",
- "9997 7.491701e+11 1.145281e+22 0.142848 \n",
- "9998 8.315393e+11 1.179917e+22 0.130630 \n",
- "9999 8.427457e+11 1.189358e+22 0.129408 \n",
+ "9995 8.645756e+11 1.240905e+22 0.128845 \n",
+ "9996 8.328856e+11 1.177702e+22 0.130296 \n",
+ "9997 7.920749e+11 1.207231e+22 0.138717 \n",
+ "9998 8.608747e+11 1.228657e+22 0.128758 \n",
+ "9999 8.414476e+11 1.154063e+22 0.127670 \n",
"\n",
"[10000 rows x 6 columns]"
]
},
- "execution_count": 28,
+ "execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "survey.analysis[ 'stratified' ][ 'transect' ][ 'stratified_replicates_df' ]"
+ "survey.analysis[\"stratified\"][\"transect\"][\"stratified_replicates_df\"]"
]
},
{
@@ -1185,7 +1156,7 @@
},
{
"cell_type": "code",
- "execution_count": 29,
+ "execution_count": 39,
"metadata": {},
"outputs": [
{
@@ -1194,18 +1165,18 @@
"dict_keys(['transect'])"
]
},
- "execution_count": 29,
+ "execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "survey.results[ 'stratified' ].keys( )"
+ "survey.results[\"stratified\"].keys( )"
]
},
{
"cell_type": "code",
- "execution_count": 30,
+ "execution_count": 40,
"metadata": {},
"outputs": [
{
@@ -1214,18 +1185,18 @@
"dict_keys(['variable', 'ci_percentile', 'num_transects', 'stratum_area', 'total_area', 'estimate', 'ci', 'bias'])"
]
},
- "execution_count": 30,
+ "execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "survey.results[ 'stratified' ][ 'transect' ].keys()"
+ "survey.results[\"stratified\"][\"transect\"].keys()"
]
},
{
"cell_type": "code",
- "execution_count": 31,
+ "execution_count": 41,
"metadata": {
"tags": [
"scroll-output"
@@ -1236,36 +1207,36 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "{'bias': {'strata': {'density': array([ 193.96325158, -12560.33414499, 11929.59836116, 1989.40748471,\n",
- " 2628.43292714, -2751.97667212]),\n",
- " 'proportion': array([ 0.00039268, 0.0006178 , 0.00653998, -0.00532383, -0.00268681,\n",
- " 0.00046018]),\n",
- " 'total': array([ 5.69616189e+05, -1.31391125e+08, 7.05242016e+07, 1.00116984e+07,\n",
- " 1.84513426e+07, -3.33495466e+07])},\n",
+ "{'bias': {'strata': {'density': array([ 171.08507656, -12480.88832599, 11883.66542419, 2110.3276611 ,\n",
+ " 2641.26191473, -2777.92634046]),\n",
+ " 'proportion': array([ 3.32608844e-04, 1.15444109e-03, 6.26195926e-03, -5.05072056e-03,\n",
+ " -2.75960021e-03, 6.13115734e-05]),\n",
+ " 'total': array([ 4.72464550e+05, -1.30593329e+08, 7.02589883e+07, 1.08653905e+07,\n",
+ " 1.85420152e+07, -3.38508638e+07])},\n",
" 'survey': {'cv': 0.0,\n",
- " 'density': -5596.023793829252,\n",
- " 'total': -65183813.17214823}},\n",
- " 'ci': {'strata': {'density': [array([-193.96325158, 2499.53181979]),\n",
- " array([30382.17342179, 45486.02397884]),\n",
- " array([37368.14422708, 67098.09159068]),\n",
- " array([45619.40207899, 76325.09536548]),\n",
- " array([25303.0768114 , 45079.95029436]),\n",
- " array([ 4939.20833666, 13024.90836066])],\n",
- " 'proportion': [array([-0.00039268, 0.00648097]),\n",
- " array([0.19008614, 0.30138192]),\n",
- " array([0.1520135 , 0.23905517]),\n",
- " array([0.20723541, 0.32418469]),\n",
- " array([0.11885702, 0.19870254]),\n",
- " array([0.04128163, 0.13241507])],\n",
- " 'total': [array([ -569616.18916254, 10868248.05712733]),\n",
- " array([3.10358242e+08, 4.62031284e+08]),\n",
- " array([2.14117223e+08, 3.85775682e+08]),\n",
- " array([3.26104811e+08, 5.42885918e+08]),\n",
- " array([1.78962795e+08, 3.18741650e+08]),\n",
- " array([7.56042968e+07, 2.31810537e+08])]},\n",
- " 'survey': {'cv': array([0.12836916, 0.14686483]),\n",
- " 'density': array([31132.96814526, 38455.27935803]),\n",
- " 'total': array([1.43164010e+09, 1.82344963e+09])}},\n",
+ " 'density': -5579.606395097653,\n",
+ " 'total': -64305334.62672186}},\n",
+ " 'ci': {'strata': {'density': [array([ 342.90252249, 2589.65398715]),\n",
+ " array([32245.16297489, 46562.56919573]),\n",
+ " array([38822.3430067 , 67876.84936713]),\n",
+ " array([45758.32056166, 76467.93885507]),\n",
+ " array([27289.86449932, 45719.19823215]),\n",
+ " array([ 5386.98786082, 14429.59859619])],\n",
+ " 'proportion': [array([0.00080833, 0.00719757]),\n",
+ " array([0.19511899, 0.30428231]),\n",
+ " array([0.15323549, 0.23943161]),\n",
+ " array([0.20962014, 0.32669598]),\n",
+ " array([0.1213844 , 0.20067056]),\n",
+ " array([0.05228901, 0.14194497])],\n",
+ " 'total': [array([ 1710171.84815988, 11250949.74714327]),\n",
+ " array([3.29066404e+08, 4.72841963e+08]),\n",
+ " array([2.22513656e+08, 3.90272171e+08]),\n",
+ " array([3.27085571e+08, 5.43894388e+08]),\n",
+ " array([1.93005000e+08, 3.23259722e+08]),\n",
+ " array([8.42548719e+07, 2.58947504e+08])]},\n",
+ " 'survey': {'cv': array([0.12700586, 0.14355464]),\n",
+ " 'density': array([31070.38036136, 38657.85708553]),\n",
+ " 'total': array([1.42829109e+09, 1.83428936e+09])}},\n",
" 'ci_percentile': 0.95,\n",
" 'estimate': {'strata': {'density': array([ 1865.95769521, 41034.31315604, 56975.28564271, 62677.77872802,\n",
" 37805.71314932, 10162.75826037]),\n",
@@ -1273,9 +1244,9 @@
" 0.10742185]),\n",
" 'total': array([8.17779026e+06, 4.17327152e+08, 3.27327369e+08, 4.46536346e+08,\n",
" 2.67328845e+08, 1.76517154e+08])},\n",
- " 'survey': {'cv': 0.13279614031465747,\n",
- " 'density': 35086.96777194492,\n",
- " 'total': 1643214656.7113335}},\n",
+ " 'survey': {'cv': 0.13283795506546106,\n",
+ " 'density': 35086.967771944925,\n",
+ " 'total': 1643214656.711334}},\n",
" 'num_transects': 113,\n",
" 'stratum_area': array([ 4246.47676837, 10042.01157457, 5773.92410464, 7059.96458516,\n",
" 7067.79332245, 19318.82700719]),\n",
@@ -1285,7 +1256,7 @@
}
],
"source": [
- "pprint.pprint( survey.results[ 'stratified' ][ 'transect' ])"
+ "pprint.pprint(survey.results[\"stratified\"][\"transect\"])"
]
},
{
@@ -1300,30 +1271,36 @@
"metadata": {},
"source": [
"`Survey.kriging_analysis(...)` computes the kriged estimates for the target variable via ordinary kriging with an adaptive search radius. The arguments to `Survey.kriging_analysis(...)` include:\n",
- "* `coordinate_transform (boolean)`: when `True`, the transect and mesh longitude/latitude coordinates are transformed to a standardized format as x/y (default: `True`)\n",
- "* `crop_method ('transect_ends', 'convex_hull')`: when `extrapolate = False`, this determines the method used for cropping the kriging mesh. Setting `crop_method = 'transect_ends'` (*default*) resamples the latitudinal resolution of the mesh grid and interpolates over the extent of the eastern and western endpoints of each transect line. This is conducted in a piece-wise fashion to account for the island of Haida Gwaii. Setting `crop_method = 'convex_hull'` uses a polygon-based approach for cropping the mesh grid based on the survey extent.\n",
+ "* `cropping_parameters (dictionary)`: \n",
+ " * `crop_method (\"transect_ends\", \"convex_hull\")`: when `extrapolate = False`, this determines the method used for cropping the kriging mesh. Setting `crop_method = \"transect_ends\"` (*default*) resamples the latitudinal resolution of the mesh grid and interpolates over the extent of the eastern and western endpoints of each transect line. This is conducted in a piece-wise fashion to account for the island of Haida Gwaii. Setting `crop_method = \"convex_hull\"` uses a polygon-based approach for cropping the mesh grid based on the survey extent.\n",
+ "\n",
+ " There are also analysis-specific optional arguments that are used depending on how `crop_method` is defined:\n",
+ " * When `crop_method = \"transect_ends\"`:\n",
+ " * `latitude_resolution (float)`: the updated latitudinal resolution (**in nmi**) used for interpolation\n",
+ " * `bearing_tolerance (float)`: angular tolerance (in degrees) used for grouping transect lines based on their respective bearings for interpolating the survey extent\n",
+ " * When `crop_method = 'convex_hull'`:\n",
+ " * `mesh_buffer_distance`: this is a dilation factor (**in nmi**) that expands/buffers the extent of the polygon defining the survey extent (default: `1.25`)\n",
+ " * `num_nearest_transects`: this defines the number of nearest neighboring transects used for generating smaller polygons that are then constructed into the survey-wide polygon\n",
+ " \n",
+ "* `coordinate_transform (boolean)`: when `True`, the transect and mesh longitude/latitude coordinates are transformed to a standardized format as *x*/*y* (default: `True`)\n",
"* `extrapolate(boolean)`: when `True`, the entire kriging mesh is used. Otherwise, different methods are used to crop the kriging mesh to limit extrapolation beyond the extent of the survey transects. \n",
- "* `stratum ('ks','inpfc')`: the stratum used for mapping the defined kriged `variable` (default: `'ks'`) \n",
- "* `variable(string)`: the data variable that will be used for the kriging analysis (default: `'biomass_density'`)\n",
+ "* `variable(string)`: the data variable that will be used for the kriging analysis (default: `\"biomass\"`)\n",
"* `verbose (boolean)`: dialogue messages will appear in the console including a summary report of the results when this is set to `True` (default: `True`)\n",
"\n",
- "There are also analysis-specific optional arguments that are used depending on how `crop_method` is defined:\n",
- "* When `crop_method = 'transect_ends'`:\n",
- " * `latitude_resolution (float)`: the updated latitudinal resolution (**in nmi**) used for interpolation\n",
- "* When `crop_method = 'convex_hull'`:\n",
- " * `mesh_buffer_distance`: this is a dilation factor (**in nmi**) that expands/buffers the extent of the polygon defining the survey extent (default: `1.25`)\n",
- " * `num_nearest_transects`: this defines the number of nearest neighboring transects used for generating smaller polygons that are then constructed into the survey-wide polygon\n",
- "\n",
"Lastly, there are additional arguments that are optional since they are otherwise inherited from various parts of the `Survey` object: \n",
- "* `kriging_parameters (dictionary)`: a dictionary containing various kriging parameter variables and arguments\n",
- "* `projection (string)`: an EPSG string that defines the mapping projection\n",
- "* `variogram_parameters (dictionary)`: a dictionary containing various variogram parameter variables and arguments\n",
+ "* `kriging_parameters (dictionary)`: a dictionary containing various kriging parameter variables and arguments: \n",
+ " * `anisotropy (float)`: the relative magnitude of directionality of the spatially autocorrelated process. It is assumed that variogram parameters (e.g. nugget effect, sill) are the same in all directions and therefore considered to be nearly isotropic\n",
+ " * `correlation_range (float)`: the relative length scale, or range, at which the autocorrelation between lag distances no longer increases and becomes asymptotic\n",
+ " * `kmax (integer)`: the maximum number of nearest neighbors required for including values for kriging detected within the search radius\n",
+ " * `kmin (integer)`: the minimum number of nearest neighbors required for including values for kriging within the search radius\n",
+ " * `search_radius (float)`: the adaptive search radius that identifies the *k*-nearest neighbors around each georeferenced value that are subsequently kriged\n",
+ "* `variogram_parameters (dictionary)`: an optional dictionary containing various variogram parameter variables and arguments\n",
"* `best_fit_variogram (boolean)`: a boolean argument that dictates whether to use optimized variogram parameters (see above details for `Survey.fit_variogram()` and `Survey.variogram_gui()`)"
]
},
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": 48,
"metadata": {},
"outputs": [
{
@@ -1331,9 +1308,9 @@
"output_type": "stream",
"text": [
"Longitude and latitude coordinates (WGS84) converted to standardized coordinates (x and y).\n",
- "Extrapolation applied to kriging mesh points (81 of 9463):\n",
+ "Extrapolation applied to kriging mesh points (80 of 9448):\n",
" * 77 points had 0 valid range estimates without extrapolation\n",
- " * 4 points had at least 1 valid point but fewer than 3 valid neighbors\n",
+ " * 3 points had at least 1 valid point but fewer than 3 valid neighbors\n",
"Imputed apportioned unaged male biomass at length bins:\n",
"(17.0, 19.0], (59.0, 61.0], (61.0, 63.0], (63.0, 65.0], (65.0, 67.0], (67.0, 69.0], (69.0, 71.0], (71.0, 73.0], (73.0, 75.0], (75.0, 77.0]\n",
"Imputed apportioned unaged female biomass at length bins:\n",
@@ -1341,7 +1318,7 @@
"--------------------------------\n",
"KRIGING RESULTS (MESH)\n",
"--------------------------------\n",
- "| Kriged variable: Biomass density (kg/nmi^2)\n",
+ "| Kriged variable: Biomass (kg/nmi^2)\n",
"| Age-1 fish excluded: True\n",
"| Stratum definition: KS\n",
"| Mesh extrapolation: False\n",
@@ -1350,17 +1327,25 @@
"--------------------------------\n",
"GENERAL RESULTS\n",
"--------------------------------\n",
- "| Mean biomassdensity: 27804.61 kg/nmi^2\n",
- "| Total survey biomass estimate: 1644.31 kmt\n",
- "| Mean mesh sample CV: 0.0239\n",
- "| Overall survey CV: 0.0268\n",
- "| Total area coverage: 58186.9 nmi^2\n",
+ "| Mean biomass: 27971.52 kg/nmi^2\n",
+ "| Total survey biomass estimate: 1651.44 kmt\n",
+ "| Mean mesh sample CV: 0.0253\n",
+ "| Overall survey CV: 0.0281\n",
+ "| Total area coverage: 58097.5 nmi^2\n",
"--------------------------------\n"
]
}
],
"source": [
- "survey.kriging_analysis( bearing_tolerance = 15.0 , coordinate_transform = True , crop_method = 'transect_ends' , extrapolate = False , latitude_resolution = 1.25 , stratum = 'ks' , variable = 'biomass_density' , verbose = True )"
+ "survey.kriging_analysis(cropping_parameters={\"crop_method\": \"transect_ends\",\n",
+ " \"latitude_resolution\": 1.25,\n",
+ " \"bearing_tolerance\": 15.0}, \n",
+ " kriging_parameters={\"kmin\": 3, \"kmax\": 10},\n",
+ " best_fit_variogram=True,\n",
+ " extrapolate=False,\n",
+ " coordinate_transform=True,\n",
+ " variable=\"biomass\",\n",
+ " verbose=True)"
]
},
{
@@ -1372,7 +1357,7 @@
},
{
"cell_type": "code",
- "execution_count": 25,
+ "execution_count": 49,
"metadata": {},
"outputs": [
{
@@ -1381,13 +1366,13 @@
"dict_keys(['variable', 'survey_mean', 'survey_estimate', 'survey_cv', 'mesh_results_df', 'tables'])"
]
},
- "execution_count": 25,
+ "execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "survey.results[ 'kriging' ].keys()"
+ "survey.results[\"kriging\"].keys()"
]
},
{
@@ -1399,19 +1384,20 @@
},
{
"cell_type": "code",
- "execution_count": 26,
+ "execution_count": 50,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "['biomass_density', 27807.10994608753, 1644447357.8872852, 0.02693646385644838]\n"
+ "['biomass_density', 27971.524244491364, 1651443932.266085, 0.028098804792418622]\n"
]
}
],
"source": [
- "pprint.pprint( [survey.results['kriging'].get(key) for key in ['variable' , 'survey_mean' , 'survey_estimate' , 'survey_cv'] ] )"
+ "pprint.pprint([survey.results[\"kriging\"].get(key) for key in [\"variable\", \"survey_mean\", \n",
+ " \"survey_estimate\", \"survey_cv\"]])"
]
},
{
@@ -1423,7 +1409,7 @@
},
{
"cell_type": "code",
- "execution_count": 27,
+ "execution_count": 51,
"metadata": {},
"outputs": [
{
@@ -1464,10 +1450,10 @@
" 49.057959 | \n",
" -126.024127 | \n",
" 6.250000 | \n",
- " 0.00000 | \n",
- " 0.027817 | \n",
+ " 0.000000 | \n",
+ " 0.031410 | \n",
" NaN | \n",
- " 0.007911 | \n",
+ " 0.008365 | \n",
" 0.000000 | \n",
" 7 | \n",
" \n",
@@ -1476,10 +1462,10 @@
" 49.016196 | \n",
" -126.024110 | \n",
" 6.250000 | \n",
- " 0.00000 | \n",
- " 0.246388 | \n",
+ " 0.000000 | \n",
+ " 0.278348 | \n",
" NaN | \n",
- " 0.023545 | \n",
+ " 0.024901 | \n",
" 0.000000 | \n",
" 7 | \n",
" \n",
@@ -1488,10 +1474,10 @@
" 48.974438 | \n",
" -126.024093 | \n",
" 6.250000 | \n",
- " 0.00000 | \n",
- " 0.530815 | \n",
+ " 0.000000 | \n",
+ " 0.584354 | \n",
" NaN | \n",
- " 0.034559 | \n",
+ " 0.036079 | \n",
" 0.000000 | \n",
" 7 | \n",
" \n",
@@ -1500,11 +1486,11 @@
" 48.932686 | \n",
" -126.024076 | \n",
" 6.250000 | \n",
- " 51334.44202 | \n",
- " 0.669093 | \n",
- " 1.164446 | \n",
- " 0.038800 | \n",
- " 320840.262622 | \n",
+ " 48215.509026 | \n",
+ " 0.739334 | \n",
+ " 1.303223 | \n",
+ " 0.040583 | \n",
+ " 301346.931415 | \n",
" 7 | \n",
" \n",
" \n",
@@ -1512,10 +1498,10 @@
" 48.890939 | \n",
" -126.024060 | \n",
" 6.250000 | \n",
- " 0.00000 | \n",
- " 0.711263 | \n",
+ " 0.000000 | \n",
+ " 0.783366 | \n",
" NaN | \n",
- " 0.040004 | \n",
+ " 0.041774 | \n",
" 0.000000 | \n",
" 8 | \n",
"
\n",
@@ -1536,10 +1522,10 @@
" 52.895008 | \n",
" -132.337719 | \n",
" 0.011343 | \n",
- " 0.00000 | \n",
- " 0.902214 | \n",
+ " 0.000000 | \n",
+ " 0.947455 | \n",
" NaN | \n",
- " 0.045055 | \n",
+ " 0.045941 | \n",
" 0.000000 | \n",
" 1 | \n",
" \n",
@@ -1548,10 +1534,10 @@
" 52.813140 | \n",
" -132.260812 | \n",
" 0.009924 | \n",
- " 0.00000 | \n",
- " 0.487711 | \n",
+ " 0.000000 | \n",
+ " 0.539868 | \n",
" NaN | \n",
- " 0.033126 | \n",
+ " 0.034679 | \n",
" 0.000000 | \n",
" 1 | \n",
" \n",
@@ -1560,10 +1546,10 @@
" 38.025533 | \n",
" -123.013372 | \n",
" 0.006006 | \n",
- " 0.00000 | \n",
- " 0.298523 | \n",
+ " 0.000000 | \n",
+ " 0.346581 | \n",
" NaN | \n",
- " 0.025917 | \n",
+ " 0.027786 | \n",
" 0.000000 | \n",
" 5 | \n",
" \n",
@@ -1572,10 +1558,10 @@
" 35.646423 | \n",
" -121.257388 | \n",
" 0.001815 | \n",
- " 0.00000 | \n",
- " 0.312910 | \n",
+ " 0.000000 | \n",
+ " 0.365594 | \n",
" NaN | \n",
- " 0.026534 | \n",
+ " 0.028538 | \n",
" 0.000000 | \n",
" 3 | \n",
" \n",
@@ -1584,55 +1570,55 @@
" 51.789454 | \n",
" -128.241684 | \n",
" 0.001462 | \n",
- " 0.00000 | \n",
- " 1.258324 | \n",
+ " 0.000000 | \n",
+ " 1.240780 | \n",
" NaN | \n",
- " 0.053209 | \n",
+ " 0.052574 | \n",
" 0.000000 | \n",
" 1 | \n",
" \n",
" \n",
"\n",
- "9463 rows × 9 columns
\n",
+ "9448 rows × 9 columns
\n",
""
],
"text/plain": [
- " latitude longitude area kriged_mean kriged_variance \\\n",
- "1 49.057959 -126.024127 6.250000 0.00000 0.027817 \n",
- "2 49.016196 -126.024110 6.250000 0.00000 0.246388 \n",
- "3 48.974438 -126.024093 6.250000 0.00000 0.530815 \n",
- "4 48.932686 -126.024076 6.250000 51334.44202 0.669093 \n",
- "5 48.890939 -126.024060 6.250000 0.00000 0.711263 \n",
- "... ... ... ... ... ... \n",
- "19804 52.895008 -132.337719 0.011343 0.00000 0.902214 \n",
- "19806 52.813140 -132.260812 0.009924 0.00000 0.487711 \n",
- "19814 38.025533 -123.013372 0.006006 0.00000 0.298523 \n",
- "19830 35.646423 -121.257388 0.001815 0.00000 0.312910 \n",
- "19831 51.789454 -128.241684 0.001462 0.00000 1.258324 \n",
+ " latitude longitude area kriged_mean kriged_variance \\\n",
+ "1 49.057959 -126.024127 6.250000 0.000000 0.031410 \n",
+ "2 49.016196 -126.024110 6.250000 0.000000 0.278348 \n",
+ "3 48.974438 -126.024093 6.250000 0.000000 0.584354 \n",
+ "4 48.932686 -126.024076 6.250000 48215.509026 0.739334 \n",
+ "5 48.890939 -126.024060 6.250000 0.000000 0.783366 \n",
+ "... ... ... ... ... ... \n",
+ "19804 52.895008 -132.337719 0.011343 0.000000 0.947455 \n",
+ "19806 52.813140 -132.260812 0.009924 0.000000 0.539868 \n",
+ "19814 38.025533 -123.013372 0.006006 0.000000 0.346581 \n",
+ "19830 35.646423 -121.257388 0.001815 0.000000 0.365594 \n",
+ "19831 51.789454 -128.241684 0.001462 0.000000 1.240780 \n",
"\n",
" sample_variance sample_cv biomass stratum_num \n",
- "1 NaN 0.007911 0.000000 7 \n",
- "2 NaN 0.023545 0.000000 7 \n",
- "3 NaN 0.034559 0.000000 7 \n",
- "4 1.164446 0.038800 320840.262622 7 \n",
- "5 NaN 0.040004 0.000000 8 \n",
+ "1 NaN 0.008365 0.000000 7 \n",
+ "2 NaN 0.024901 0.000000 7 \n",
+ "3 NaN 0.036079 0.000000 7 \n",
+ "4 1.303223 0.040583 301346.931415 7 \n",
+ "5 NaN 0.041774 0.000000 8 \n",
"... ... ... ... ... \n",
- "19804 NaN 0.045055 0.000000 1 \n",
- "19806 NaN 0.033126 0.000000 1 \n",
- "19814 NaN 0.025917 0.000000 5 \n",
- "19830 NaN 0.026534 0.000000 3 \n",
- "19831 NaN 0.053209 0.000000 1 \n",
+ "19804 NaN 0.045941 0.000000 1 \n",
+ "19806 NaN 0.034679 0.000000 1 \n",
+ "19814 NaN 0.027786 0.000000 5 \n",
+ "19830 NaN 0.028538 0.000000 3 \n",
+ "19831 NaN 0.052574 0.000000 1 \n",
"\n",
- "[9463 rows x 9 columns]"
+ "[9448 rows x 9 columns]"
]
},
- "execution_count": 27,
+ "execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "survey.results[ 'kriging' ][ 'mesh_results_df' ]"
+ "survey.results[\"kriging\"][\"mesh_results_df\"]"
]
},
{
@@ -1646,7 +1632,7 @@
},
{
"cell_type": "code",
- "execution_count": 28,
+ "execution_count": 52,
"metadata": {},
"outputs": [
{
@@ -2066,13 +2052,13 @@
"[80 rows x 22 columns]"
]
},
- "execution_count": 28,
+ "execution_count": 52,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "survey.results['kriging']['tables'][ 'aged_tbl' ]"
+ "survey.results[\"kriging\"][\"tables\"][\"aged_tbl\"]"
]
},
{
@@ -2084,7 +2070,7 @@
},
{
"cell_type": "code",
- "execution_count": 29,
+ "execution_count": 53,
"metadata": {
"tags": [
"scroll-output"
@@ -2164,153 +2150,153 @@
" \n",
" \n",
" (17.0, 19.0] | \n",
- " 5.687932e+03 | \n",
- " 6.783916e+03 | \n",
+ " 5.741773e+03 | \n",
+ " 6.848132e+03 | \n",
"
\n",
" \n",
" (19.0, 21.0] | \n",
- " 1.397287e+06 | \n",
- " 1.623948e+06 | \n",
+ " 1.410595e+06 | \n",
+ " 1.639382e+06 | \n",
"
\n",
" \n",
" (21.0, 23.0] | \n",
- " 5.188752e+06 | \n",
- " 5.934160e+06 | \n",
+ " 5.238352e+06 | \n",
+ " 5.990702e+06 | \n",
"
\n",
" \n",
" (23.0, 25.0] | \n",
- " 3.684815e+06 | \n",
- " 3.991881e+06 | \n",
+ " 3.720462e+06 | \n",
+ " 4.030254e+06 | \n",
"
\n",
" \n",
" (25.0, 27.0] | \n",
- " 8.907899e+05 | \n",
- " 8.788040e+05 | \n",
+ " 8.995033e+05 | \n",
+ " 8.873309e+05 | \n",
"
\n",
" \n",
" (27.0, 29.0] | \n",
- " 1.267300e+06 | \n",
- " 1.244515e+06 | \n",
+ " 1.277942e+06 | \n",
+ " 1.254992e+06 | \n",
"
\n",
" \n",
" (29.0, 31.0] | \n",
- " 3.854607e+06 | \n",
- " 3.470829e+06 | \n",
+ " 3.882470e+06 | \n",
+ " 3.495746e+06 | \n",
"
\n",
" \n",
" (31.0, 33.0] | \n",
- " 8.185496e+06 | \n",
- " 7.546845e+06 | \n",
+ " 8.238349e+06 | \n",
+ " 7.594553e+06 | \n",
"
\n",
" \n",
" (33.0, 35.0] | \n",
- " 1.151938e+07 | \n",
- " 1.162517e+07 | \n",
+ " 1.157078e+07 | \n",
+ " 1.167517e+07 | \n",
"
\n",
" \n",
" (35.0, 37.0] | \n",
- " 2.025276e+07 | \n",
- " 2.142187e+07 | \n",
+ " 2.032393e+07 | \n",
+ " 2.149622e+07 | \n",
"
\n",
" \n",
" (37.0, 39.0] | \n",
- " 4.579534e+07 | \n",
- " 4.875269e+07 | \n",
+ " 4.595175e+07 | \n",
+ " 4.891771e+07 | \n",
"
\n",
" \n",
" (39.0, 41.0] | \n",
- " 1.125664e+08 | \n",
- " 1.204117e+08 | \n",
+ " 1.129624e+08 | \n",
+ " 1.208329e+08 | \n",
"
\n",
" \n",
" (41.0, 43.0] | \n",
- " 1.559870e+08 | \n",
- " 1.664850e+08 | \n",
+ " 1.565552e+08 | \n",
+ " 1.670850e+08 | \n",
"
\n",
" \n",
" (43.0, 45.0] | \n",
- " 1.465964e+08 | \n",
- " 1.534196e+08 | \n",
+ " 1.471591e+08 | \n",
+ " 1.539867e+08 | \n",
"
\n",
" \n",
" (45.0, 47.0] | \n",
- " 8.929690e+07 | \n",
- " 8.673402e+07 | \n",
+ " 8.969156e+07 | \n",
+ " 8.707751e+07 | \n",
"
\n",
" \n",
" (47.0, 49.0] | \n",
- " 5.524730e+07 | \n",
- " 4.462098e+07 | \n",
+ " 5.555871e+07 | \n",
+ " 4.482904e+07 | \n",
"
\n",
" \n",
" (49.0, 51.0] | \n",
- " 3.389624e+07 | \n",
- " 2.101717e+07 | \n",
+ " 3.411725e+07 | \n",
+ " 2.113110e+07 | \n",
"
\n",
" \n",
" (51.0, 53.0] | \n",
- " 2.512031e+07 | \n",
- " 1.026895e+07 | \n",
+ " 2.530214e+07 | \n",
+ " 1.033704e+07 | \n",
"
\n",
" \n",
" (53.0, 55.0] | \n",
- " 1.908988e+07 | \n",
- " 5.884165e+06 | \n",
+ " 1.922789e+07 | \n",
+ " 5.926326e+06 | \n",
"
\n",
" \n",
" (55.0, 57.0] | \n",
- " 1.492927e+07 | \n",
- " 4.010323e+06 | \n",
+ " 1.503049e+07 | \n",
+ " 4.035544e+06 | \n",
"
\n",
" \n",
" (57.0, 59.0] | \n",
- " 1.285332e+07 | \n",
- " 3.503737e+06 | \n",
+ " 1.294091e+07 | \n",
+ " 3.526128e+06 | \n",
"
\n",
" \n",
" (59.0, 61.0] | \n",
- " 1.087663e+07 | \n",
- " 3.085044e+06 | \n",
+ " 1.094936e+07 | \n",
+ " 3.103979e+06 | \n",
"
\n",
" \n",
" (61.0, 63.0] | \n",
- " 3.350678e+06 | \n",
- " 1.009916e+06 | \n",
+ " 3.373923e+06 | \n",
+ " 1.016721e+06 | \n",
"
\n",
" \n",
" (63.0, 65.0] | \n",
- " 3.536740e+06 | \n",
- " 1.368239e+06 | \n",
+ " 3.560018e+06 | \n",
+ " 1.376059e+06 | \n",
"
\n",
" \n",
" (65.0, 67.0] | \n",
- " 1.443048e+06 | \n",
- " 1.093157e+06 | \n",
+ " 1.450243e+06 | \n",
+ " 1.097615e+06 | \n",
"
\n",
" \n",
" (67.0, 69.0] | \n",
- " 1.507882e+06 | \n",
- " 7.175957e+05 | \n",
+ " 1.516443e+06 | \n",
+ " 7.205752e+05 | \n",
"
\n",
" \n",
" (69.0, 71.0] | \n",
- " 1.358364e+06 | \n",
- " 8.772020e+05 | \n",
+ " 1.366207e+06 | \n",
+ " 8.814750e+05 | \n",
"
\n",
" \n",
" (71.0, 73.0] | \n",
- " 1.094846e+06 | \n",
- " 7.071672e+05 | \n",
+ " 1.100302e+06 | \n",
+ " 7.099149e+05 | \n",
"
\n",
" \n",
" (73.0, 75.0] | \n",
- " 3.236650e+05 | \n",
- " 3.486287e+05 | \n",
+ " 3.248286e+05 | \n",
+ " 3.498822e+05 | \n",
"
\n",
" \n",
" (75.0, 77.0] | \n",
- " 7.041550e+05 | \n",
- " 7.584654e+05 | \n",
+ " 7.066867e+05 | \n",
+ " 7.611923e+05 | \n",
"
\n",
" \n",
" (77.0, 79.0] | \n",
@@ -2337,47 +2323,47 @@
"(11.0, 13.0] 0.000000e+00 0.000000e+00\n",
"(13.0, 15.0] 0.000000e+00 0.000000e+00\n",
"(15.0, 17.0] 0.000000e+00 0.000000e+00\n",
- "(17.0, 19.0] 5.687932e+03 6.783916e+03\n",
- "(19.0, 21.0] 1.397287e+06 1.623948e+06\n",
- "(21.0, 23.0] 5.188752e+06 5.934160e+06\n",
- "(23.0, 25.0] 3.684815e+06 3.991881e+06\n",
- "(25.0, 27.0] 8.907899e+05 8.788040e+05\n",
- "(27.0, 29.0] 1.267300e+06 1.244515e+06\n",
- "(29.0, 31.0] 3.854607e+06 3.470829e+06\n",
- "(31.0, 33.0] 8.185496e+06 7.546845e+06\n",
- "(33.0, 35.0] 1.151938e+07 1.162517e+07\n",
- "(35.0, 37.0] 2.025276e+07 2.142187e+07\n",
- "(37.0, 39.0] 4.579534e+07 4.875269e+07\n",
- "(39.0, 41.0] 1.125664e+08 1.204117e+08\n",
- "(41.0, 43.0] 1.559870e+08 1.664850e+08\n",
- "(43.0, 45.0] 1.465964e+08 1.534196e+08\n",
- "(45.0, 47.0] 8.929690e+07 8.673402e+07\n",
- "(47.0, 49.0] 5.524730e+07 4.462098e+07\n",
- "(49.0, 51.0] 3.389624e+07 2.101717e+07\n",
- "(51.0, 53.0] 2.512031e+07 1.026895e+07\n",
- "(53.0, 55.0] 1.908988e+07 5.884165e+06\n",
- "(55.0, 57.0] 1.492927e+07 4.010323e+06\n",
- "(57.0, 59.0] 1.285332e+07 3.503737e+06\n",
- "(59.0, 61.0] 1.087663e+07 3.085044e+06\n",
- "(61.0, 63.0] 3.350678e+06 1.009916e+06\n",
- "(63.0, 65.0] 3.536740e+06 1.368239e+06\n",
- "(65.0, 67.0] 1.443048e+06 1.093157e+06\n",
- "(67.0, 69.0] 1.507882e+06 7.175957e+05\n",
- "(69.0, 71.0] 1.358364e+06 8.772020e+05\n",
- "(71.0, 73.0] 1.094846e+06 7.071672e+05\n",
- "(73.0, 75.0] 3.236650e+05 3.486287e+05\n",
- "(75.0, 77.0] 7.041550e+05 7.584654e+05\n",
+ "(17.0, 19.0] 5.741773e+03 6.848132e+03\n",
+ "(19.0, 21.0] 1.410595e+06 1.639382e+06\n",
+ "(21.0, 23.0] 5.238352e+06 5.990702e+06\n",
+ "(23.0, 25.0] 3.720462e+06 4.030254e+06\n",
+ "(25.0, 27.0] 8.995033e+05 8.873309e+05\n",
+ "(27.0, 29.0] 1.277942e+06 1.254992e+06\n",
+ "(29.0, 31.0] 3.882470e+06 3.495746e+06\n",
+ "(31.0, 33.0] 8.238349e+06 7.594553e+06\n",
+ "(33.0, 35.0] 1.157078e+07 1.167517e+07\n",
+ "(35.0, 37.0] 2.032393e+07 2.149622e+07\n",
+ "(37.0, 39.0] 4.595175e+07 4.891771e+07\n",
+ "(39.0, 41.0] 1.129624e+08 1.208329e+08\n",
+ "(41.0, 43.0] 1.565552e+08 1.670850e+08\n",
+ "(43.0, 45.0] 1.471591e+08 1.539867e+08\n",
+ "(45.0, 47.0] 8.969156e+07 8.707751e+07\n",
+ "(47.0, 49.0] 5.555871e+07 4.482904e+07\n",
+ "(49.0, 51.0] 3.411725e+07 2.113110e+07\n",
+ "(51.0, 53.0] 2.530214e+07 1.033704e+07\n",
+ "(53.0, 55.0] 1.922789e+07 5.926326e+06\n",
+ "(55.0, 57.0] 1.503049e+07 4.035544e+06\n",
+ "(57.0, 59.0] 1.294091e+07 3.526128e+06\n",
+ "(59.0, 61.0] 1.094936e+07 3.103979e+06\n",
+ "(61.0, 63.0] 3.373923e+06 1.016721e+06\n",
+ "(63.0, 65.0] 3.560018e+06 1.376059e+06\n",
+ "(65.0, 67.0] 1.450243e+06 1.097615e+06\n",
+ "(67.0, 69.0] 1.516443e+06 7.205752e+05\n",
+ "(69.0, 71.0] 1.366207e+06 8.814750e+05\n",
+ "(71.0, 73.0] 1.100302e+06 7.099149e+05\n",
+ "(73.0, 75.0] 3.248286e+05 3.498822e+05\n",
+ "(75.0, 77.0] 7.066867e+05 7.611923e+05\n",
"(77.0, 79.0] 0.000000e+00 0.000000e+00\n",
"(79.0, 81.0] 0.000000e+00 0.000000e+00"
]
},
- "execution_count": 29,
+ "execution_count": 53,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "survey.results['kriging']['tables']['unaged_tbl']"
+ "survey.results[\"kriging\"][\"tables\"][\"unaged_tbl\"]"
]
},
{
@@ -2389,7 +2375,7 @@
},
{
"cell_type": "code",
- "execution_count": 30,
+ "execution_count": 54,
"metadata": {},
"outputs": [
{
@@ -2519,13 +2505,13 @@
"[2640 rows x 4 columns]"
]
},
- "execution_count": 30,
+ "execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "survey.results['kriging']['tables']['overall_apportionment_df']"
+ "survey.results[\"kriging\"][\"tables\"][\"overall_apportionment_df\"]"
]
},
{
@@ -2537,7 +2523,7 @@
},
{
"cell_type": "code",
- "execution_count": 31,
+ "execution_count": 55,
"metadata": {},
"outputs": [
{
@@ -2550,34 +2536,34 @@
"| Stratified variable: Biomass (kmt)\n",
"| Number of virtual transects: 102\n",
"| Number of strata (INPFC): 6\n",
- "| Total area coverage: 35290.0 nmi^2\n",
+ "| Total area coverage: 35118.0 nmi^2\n",
"| Age-1 fish excluded: True\n",
"| Bootstrap replicates: 10000 samples\n",
"| Resampling proportion: 0.75\n",
- "| Bootstrap interval method: BCa (CI: 95.0%)\n",
+ "| Bootstrap interval method: t-jackknife (CI: 95.0%)\n",
"--------------------------------\n",
"STRATUM-SPECIFIC ESTIMATES\n",
"--------------------------------\n",
"| Stratum area coverage (n = 6):\n",
- " 2580.0 | 5614.0 | 3241.0 | 3313.0 | 3841.0 | 16701.0 nmi^2\n",
+ " 2580.0 | 5614.0 | 3241.0 | 3313.0 | 3841.0 | 16529.0 nmi^2\n",
"| Stratum mean biomass density (kmt/nmi^2):\n",
- " 0.002 [-0.001, 0.003] | 0.035 [0.027, 0.039] | 0.057 [0.036, 0.066]\n",
- " 0.065 [0.046, 0.077] | 0.036 [0.019, 0.046] | 0.008 [0.007, 0.009]\n",
+ " 0.002 [-0.001, 0.003] | 0.035 [0.028, 0.04] | 0.057 [0.041, 0.068]\n",
+ " 0.065 [0.048, 0.078] | 0.036 [0.021, 0.047] | 0.008 [0.007, 0.009]\n",
"| Stratum mean biomass (kmt):\n",
- " 7.9 [0.0, 10.6] | 369.4 [324.3, 394.0] | 364.1 [295.6, 392.8]\n",
- " 438.5 [375.5, 479.5] | 267.3 [204.8, 306.8] | 197.3 [178.3, 213.2]\n",
+ " 8.0 [0.0, 11.2] | 371.1 [332.0, 399.5] | 364.7 [312.6, 399.5]\n",
+ " 440.0 [381.9, 482.1] | 268.7 [210.3, 310.7] | 199.0 [180.2, 215.6]\n",
"--------------------------------\n",
"SURVEY RESULTS\n",
"--------------------------------\n",
"| Survey mean biomass density (kmt/nmi^2): 0.034 [0.031, 0.036]\n",
- "| Survey mean biomass (kmt): 1644.4 [1538.9, 1727.8]\n",
- "| Survey CV: 0.1373 [0.1321, 0.1468]\n",
+ "| Survey mean biomass (kmt): 1651.4 [1548.3, 1739.7]\n",
+ "| Survey CV: 0.1371 [0.1314, 0.1456]\n",
"--------------------------------\n"
]
}
],
"source": [
- "survey.stratified_analysis( 'kriging' )"
+ "survey.stratified_analysis(\"kriging\")"
]
},
{
@@ -2597,7 +2583,7 @@
},
{
"cell_type": "code",
- "execution_count": 32,
+ "execution_count": 56,
"metadata": {},
"outputs": [
{
@@ -2629,12 +2615,12 @@
}
],
"source": [
- "survey.summary( 'transect' )"
+ "survey.summary(\"transect\")"
]
},
{
"cell_type": "code",
- "execution_count": 42,
+ "execution_count": 57,
"metadata": {},
"outputs": [
{
@@ -2642,44 +2628,44 @@
"output_type": "stream",
"text": [
"--------------------------------\n",
- " STRATIFIED RESULTS (TRANSECT)\n",
+ " STRATIFIED RESULTS (KRIGING)\n",
"--------------------------------\n",
"| Stratified variable: Biomass (kmt)\n",
- "| Number of transects: 113\n",
+ "| Number of virtual transects: 113\n",
"| Number of strata (INPFC): 6\n",
"| Total area coverage: 53509.0 nmi^2\n",
"| Age-1 fish excluded: True\n",
"| Bootstrap replicates: 10000 samples\n",
"| Resampling proportion: 0.75\n",
- "| Bootstrap interval method: BCa (CI: 95.0%)\n",
+ "| Bootstrap interval method: t-jackknife (CI: 95.0%)\n",
"--------------------------------\n",
"STRATUM-SPECIFIC ESTIMATES\n",
"--------------------------------\n",
"| Stratum area coverage (n = 6):\n",
" 4246.0 | 10042.0 | 5774.0 | 7060.0 | 7068.0 | 19319.0 nmi^2\n",
"| Stratum mean biomass density (kmt/nmi^2):\n",
- " 0.002 [-0.0, 0.003] | 0.041 [0.03, 0.046] | 0.057 [0.037, 0.067]\n",
- " 0.063 [0.046, 0.076] | 0.038 [0.025, 0.045] | 0.01 [0.005, 0.013]\n",
+ " 0.002 [0.0, 0.003] | 0.041 [0.032, 0.047] | 0.057 [0.039, 0.068]\n",
+ " 0.063 [0.046, 0.076] | 0.038 [0.027, 0.046] | 0.01 [0.005, 0.014]\n",
"| Stratum mean biomass (kmt):\n",
- " 8.2 [-0.5, 11.0] | 417.3 [309.2, 462.2] | 327.3 [214.6, 386.6]\n",
- " 446.5 [326.2, 542.4] | 267.3 [178.8, 318.6] | 176.5 [75.1, 232.1]\n",
+ " 8.2 [1.7, 11.3] | 417.3 [329.1, 472.8] | 327.3 [222.5, 390.3]\n",
+ " 446.5 [327.1, 543.9] | 267.3 [193.0, 323.3] | 176.5 [84.3, 258.9]\n",
"--------------------------------\n",
"SURVEY RESULTS\n",
"--------------------------------\n",
- "| Survey mean biomass density (kmt/nmi^2): 0.035 [0.031, 0.038]\n",
- "| Survey mean biomass (kmt): 1643.2 [1417.4, 1825.0]\n",
- "| Survey CV: 0.1328 [0.1283, 0.1465]\n",
+ "| Survey mean biomass density (kmt/nmi^2): 0.035 [0.031, 0.039]\n",
+ "| Survey mean biomass (kmt): 1643.2 [1428.3, 1834.3]\n",
+ "| Survey CV: 0.1328 [0.127, 0.1436]\n",
"--------------------------------\n"
]
}
],
"source": [
- "survey.summary( 'stratified:transect' )"
+ "survey.summary(\"stratified:transect\")"
]
},
{
"cell_type": "code",
- "execution_count": 39,
+ "execution_count": 58,
"metadata": {},
"outputs": [
{
@@ -2692,39 +2678,39 @@
"| Stratified variable: Biomass (kmt)\n",
"| Number of virtual transects: 102\n",
"| Number of strata (INPFC): 6\n",
- "| Total area coverage: 35290.0 nmi^2\n",
+ "| Total area coverage: 35118.0 nmi^2\n",
"| Age-1 fish excluded: True\n",
"| Bootstrap replicates: 10000 samples\n",
"| Resampling proportion: 0.75\n",
- "| Bootstrap interval method: BCa (CI: 95.0%)\n",
+ "| Bootstrap interval method: t-jackknife (CI: 95.0%)\n",
"--------------------------------\n",
"STRATUM-SPECIFIC ESTIMATES\n",
"--------------------------------\n",
"| Stratum area coverage (n = 6):\n",
- " 2580.0 | 5614.0 | 3241.0 | 3313.0 | 3841.0 | 16701.0 nmi^2\n",
+ " 2580.0 | 5614.0 | 3241.0 | 3313.0 | 3841.0 | 16529.0 nmi^2\n",
"| Stratum mean biomass density (kmt/nmi^2):\n",
- " 0.002 [-0.001, 0.003] | 0.035 [0.027, 0.039] | 0.057 [0.036, 0.066]\n",
- " 0.065 [0.046, 0.077] | 0.036 [0.019, 0.046] | 0.008 [0.007, 0.009]\n",
+ " 0.002 [-0.001, 0.003] | 0.035 [0.028, 0.04] | 0.057 [0.041, 0.068]\n",
+ " 0.065 [0.048, 0.078] | 0.036 [0.021, 0.047] | 0.008 [0.007, 0.009]\n",
"| Stratum mean biomass (kmt):\n",
- " 7.9 [0.0, 10.6] | 369.4 [324.3, 394.0] | 364.1 [295.6, 392.8]\n",
- " 438.5 [375.5, 479.5] | 267.3 [204.8, 306.8] | 197.3 [178.3, 213.2]\n",
+ " 8.0 [0.0, 11.2] | 371.1 [332.0, 399.5] | 364.7 [312.6, 399.5]\n",
+ " 440.0 [381.9, 482.1] | 268.7 [210.3, 310.7] | 199.0 [180.2, 215.6]\n",
"--------------------------------\n",
"SURVEY RESULTS\n",
"--------------------------------\n",
"| Survey mean biomass density (kmt/nmi^2): 0.034 [0.031, 0.036]\n",
- "| Survey mean biomass (kmt): 1644.4 [1538.9, 1727.8]\n",
- "| Survey CV: 0.1373 [0.1321, 0.1468]\n",
+ "| Survey mean biomass (kmt): 1651.4 [1548.3, 1739.7]\n",
+ "| Survey CV: 0.1371 [0.1314, 0.1456]\n",
"--------------------------------\n"
]
}
],
"source": [
- "survey.summary( 'stratified:kriging' )"
+ "survey.summary(\"stratified:kriging\")"
]
},
{
"cell_type": "code",
- "execution_count": 40,
+ "execution_count": 60,
"metadata": {},
"outputs": [
{
@@ -2734,26 +2720,26 @@
"--------------------------------\n",
"KRIGING RESULTS (MESH)\n",
"--------------------------------\n",
- "| Kriged variable: Biomass density (kg/nmi^2)\n",
+ "| Kriged variable: Biomass (kg/nmi^2)\n",
"| Age-1 fish excluded: True\n",
"| Stratum definition: KS\n",
"| Mesh extrapolation: False\n",
- " Mesh cropping method: Interpolation\n",
+ " Mesh cropping method: Transect ends\n",
"| Mesh and transect coordinate standardization: True\n",
"--------------------------------\n",
"GENERAL RESULTS\n",
"--------------------------------\n",
- "| Mean biomassdensity: 27807.11 kg/nmi^2\n",
- "| Total survey biomass estimate: 1644.45 kmt\n",
- "| Mean mesh sample CV: 0.0241\n",
- "| Overall survey CV: 0.0269\n",
- "| Total area coverage: 58186.9 nmi^2\n",
+ "| Mean biomass: 27971.52 kg/nmi^2\n",
+ "| Total survey biomass estimate: 1651.44 kmt\n",
+ "| Mean mesh sample CV: 0.0253\n",
+ "| Overall survey CV: 0.0281\n",
+ "| Total area coverage: 58097.5 nmi^2\n",
"--------------------------------\n"
]
}
],
"source": [
- "survey.summary( 'kriging' )"
+ "survey.summary(\"kriging\")"
]
}
],
@@ -2773,7 +2759,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.18"
+ "version": "3.12.2"
}
},
"nbformat": 4,