obswx package

obswx module

class obswx.obswx.obswx(source='ISD')

Methods

get_data(**kwargs)

Get data

get_location(lat, lon, **kwargs)

Get location of the station

get_meta(**kwargs)

Get metadata

get_data(**kwargs)

Get data

Parameters:
  • year – int, year of the data

  • station – str, station ID

  • print_info – bool, print information or not

  • isd_source – str, source of the ISD data

Returns:

pandas dataframe

get_location(lat: int | float | list | tuple, lon: int | float | list | tuple, **kwargs)

Get location of the station

Parameters:
  • lat – int or float, latitude; list or tuple, latitude range

  • lon – int or float, longitude; list or tuple, longitude range

  • radius – int or float, distance in km

  • source – str, source of the data

  • ellipsoid – str, ellipsoid. Default is “WGS-84”, Check geopy.distance.geodesic for more options. ref: https://geopy.readthedocs.io/en/stable/#module-geopy.distance

  • year – int, list, tuple, year of the data or range of the year

Returns:

pandas dataframe

get_meta(**kwargs)

Get metadata

Parameters:
  • source – str, source of the data

  • load – bool, load data or not

Returns:

pandas dataframe

other modules

obswx.utils.read_hadisd(**kwargs)

Read HadISD data from a file.

Parameters:
  • path (str) – Path to the file.

  • output (str) – Path to the output file.