pytups.utils package
Subpackages
- pytups.utils.Parser package
- Submodules
- pytups.utils.Parser.StandardParser module
DataFetcherStandardParserStandardParser.urlStandardParser.linesStandardParser.meta_startStandardParser.meta_endStandardParser.variablesStandardParser.skip_linesStandardParser.dataStandardParser.dfStandardParser.parse()StandardParser._fetch_file()StandardParser._identify_metadata()StandardParser._extract_variables()StandardParser._parse_data()StandardParser._construct_dataframe()StandardParser.parse()
- Module contents
Submodules
pytups.utils.PaleoData module
- class pytups.utils.PaleoData.PaleoData(paleo_data, study_id, site_id)[source]
Bases:
objectRepresents paleo data associated with a site.
- datatable_id
The NOAA data table identifier.
- Type:
str
- dataTableName
The name of the data table.
- Type:
str
- timeUnit
The unit of time for the data.
- Type:
str
- file_url
The URL from which the data file can be fetched.
- Type:
str
- variables
A list of variable names or identifiers.
- Type:
list
- study_id
The NOAA study ID this data belongs to.
- Type:
str
- site_id
The site identifier this data belongs to.
- Type:
str
pytups.utils.Publication module
- class pytups.utils.Publication.Publication(pub_data)[source]
Bases:
objectRepresents a publication within a study.
- author
The name of the author(s) of the publication.
- Type:
str
- title
The title of the publication.
- Type:
str
- journal
The journal where the publication appeared.
- Type:
str
- year
The publication year.
- Type:
str
- volume
The volume number (if applicable).
- Type:
str or None
- number
The issue number (if applicable).
- Type:
str or None
- pages
The page numbers (if applicable).
- Type:
str or None
- pub_type
The type of publication.
- Type:
str or None
- doi
The Digital Object Identifier.
- Type:
str or None
- url
URL for the publication.
- Type:
str or None
- study_id
The NOAA study ID to which this publication belongs.
- Type:
str or None
pytups.utils.Site module
- class pytups.utils.Site.Site(site_data, study_id)[source]
Bases:
objectRepresents a site within a study.
- site_id
The unique identifier for the site.
- Type:
str
- site_name
The name of the site.
- Type:
str
- location_name
A descriptive location name.
- Type:
str
- lat
The latitude coordinate.
- Type:
float or str
- lon
The longitude coordinate.
- Type:
float or str
- min_elevation
The minimum elevation in meters.
- Type:
float or None
- max_elevation
The maximum elevation in meters.
- Type:
float or None
pytups.utils.helpers module
- pytups.utils.helpers.assert_list(input_item)[source]
Ensure the input is a list.
If the input is not a list, it converts it into a single-element list.
- Parameters:
input_item (any) – The item to be converted to a list if it is not already one.
- Returns:
A list containing the input item(s). If input_item is None, returns an empty list.
- Return type:
list
- pytups.utils.helpers.params_validators(key, value)[source]
Validate and process a parameter for the NOAA studies.
This function performs validations on parameter values such as latitude, longitude, keywords, and year ranges.
- Parameters:
key (str) – The name of the parameter.
value (any) – The value of the parameter.
- Returns:
This function is currently a stub for validation logic.
- Return type:
None
Notes
Implement appropriate validations based on project requirements.