VictoriAragon - Portofilio- Post¶

Site description goes here¶

Data Description¶

In [5]:
# Code here
import pandas as pd

NM_url = ('https://www.ncei.noaa.gov/access/services/da'
'ta/v1?dataset=daily-summaries&dataTypes=TOBS,PRCP&stations=USC00298085&startDate=1972-04-01&endDate=2024-08-31&units=standard')



NM_df = pd.read_csv(
    NM_url, index_col='DATE', parse_dates=True)

NM_df.TOBS.plot(ylabel="Temperature (F)")
Out[5]:
<Axes: xlabel='DATE', ylabel='Temperature (F)'>
No description has been provided for this image
In [8]:
# REMOVED STATIONS

NM_df = NM_df[["PRCP", "TOBS"]]
NM_df
Out[8]:
PRCP TOBS
DATE
1972-04-01 0.00 34.0
1972-04-02 0.00 42.0
1972-04-03 0.00 44.0
1972-04-04 0.00 45.0
1972-04-05 0.00 45.0
... ... ...
2024-08-27 0.20 66.0
2024-08-28 0.00 66.0
2024-08-29 0.00 68.0
2024-08-30 0.06 69.0
2024-08-31 0.00 68.0

18976 rows × 2 columns

convert to C¶

In [9]:
# Resampling the data

NM_ann_climate_df = NM_df.resample('Y').mean()
NM_ann_climate_df
Out[9]:
PRCP TOBS
DATE
1972-12-31 0.044473 48.948718
1973-12-31 0.035041 44.448753
1974-12-31 0.037589 45.742466
1975-12-31 0.034630 44.567123
1976-12-31 0.021557 46.243169
1977-12-31 0.036274 48.041096
1978-12-31 0.038603 48.693151
1979-12-31 0.044247 46.561644
1980-12-31 0.031393 48.704918
1981-12-31 0.037096 49.758904
1982-12-31 0.037682 46.526316
1983-12-31 0.028085 52.038997
1984-12-31 0.047052 62.575342
1985-12-31 0.049587 54.826923
1986-12-31 0.056374 51.608219
1987-12-31 0.031000 52.134247
1988-12-31 0.046606 49.805556
1989-12-31 0.028802 53.429412
1990-12-31 0.041412 49.869888
1991-12-31 0.053878 46.710714
1992-12-31 0.040962 49.227528
1993-12-31 0.036565 50.652047
1994-12-31 0.054290 50.556497
1995-12-31 0.027235 50.478992
1996-12-31 0.037857 50.244382
1997-12-31 0.048430 47.671388
1998-12-31 0.037631 48.971751
1999-12-31 0.037898 51.756923
2000-12-31 0.033736 49.717949
2001-12-31 0.026354 48.680672
2002-12-31 0.028137 47.469741
2003-12-31 0.019917 48.514124
2004-12-31 0.034533 46.493075
2005-12-31 0.037973 48.050420
2006-12-31 0.041726 47.739011
2007-12-31 0.035647 48.162983
2008-12-31 0.040902 47.652893
2009-12-31 0.030328 46.725373
2010-12-31 0.041836 47.925824
2011-12-31 0.111630 48.093151
2012-12-31 0.023955 50.041322
2013-12-31 0.030192 48.432507
2014-12-31 0.031671 49.202247
2015-12-31 0.038257 50.501684
2016-12-31 0.028084 49.393293
2017-12-31 0.032849 51.116992
2018-12-31 0.035342 51.014124
2019-12-31 0.037548 48.883978
2020-12-31 0.020464 51.016575
2021-12-31 0.022329 51.439437
2022-12-31 0.038956 49.977208
2023-12-31 0.029288 50.544944
2024-12-31 0.036208 54.297071
In [14]:
# PLOT TEMP OBS COLUMN

NM_ann_climate_df.TOBS.plot(ylabel="Temperature (F)")
Out[14]:
<Axes: xlabel='DATE', ylabel='Temperature (F)'>
No description has been provided for this image

From 2000 - 2020 in Santa Fe Station the average temperature has an increase¶