text stringlengths 81 112k |
|---|
Determine if this is a 1 or 2 column ensemble. Then determine how many columns and rows it has.
:param dict d: Metadata (table)
:return dict _rows_cols: Row and column counts
def get_ensemble_counts(d):
"""
Determine if this is a 1 or 2 column ensemble. Then determine how many columns and rows it has.... |
Get the Missing Value entry from a table of data. If none is found, try the columns.
If still none found, prompt user.
:param dict d: Table of data
:return str _mv: Missing Value
def get_missing_value_key(d):
"""
Get the Missing Value entry from a table of data. If none is found, try the columns.
... |
Get the variable name from a table or column
:param dict d: Metadata (column)
:return str var: Variable name
def get_variable_name_col(d):
"""
Get the variable name from a table or column
:param dict d: Metadata (column)
:return str var: Variable name
"""
var = ""
try:
var... |
Try to get a table name from a data table
:param str key: Key to try first
:param dict d: Data table
:param str fallback: (optional) If we don't find a table name, use this as a generic name fallback.
:return str var: Data table name
def get_table_key(key, d, fallback=""):
"""
Try to get a tab... |
Check if a table of data is an ensemble table. Is the first values index a list? ensemble. Int/float? not ensemble.
:param dict d: Table data
:return bool: Ensemble or not ensemble
def is_ensemble(d):
"""
Check if a table of data is an ensemble table. Is the first values index a list? ensemble. Int/fl... |
Check that the file extension matches the target extension given.
:param str file_path: Path to be checked
:param str file_type: Target extension
:return bool correct_ext: Extension match or does not match
def load_fn_matches_ext(file_path, file_type):
"""
Check that the file extension matches the... |
Compare two items. Match a string operator to an operator function
:param str inp: Comparison item
:param str relate: Comparison operator
:param any cut: Comparison item
:return bool truth: Comparison truth
def match_operators(inp, relate, cut):
"""
Compare two items. Match a string operator t... |
Check that all the array lengths match so that a DataFrame can be created successfully.
:param list l: Nested arrays
:return bool: Valid or invalid
def match_arr_lengths(l):
"""
Check that all the array lengths match so that a DataFrame can be created successfully.
:param list l: Nested arrays
... |
Move all files from one directory to another
:param str src: Source directory
:param str dst: Destination directory
:return none:
def mv_files(src, dst):
"""
Move all files from one directory to another
:param str src: Source directory
:param str dst: Destination directory
:return non... |
Remove foreign accents and characters to normalize the string. Prevents encoding errors.
:param str s: String
:return str s: String
def normalize_name(s):
"""
Remove foreign accents and characters to normalize the string. Prevents encoding errors.
:param str s: String
:return str s: String
... |
Determine if given path is file, directory, or other. Compare with target to see if it's the type we wanted.
:param str path: Path
:param str target: Target type wanted
:return bool: Path is what it claims to be (True) or mismatch (False)
def path_type(path, target):
"""
Determine if given path is... |
Print out lipd filename that is being read or written
:param str path: all file metadata
:return str: filename
def print_filename(path):
"""
Print out lipd filename that is being read or written
:param str path: all file metadata
:return str: filename
"""
if os.path.basename(path):
... |
Prompt user if they would like to save pickle file as a dictionary or an object.
:return str: Answer
def prompt_protocol():
"""
Prompt user if they would like to save pickle file as a dictionary or an object.
:return str: Answer
"""
stop = 3
ans = ""
while True and stop > 0:
a... |
(Recursive) Add in TSids into any columns that do not have them.
Look for "columns" keys, and then start looping and adding generated TSids to each column
:param any x: Unknown
:return any x: Unknown
def put_tsids(x):
"""
(Recursive) Add in TSids into any columns that do not have them.
Look fo... |
(Recursive) Go through N number of nested data types and remove all empty entries.
:param any x: Unknown
:return any x: Unknown
def rm_empty_fields(x):
"""
(Recursive) Go through N number of nested data types and remove all empty entries.
:param any x: Unknown
:return any x: Unknown
"""
... |
If an "identifier" dictionary has no doi ID, then it has no use. Delete it.
:param dict d: Metadata
:return dict d: Metadata
def rm_empty_doi(d):
"""
If an "identifier" dictionary has no doi ID, then it has no use. Delete it.
:param dict d: Metadata
:return dict d: Metadata
"""
logger... |
Remove all files in the given directory with the given extension
:param str path: Directory
:param str extension: File type to remove
:return none:
def rm_files(path, extension):
"""
Remove all files in the given directory with the given extension
:param str path: Directory
:param str ext... |
(Recursive) Remove all "values" fields from the metadata
:param any x: Any data type
:return dict x: Metadata (values removed)
def rm_values_fields(x):
"""
(Recursive) Remove all "values" fields from the metadata
:param any x: Any data type
:return dict x: Metadata (values removed)
"""
... |
Loop for each table column and remove the missingValue key & data
:param dict d: Metadata (table)
:return dict d: Metadata (table)
def rm_missing_values_table(d):
"""
Loop for each table column and remove the missingValue key & data
:param dict d: Metadata (table)
:return dict d: Metadata (ta... |
Given a dictionary and a key list, remove any data in the dictionary with the given keys.
:param dict d: Metadata
:param list keys: Keys to be removed
:return dict d: Metadata
def rm_keys_from_dict(d, keys):
"""
Given a dictionary and a key list, remove any data in the dictionary with the given ke... |
Receive all table column values as a list of lists. Loop for each column of values
:param list values: Metadata (columns)
:param any mv: Missing value currently in use
:return list: Metadata (columns)
def _replace_missing_values_table(values, mv):
"""
Receive all table column values as a list of l... |
Replace missing values in the values list where applicable
:param list values: Metadata (column values)
:return list values: Metadata (column values)
def _replace_missing_values_column(values, mv):
"""
Replace missing values in the values list where applicable
:param list values: Metadata (column... |
Given a full path to a file, split and return a path and filename
:param str s: Path
:return str _path: Directory Path
:return str _filename: Filename
def split_path_and_file(s):
"""
Given a full path to a file, split and return a path and filename
:param str s: Path
:return str _path: Di... |
Unwrap nested lists to be one "flat" list of lists. Mainly for prepping ensemble data for DataFrame() creation
:param list l: Nested lists
:return list l2: Flattened lists
def unwrap_arrays(l):
"""
Unwrap nested lists to be one "flat" list of lists. Mainly for prepping ensemble data for DataFrame() cr... |
LiPD Version 1.3
Main function to initiate LiPD to TSOs conversion.
Each object has a
"paleoNumber" or "chronNumber"
"tableNumber"
"modelNumber"
"time_id"
"mode" - chronData or paleoData
"tableType" - "meas" "ens" "summ"
:param dict d: Metadata for one LiPD file
:param str whi... |
Creates flat funding dictionary.
:param list l: Funding entries
def _extract_fund(l, _root):
"""
Creates flat funding dictionary.
:param list l: Funding entries
"""
logger_ts.info("enter _extract_funding")
for idx, i in enumerate(l):
for k, v in i.items():
_root['funding... |
Extract geo data from input
:param dict d: Geo
:return dict _root: Root data
def _extract_geo(d, _root):
"""
Extract geo data from input
:param dict d: Geo
:return dict _root: Root data
"""
logger_ts.info("enter ts_extract_geo")
# May not need these if the key names are corrected in... |
Extract publication data from one or more publication entries.
:param list l: Publication
:return dict _root: Root data
def _extract_pub(l, _root):
"""
Extract publication data from one or more publication entries.
:param list l: Publication
:return dict _root: Root data
"""
logger_ts.i... |
Create a concatenated string of author names. Separate names with semi-colons.
:param any pub: Publication author structure is ambiguous
:param int idx: Index number of Pub
def _extract_authors(pub, idx, _root):
"""
Create a concatenated string of author names. Separate names with semi-colons.
:par... |
Extract all data from a PaleoData dictionary.
:param dict d: PaleoData dictionary
:param dict root: Time series root data
:param str pc: paleoData or chronData
:param str whichtables: all, meas, summ, or ens
:return list _ts: Time series
def _extract_pc(d, root, pc, whichtables):
"""
Extrac... |
Make a timeseries-formatted version of model method data
:param dict method: Method data
:return dict _method: Method data, formatted
def _extract_method(method):
"""
Make a timeseries-formatted version of model method data
:param dict method: Method data
:return dict _method: Method data, fo... |
Extract year, age, and depth column from table data
:param dict table_data: Data at the table level
:param dict current: Current data
:return dict current:
def _extract_special(current, table_data):
"""
Extract year, age, and depth column from table data
:param dict table_data: Data at the tabl... |
Extract data from the root level of a paleoData table.
:param dict d: paleoData table
:param dict current: Current root data
:param str pc: paleoData or chronData
:return dict current: Current root data
def _extract_table_root(d, current, pc):
"""
Extract data from the root level of a paleoData... |
Add in modelNumber and summaryNumber fields if this is a summary table
:param dict table_data: Table data
:param dict current: LiPD root data
:param str tt: Table type "summ", "ens", "meas"
:return dict current: Current root data
def _extract_table_model(table_data, current, tt):
"""
Add in mo... |
Use the given table data to create a time series entry for each column in the table.
:param dict table_data: Table data
:param dict current: LiPD root data
:param str pc: paleoData or chronData
:param list ts: Time series (so far)
:param bool summary: Summary Table or not
:return list ts: Time ... |
Extract data from one paleoData column
:param dict d: Column dictionary
:param dict tmp_tso: TSO dictionary with only root items
:return dict: Finished TSO
def _extract_columns(d, tmp_tso, pc):
"""
Extract data from one paleoData column
:param dict d: Column dictionary
:param dict tmp_tso: ... |
LiPD Version 1.3
Main function to initiate time series to LiPD conversion
Each object has a:
"paleoNumber" or "chronNumber"
"tableNumber"
"modelNumber"
"time_id"
"mode" - chronData or paleoData
"tableType" - "meas" "ens" "summ"
:param list l: Time series
:return dict _master: L... |
Get the table name and variable name from the given time series entry
:param dict current: Time series entry
:param str pc: paleoData or chronData
:return str _table_name:
:return str _variable_name:
def _get_current_names(current, dsn, pc):
"""
Get the table name and variable name from the gi... |
Collapse the root items of the current time series entry
:param dict master: LiPD data (so far)
:param dict current: Current time series entry
:param str dsn: Dataset name
:param str pc: paleoData or chronData (mode)
:return dict master:
:return dict current:
def _collapse_root(master, current... |
Split author string back into organized dictionary
:param str s: Formatted names string "Last, F.; Last, F.; etc.."
:return list of dict: One dictionary per author name
def _collapse_author(s):
"""
Split author string back into organized dictionary
:param str s: Formatted names string "Last, F.; La... |
Collapse the paleo or chron for the current time series entry
:param dict master: LiPD data (so far)
:param dict current: Current time series entry
:param str dsn: Dataset name
:param str pc: paleoData or chronData
:return dict master:
def _collapse_pc(master, current, dsn, pc):
"""
Collap... |
Create a table with items in root given the current time series entry
:param dict current: Current time series entry
:param str dsn: Dataset name
:param str pc: paleoData or chronData
:return dict _tmp_table: Table data
def _collapse_table_root(current, dsn, pc):
"""
Create a table with items i... |
Collapse the column data and
:param current:
:param pc:
:return:
def _collapse_column(current, pc):
"""
Collapse the column data and
:param current:
:param pc:
:return:
"""
_tmp_column = {}
try:
for k, v in current.items():
try:
# We do no... |
Get string for the mode
:param str ec: extract or collapse
:param str mode: "paleo" or "chron" mode
:param list ts: Time series (for collapse)
:return str phrase: Phrase
def mode_ts(ec, mode="", ts=None):
"""
Get string for the mode
:param str ec: extract or collapse
:param str mode: "p... |
Check if the expression is valid, then check turn it into an expression that can be used for filtering.
:return list of lists: One or more matches. Each list has 3 strings.
def translate_expression(expression):
"""
Check if the expression is valid, then check turn it into an expression that can be used for... |
Get a list of TimeSeries objects that match the given expression.
:param list expr_lst: Expression
:param list ts: TimeSeries
:return list new_ts: Matched time series objects
:return list idxs: Indices of matched objects
def get_matches(expr_lst, ts):
"""
Get a list of TimeSeries objects that m... |
Convert a string of whitespace or comma separated hosts into a list of hosts.
Hosts may also already be a list or other iterable.
Each host will be prefixed with 'http://' if it is not already there.
>>> _to_http_hosts('n1:4200,n2:4200')
['http://n1:4200', 'http://n2:4200']
>>> _to_http_hosts('n1... |
Returns the value of the called object of obj is a callable,
otherwise the plain object.
Returns None if obj is None.
>>> obj = None
>>> _plain_or_callable(obj)
>>> stmt = 'select * from sys.nodes'
>>> _plain_or_callable(stmt)
'select * from sys.nodes'
>>> def _args():
... ret... |
Convert a host URI into a dsn for aiopg.
>>> _to_dsn('aiopg://myhostname:4242/mydb')
'postgres://crate@myhostname:4242/mydb'
>>> _to_dsn('aiopg://myhostname:4242')
'postgres://crate@myhostname:4242/doc'
>>> _to_dsn('aiopg://hoschi:pw@myhostname:4242/doc?sslmode=require')
'postgres://hoschi:pw... |
Check if SSL validation parameter is passed in URI
>>> _verify_ssl_from_first(['https://myhost:4200/?verify_ssl=false'])
False
>>> _verify_ssl_from_first(['https://myhost:4200/'])
True
>>> _verify_ssl_from_first([
... 'https://h1:4200/?verify_ssl=False',
... 'https://h2:4200/?ve... |
Add any table type to the given dataset. Use prompts to determine index locations and table type.
:param dict D: Metadata (dataset)
:param dict dat: Metadata (table)
:return dict D: Metadata (dataset)
def addTable(D):
"""
Add any table type to the given dataset. Use prompts to determine index loca... |
Called from: _prompt_placement()
Get a list of possible places that we can put the new model data into.
If no model exists yet, we'll use something like chron0model0. If other models exist,
we'll go for the n+1 entry.
ex: chron0model0 already exists, so we'll look to chron0model1 next.
:param dict... |
Since automatic placement didn't work, find somewhere to place the model data manually with the help of the user.
:param dict D: Metadata
:param str tt: Table type
:return str _model_name: Chosen model name for placement
def _prompt_placement(D, tt):
"""
Since automatic placement didn't work, find... |
Use the dataset and name to place the new table data into the dataset.
:param dict D: Dataset
:param str name: Table name / path to store new table
:param dict table: Newly created table data
:return dict D: Dataset
def _put_table(D, name, table):
"""
Use the dataset and name to place the new ... |
Model placement is subject to change. That means all names within the model (names are path-dependent) are also
subject to change. Whichever name is decided, the inner data needs to match it.
:param dict dat: Metadata
:param str name: Table name
:return dict dat: Metadata
def _update_table_names(name,... |
Insert model data into a LiPD dataset
Examples of model naming:
chron0model0
chron0model1
chron1model0
Example of 'models' variable:
{
chron0model0: {
"method": {...},
"summaryTable": [...],
"ensembleTable": [...],
... |
Place the model data given, into the location (m) given.
:param dict D: Metadata (dataset)
:param str name: Model name (ex: chron0model0)
:param dict dat: Model data
:param regex m: Model name regex groups
:return dict D: Metadata (dataset)
def _put_model(D, name, dat, m):
"""
Place the mo... |
Prepares the sphinx environment to store sphinx-needs internal data.
def prepare_env(app, env, docname):
"""
Prepares the sphinx environment to store sphinx-needs internal data.
"""
if not hasattr(env, 'needs_all_needs'):
# Used to store all needed information about all needs in document
... |
Creates a valid PlantUML entity name from the given value.
def make_entity_name(name):
"""Creates a valid PlantUML entity name from the given value."""
invalid_chars = "-=!#$%^&*[](){}/~'`<>:;"
for char in invalid_chars:
name = name.replace(char, "_")
return name |
Load in the template file, and run through the parser
:return none:
def main(self):
"""
Load in the template file, and run through the parser
:return none:
"""
logger_lpd_noaa.info("enter main")
# Starting Directory: dir_tmp/dir_bag/data/
# convert all l... |
Rules
1. AD or CE units: bigger number is recent, smaller number is older
2. BP: bigger number is older, smaller number is recent.
3. No units: If max year is 1900-2017(current), then assume AD. Else, assume BP
:return none:
def __check_time_values(self):
"""
Rules
... |
Convert lpd to noaa keys for this one section
:param str header: Section header
:param dict d: Metadata
:return dict: Metadata w/ converted keys
def __convert_keys_2(header, d):
"""
Convert lpd to noaa keys for this one section
:param str header: Section header
... |
Loop over keys in a dictionary and replace the lipd keys with noaa keys
:return:
def __convert_keys_1(self, header, d):
"""
Loop over keys in a dictionary and replace the lipd keys with noaa keys
:return:
"""
d2 = {}
try:
for k, v in d.items():
... |
All keys need to be written to the output, with or without a value. Furthermore, only keys that have values
exist at this point. We need to manually insert the other keys with a blank value. Loop through the global list
to see what's missing in our dict.
:param str section_name: Retrieve data fr... |
Flatten column so climateInterpretation and calibration are not nested.
:param d:
:return:
def __flatten_col(d):
"""
Flatten column so climateInterpretation and calibration are not nested.
:param d:
:return:
"""
try:
for entry in ["climateInt... |
When a study name is not given, generate one with the format of " author - site name - year "
:return str study_name: generated study name
def __generate_study_name(self):
"""
When a study name is not given, generate one with the format of " author - site name - year "
:return str study... |
There are some data lists that we collected across the dataset that need to be concatenated into a single
string before writing to the text file.
:return none:
def __lists_to_str(self):
"""
There are some data lists that we collected across the dataset that need to be concatenated into ... |
Parse the Dataset_DOI field. Could be one DOI string, or a list of DOIs
:param any x: Str or List of DOI ids
:return none: list is set to self
def __parse_dois(self, x):
"""
Parse the Dataset_DOI field. Could be one DOI string, or a list of DOIs
:param any x: Str or List of DOI ... |
Used in the path_context function. Split the full path into a list of steps
:param str string: Path string ("geo-elevation-height")
:return list out: Path as a list of strings. One entry per path step.(["geo", "elevation", "height"])
def __split_path(string):
"""
Used in the path_contex... |
Check that values exist in this table, and we can write out data columns
:param dict table: Table data
:return bool: Values exist or not exist
def _values_exist(table):
"""
Check that values exist in this table, and we can write out data columns
:param dict table: Table data
... |
Reorganize the keys into their proper section order for the NOAA output file
DO NOT parse data tables (paleoData or chronData). We will do those separately.
:param str key:
:param any value:
:return none:
def __reorganize(self):
"""
Reorganize the keys into their proper ... |
LiPD delimits author names by "and". Noaa wants them to be semi-colon delimited.
:return none:
def __reorganize_author(self):
"""
LiPD delimits author names by "and". Noaa wants them to be semi-colon delimited.
:return none:
"""
try:
for idx, pub in enumerate... |
GEOJSON FORMAT : [ LONGITUDE, LATITUDE, ELEVATION]
Reorganize coordinates based on how many values are available.
:return:
def __reorganize_coordinates(self):
"""
GEOJSON FORMAT : [ LONGITUDE, LATITUDE, ELEVATION]
Reorganize coordinates based on how many values are available.
... |
Funding gets added to noaa_data_sorted with LiPD keys. Change those keys to NOAA
:return none:
def __reorganize_funding(self):
"""
Funding gets added to noaa_data_sorted with LiPD keys. Change those keys to NOAA
:return none:
"""
_map = {"agency": "Funding_Agency_Name", ... |
Concat geo value and units, and reorganize the rest
References geo data from self.noaa_data_sorted
Places new data into self.noaa_geo temporarily, and then back into self.noaa_data_sorted.
:return:
def __reorganize_geo(self):
"""
Concat geo value and units, and reorganize the re... |
We have raw sensorGenus, and sensorSpecies in self, now clean and sort
:return none:
def __reorganize_sensor(self):
"""
We have raw sensorGenus, and sensorSpecies in self, now clean and sort
:return none:
"""
_code = []
_name = []
# Check if any of the s... |
Put the variableNames with the corresponding column data.
:param list names: variableNames
:param list cols: List of Lists of column data
:return dict:
def __put_names_on_csv_cols(names, cols):
"""
Put the variableNames with the corresponding column data.
:param list nam... |
Always write year column first. Reorder dictionary so that year is first
:param dict d: data
:return dict: Reordered data
def __put_year_col_first(d):
"""
Always write year column first. Reorder dictionary so that year is first
:param dict d: data
:return dict: Reordered... |
Remove exact duplicate entries for abstract or citation fields. Check all publication entries.
:return:
def __rm_duplicate_citation_2(self, key):
"""
Remove exact duplicate entries for abstract or citation fields. Check all publication entries.
:return:
"""
citations = [... |
Remove the variableNames from the columns.
:param dict d: Named csv data
:return list list: One list for names, one list for column data
def __rm_names_on_csv_cols(d):
"""
Remove the variableNames from the columns.
:param dict d: Named csv data
:return list list: One lis... |
Take a string of author(s), get the first author name, then get the first authors last name only.
:param str author: Author(s)
:return str _author: First author's last name
def __get_author_last_name(author):
"""
Take a string of author(s), get the first author name, then get the first... |
When investigators is empty, try to get authors from the first publication instead.
:return str author: Author names
def __create_author_investigator_str(self):
"""
When investigators is empty, try to get authors from the first publication instead.
:return str author: Author names
... |
Get filename from a data table
:param dict table:
:return str:
def __get_filename(table):
"""
Get filename from a data table
:param dict table:
:return str:
"""
try:
filename = table['filename']
except KeyError as e:
filena... |
Get DOI from this ONE publication entry.
:param dict pub: Single publication entry
:return:
def __get_doi(pub):
"""
Get DOI from this ONE publication entry.
:param dict pub: Single publication entry
:return:
"""
doi = ""
# Doi location: d["pub"][i... |
Use the section header and key to get the proper noaa key.
:param str header:
:param str lipd_key:
:return:
def __get_noaa_key_w_context(header, lipd_key):
"""
Use the section header and key to get the proper noaa key.
:param str header:
:param str lipd_key:
... |
(recursive) Collect all "sensorGenus" and "sensorSpecies" fields, set data to self
:param any x: Any data type
:return none:
def __get_overall_data(self, x):
"""
(recursive) Collect all "sensorGenus" and "sensorSpecies" fields, set data to self
:param any x: Any data type
... |
Search for either Age or Year to calculate the max, min, and time unit for this table/file.
Preference: Look for Age first, and then Year second (if needed)
:param dict table: Table data
:return dict: Max, min, and time unit
def __get_max_min_time_1(self, table):
"""
Search for... |
Search for either Age or Year to calculate the max, min, and time unit for this table/file.
Preference: Look for Age first, and then Year second (if needed)
:param dict table: Table data
:param list terms: age, yearbp, yrbp, or year, yr
:param bool exact: Look for exact key match, or no... |
If originalDataURL / investigators not in root data, check for a dataCitation pub entry.
:return:
def __get_data_citation(self, l):
"""
If originalDataURL / investigators not in root data, check for a dataCitation pub entry.
:return:
"""
# loop once for each publication ... |
Set up the output filenames. If more than one file is being written out, we need appended filenames.
:return:
def __get_output_filenames(self):
"""
Set up the output filenames. If more than one file is being written out, we need appended filenames.
:return:
"""
# if ther... |
Use the tables in self.paleos and self.chrons (sorted by idx) to put in self.noaa_data_sorted.
:return:
def __get_table_pairs(self):
"""
Use the tables in self.paleos and self.chrons (sorted by idx) to put in self.noaa_data_sorted.
:return:
"""
try:
for _idx,... |
Check how many tables are in the json
:return int:
def __get_table_count(self):
"""
Check how many tables are in the json
:return int:
"""
_count = 0
try:
keys = ["paleo", "paleoData", "paleoMeasurementTable"]
# get the count for how many ... |
Metadata is sorted-by-name. Use this to put the table data into the object self.
:param list keys: Paleo or Chron keys
:return none:
def __put_tables_in_self(self, keys):
"""
Metadata is sorted-by-name. Use this to put the table data into the object self.
:param list keys: Paleo... |
Open text file. Write one section at a time. Close text file. Move completed file to dir_root/noaa/
:return none:
def __create_file(self):
"""
Open text file. Write one section at a time. Close text file. Move completed file to dir_root/noaa/
:return none:
"""
logger_lpd... |
Write the top section of the txt file.
:param int section_num: Section number
:return none:
def __write_top(self, filename_txt):
"""
Write the top section of the txt file.
:param int section_num: Section number
:return none:
"""
logger_lpd_noaa.info("writ... |
Write a generic section to the .txt. This function is reused for multiple sections.
:param str header: Header title for this section
:param int section_num:
:param dict d: Section from steps_dict
:return none:
def __write_generic(self, header, d=None):
"""
Write a generi... |
Write pub section. There may be multiple, so write a generic section for each one.
:return none:
def __write_pub(self):
"""
Write pub section. There may be multiple, so write a generic section for each one.
:return none:
"""
try:
self.__reorganize_author()
... |
Write funding section. There are likely multiple entries.
:param dict d:
:return none:
def __write_funding(self):
"""
Write funding section. There are likely multiple entries.
:param dict d:
:return none:
"""
self.__reorganize_funding()
# if fundi... |
Write out the measurement tables found in paleoData and chronData
:return:
def __write_data(self, idx):
"""
Write out the measurement tables found in paleoData and chronData
:return:
"""
pair = self.noaa_data_sorted["Data"][idx]
# Run once for each pair (paleo+ch... |
Retrieve variables from data table(s) and write to Variables section of txt file.
:param dict table: Paleodata
:return none:
def __write_variables_1(self, table):
"""
Retrieve variables from data table(s) and write to Variables section of txt file.
:param dict table: Paleodata
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.