Closest Station

flood_forecast.preprocessing.closest_station.get_closest_gage(gage_df: pandas.core.frame.DataFrame, station_df: pandas.core.frame.DataFrame, path_dir: str, start_row: int, end_row: int)[source]
flood_forecast.preprocessing.closest_station.haversine(lon1, lat1, lon2, lat2)[source]

Calculate the great circle distance between two points on the earth (specified in decimal degrees)

flood_forecast.preprocessing.closest_station.get_weather_data(file_path: str, econet_gages: Set, base_url: str)[source]

Function that retrieves if station has weather data for a specific gage either from ASOS or ECONet

flood_forecast.preprocessing.closest_station.format_dt(date_time_str: str)datetime.datetime[source]
flood_forecast.preprocessing.closest_station.convert_temp(temparature: str)float[source]

Note here temp could be a number or ‘M’ which stands for missing. We use 50 at the moment to fill missing values.

flood_forecast.preprocessing.closest_station.process_asos_data(file_path: str, base_url: str)Dict[source]

Function that saves the ASOS data to CSV uses output of get weather data.

flood_forecast.preprocessing.closest_station.process_asos_csv(path: str)[source]