neonwranglerpy.utilities package

Submodules

neonwranglerpy.utilities.byTileAOP module

neonwranglerpy.utilities.defaults module

Defaults.

neonwranglerpy.utilities.get_opts module

Argument Parser.

neonwranglerpy.utilities.get_tile_urls module

Get tile_urls, size, name.

neonwranglerpy.utilities.get_tile_urls.get_tile_urls(month_url, easting, northing)[source]

Get tile urls.

neonwranglerpy.utilities.getzipurls module

Return the total no. of files , their urls, files names, size.

neonwranglerpy.utilities.getzipurls.get_zip_urls(month_urls, package, dpID, release, token=None)[source]

Return the total no. of files , their urls, files names, size.

neonwranglerpy.utilities.loadByProduct module

neonwranglerpy.utilities.stackByTable module

Stack the table.

neonwranglerpy.utilities.stackByTable.stack_by_table(filepath='filesTostack', savepath='.', dpID=None, package=None, stack_df=True)[source]

Stack the table.

Parameters:
  • filepath (str, optional) – The full path of downloaded files.

  • savepath (str, optional) – The full path to the folder in which the files would be placed locally.

  • dpID (str) – The NEON Data Product ID to be downloaded, in the form DPL.PRNUM.REV e.g. DP1.10098.001.

  • package (str, optional) – Indicating which data package to download, either ‘basic’ or ‘expanded’.

  • save_files (bool, optional) – Whether to save the downloaded files after downloading them.

  • stack_df (str, optional) – Whether to return the stacked dataframes after stacking the files.

Returns:

A Python dictionary having stacked dataframes and path of saved files e.g. { 'vst_mappingandtagging' : pandas.DataFrame, 'stackedpath' : '/test/vst.csv' }

Return type:

dict

neonwranglerpy.utilities.stackdatafiles module

Stack the data files according to table_types.

neonwranglerpy.utilities.stackdatafiles.load_table_types(dpID: str)[source]

Return the dataframe about the table types of Data Products.

neonwranglerpy.utilities.stackdatafiles.stackdatafiles(folder_path, dst, dpID, stack_df=False)[source]

Stack the data files according to table_types.

neonwranglerpy.utilities.tools module

Tools functions.

neonwranglerpy.utilities.tools.copy_zip(src, dst)[source]

Copy a files to directory.

neonwranglerpy.utilities.tools.copy_zips(src, dst)[source]

Copy zip files to a temp dir.

neonwranglerpy.utilities.tools.create_temp(dst)[source]

Create temporary directory.

neonwranglerpy.utilities.tools.get_all_files(folder_path, dir_name=False)[source]

Return the list of files for a directory.

neonwranglerpy.utilities.tools.get_api(api_url, token=None)[source]

Return the api response.

neonwranglerpy.utilities.tools.get_month_year_urls(date, all_urls, date_type)[source]

Return the urls for files for specificed year-month.

neonwranglerpy.utilities.tools.get_year_month(date)[source]

Return the year-month of files.

neonwranglerpy.utilities.utils module

Utilities functions.

neonwranglerpy.utilities.utils.get_recent_publications(filelist)[source]

Return the most recent version of file from a list of files.

neonwranglerpy.utilities.utils.get_variables(varfile)[source]

Return the table, fieldName, colClass columns from variables files.

neonwranglerpy.utilities.zipsByProduct module

Module contents

Utility defining checkpoint.