ManualFlowgaugeProcessor¶
1. What is a Nivu(s) Flowstick?¶
Link to manufacturers webpage: (https://www.nivus.com/en-uk/products-solutions/measurement-systems/flow-measurement-for-liquids/flow-meters-part-filled/flow-meter/nivuflow-stick)
2. Extracting Survey Data¶
It is expected that when exporting flow gauging surveys off of the Nivus, each survey is exported as a folder contaning the following files:
- 1x .xmz file (redundant for this package)
- 1x .csv file
- 1x .html file (redundant for this package)
- 1x .pdf file (redundant for this package)
This is also the format that is expected from extract_nivusflowstick_surveys.
Multiple unique survey files
If multiple of the same file type are found in a folder, the first one will be used and a warning that multiple files have been found will be displayed
The following extract function creates a list of NivusFlowStick class objects with high-level metadata and specific sub-files as attributes.
from flowgaugeprocessor.extract import extract_nivusflowstick_surveys
path = "path_to_your_NivusFlowStick_survey_folders"
surveys = extract_nivusflowstick_surveys(path)
3. Exporting Survey Data¶
If you simply want to export all of your survey data out into more standard file-formats, exporting single or grouped surveys will create either csv or parquet files contaning the data contained within the raw survey files.
Options for dataframe at the survey level:
"metadata": One row per survey. All survey metadata, location, datetime, equipment information; flow and depth"sections": One row per survey. All section (between two points) data; width, flow and positional information"points": One row per vertical. All point data, temperature depth and flow information
3.1 Single Survey Export¶
Function to be added, creates all files mentioned above, 1x per survey.
3.2 Group Survey Export¶
For bulk exporting all extracted surveys in a single file, can be split back into individual surveys using the "site_id" and "site_name" columns.
from flowgaugeprocessor.extract import extract_nivusflowstick_surveys
from flowgaugeprocessor.utils import export_group_survey_data
input_path = "path_to_your_NivusFlowStick_survey_folders"
output_path = "path_to_your_output_directory"
surveys = extract_nivusflowstick_surveys(path)
export_group_survey_data(
surveys=surveys,
survey_type="NivusFlowStick",
dataframe="metadata",
export_path=out_path,
file_out_name="Nivus Metadata",
add_metadata=False,
file_type="csv")
export_group_survey_data(
surveys=surveys,
survey_type="NivusFlowStick",
dataframe="sections",
export_path=out_path,
file_out_name="Nivus Section Data",
add_metadata=False,
file_type="csv")
export_group_survey_data(
surveys=surveys,
survey_type="NivusFlowStick",
dataframe="points",
export_path=out_path,
file_out_name="Nivus Point Data",
add_metadata=False,
file_type="csv")
3.3 Site Timeseries Export¶
Note: Function is a WIP as final format is being developed
To add: Option for file type, currently only parquet
For exporting a minimal timeseries file for each site surveted, contains:
"Discharge"- recorded in m³/s,"Mean-depth"- recorded in m,"Temperature"- recorded in °C,"Survey Type"- classified as"Flowstick"for the Nivus Flowstick
from flowgaugeprocessor.extract import extract_nivusflowstick_surveys
from flowgaugeprocessor.fdri_timeseries_export import survey_to_fdri_timeseries
input_path = "path_to_your_nivusflowstick_survey_folders"
output_path = "path_to_your_output_directory
surveys = extract_sontekflowtracker_surveys(path)
surveys_to_fdri_timeseries(surveys, output_path)
Combine Your Equipment
This function works with multiple survey types, try joining all your survey lists together and applying the function