snowex_db.point_data module#

class snowex_db.point_data.PointDataCollection(series: List[SnowExPointData], metadata: ProfileMetaData)[source]#

Bases: object

This could be a collection of profiles

DATA_CLASS#

alias of SnowExPointData

classmethod from_csv(fname, timezone='US/Mountain', header_sep=',', site_id=None, campaign_name=None, allow_map_failure=False, units_map=None, row_based_timezone=False, metadata_variable_file=None, primary_variable_file=None, single_date=False)[source]#

Find all variables in a single csv file Args:

fname: path to file timezone: expected timezone in file header_sep: header sep in the file site_id: Site id override for the metadata campaign_name: Campaign.name override for the metadata allow_map_failure: allow metadata and column unknowns units_map: units map for the metadata row_based_timezone: is the timezone row based metadata_variable_file: list of files to override the metadata

variables

primary_variable_file: list of files to override the

primary variables

single_date: This dataset collection is from a single date

Returns:

This class with a collection of profiles and metadata

property metadata: ProfileMetaData#
property series: List[SnowExPointData]#
class snowex_db.point_data.SnowExPointData(variable: MeasurementDescription = None, meta_parser: MetaDataParser = None, row_based_timezone=False, timezone=None, single_date=False, skip_format_df=False)[source]#

Bases: MeasurementData

META_PARSER#

alias of PointSnowExMetadataParser

OUT_TIMEZONE = 'UTC'#
static read_csv_dataframe(profile_filename, columns, header_position)[source]#

Read in a profile file. Managing the number of lines to skip and adjusting column names

Args:
profile_filename: Filename containing a manually measured

profile

columns: list of columns to use in dataframe header_position: skiprows for pd.read_csv

Returns:

df: pd.dataframe contain csv data with desired column names

property timezonefinder#