Data Description¶
Data was provided by the Climate at a Glance Analysis program run by the NOAA Natironal Center for Environmental Information. This data set was taken in Fairbanks, Alaska and represents the 12 month average temperatures on a yearly basis from 1935 - 2022 and ranges from 22.5 - 33.1 degrees Fahrenheit. It was amalgrated from weather stations that are part of the Global Historical Climatology Network.
Data Description¶
Data was provided by the Climate at a Glance Analysis program run by the NOAA Natironal Center for Environmental Information. This data set was taken in Fairbanks, Alaska and represents the 12 month average temperatures on a yearly basis from 1935 - 2022 and ranges from 58 - 66 degrees Fahrenheit. It was amalgrated from weather stations that are part of the Global Historical Climatology Network.
Site Description¶
Fairbanks, Alaska is a moderately sized city in the interior of the state of Alaska with a population of about 32,000. Its coordinates are 64°50′37″N 147°43′23″W. Its climate is a mix between humid continental and subartic. It has an elevation of 446 ft above sea level.
Image source: Aerial view of Fairbanks, Alaska from Wikimedia Commmons_(cropped).jpg)
import hvplot.pandas
import pandas as pd
#Assigns csv containting dataset to variable
Fairbanks_temp_URL = (
'https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/'
'city/time-series/USW00026411/tavg/12/8/1895-2023.csv')
#Creates dataframe loading var for csv defined previously, uses 3 rows in csv for header data, and names columns
Fairbanks_DataFrame = pd.read_csv(Fairbanks_temp_URL,
header = 3,
names = [ 'year', 'Temp Value (F)'])
#Runs method to clean up year data column to display year only
Fairbanks_DataFrame.year = pd.to_datetime(Fairbanks_DataFrame.year, format='%Y%m').dt.year
#Creates function that returns argument passed through standard conversion formula
def convert_Fahrenheit_to_Celsius(temperature):
return (temperature - 32) * 5 / 9
#creates new column with values converted from fahrenheit column
Fairbanks_DataFrame['Temperature (C)'] = Fairbanks_DataFrame['Temp Value (F)'].apply(convert_Fahrenheit_to_Celsius)
Maximum Yearly Average Temperature Values in Fairbanks, Alaska from 1935 - 2022¶
Fairbanks_DataFrame.hvplot(x='year', y='Temp Value (F)', title='Yearly Avg Temp over Time', ylabel='Temperature (F)', xlabel='Year', width=800, height=400, fontsize=20, color='orange' )
/opt/conda/lib/python3.10/site-packages/holoviews/core/data/pandas.py:39: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` return dataset.data.dtypes[idx].type /opt/conda/lib/python3.10/site-packages/holoviews/core/data/pandas.py:39: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` return dataset.data.dtypes[idx].type