add_station_lat_lon#, stn_var=None)[source]#

Lookup station information to add the station latitude and longitude to the DataFrame.

This function will add two columns to the DataFrame (‘latitude’ and ‘longitude’) after looking up all unique station identifiers available in the DataFrame.

  • df (pandas.DataFrame) – The DataFrame that contains the station observations

  • stn_var (str, optional) – The string of the variable name that represents the station in the DataFrame. If not provided, ‘station’, ‘stid’, and ‘station_id’ are tried in that order.


  • pandas.DataFrame that contains original Dataframe now with the latitude and longitude

  • values for each location found in station_info.