metpy.io.
add_station_lat_lon
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
pandas.DataFrame
stn_var (str) – The string of the variable name that represents the station in the DataFrame. Common examples are ‘station’, ‘stid’, and ‘station_id’
pandas.DataFrame that contains original Dataframe now with the latitude and longitude
values for each location found in station_info.
station_info