task_geo.data_sources.noaa.ftp_connector module

Extract and prepare meteorological data from https://www.ncdc.noaa.gov/ the National Centers for Environmental Information

Credits for the data:

Menne, M.J., I. Durre, B. Korzeniewski, S. McNeal, K. Thomas, X. Yin, S. Anthony, R. Ray, R.S. Vose, B.E.Gleason, and T.G. Houston, 2012: Global Historical Climatology Network - Daily (GHCN-Daily), Version 3. [indicate subset used following decimal, e.g. Version 3.12]. NOAA National Climatic Data Center. http://doi.org/10.7289/V5D21VHZ [2020].

Functions

download_noaa_files([large_files, …])

Download files from the NOAA FTP server.

load_and_filter_dataset(dataset_name)

load_stations_data(station_ids)

noaa_ftp_connector(countries[, download])

Retrieves data from the NOAA FTP server.

process_noaa_files(countries)

Returns a dataset for the given countries.

to_date(row)

task_geo.data_sources.noaa.ftp_connector.download_noaa_files(large_files=True, skip_downloaded=False)[source]

Download files from the NOAA FTP server.

Parameters
  • large_files (bool) – Wheter or not to download the 3Gb daily reports, only download reference data.

  • skip_downloaded (bool) – Check if the file exists on local and has the same size that in the server, if True, will be skiped, if False will download it.

Returns

None. The files will be downloaded on DOWNLOADED_DIRECTORY.

task_geo.data_sources.noaa.ftp_connector.load_and_filter_dataset(dataset_name)[source]
task_geo.data_sources.noaa.ftp_connector.load_stations_data(station_ids)[source]
task_geo.data_sources.noaa.ftp_connector.noaa_ftp_connector(countries, download=True)[source]

Retrieves data from the NOAA FTP server.

Parameters
  • countries (list[str]) – List of countries in ISO-2 format.

  • download (bool) – Wheter or not to download the data, and just process previously downloaded data.

task_geo.data_sources.noaa.ftp_connector.process_noaa_files(countries)[source]

Returns a dataset for the given countries.

Parameters

countries (list[str]) – List of countries in ISO-2 format.

Returns

pandas.DataFrame

task_geo.data_sources.noaa.ftp_connector.to_date(row)[source]