Walkthrough

Walkthrough

After installing the package one can call it in a new session as any other package. A good practice is to define the cdo_token one intends to use for that session.

using NCEI
const cdo_token = ENV["cdo_token"]
# A token has form: r"[A-Za-z]{32}"

One should first inspect the datasets available to select the ones the appropriate ones. Good information about a dataset is its ID which one needs to query data from that dataset, the temporal coverage, and documentation that can be accessed through the uid. For example, the daily summaries dataset (GHCND) has uid: C00861. The information for this dataset can be accessed at: https://data.nodc.noaa.gov/cgi-bin/iso?id=gov.noaa.ncdc:C00861.

# Fetch all available datasets
cdo_datasets(cdo_token)

11 rows × 6 columns

uidmindatemaxdatenamedatacoverageid
StringDateDateStringFloat64String
1gov.noaa.ncdc:C008611763-01-012019-02-11Daily Summaries1.0GHCND
2gov.noaa.ncdc:C009461763-01-012019-01-01Global Summary of the Month1.0GSOM
3gov.noaa.ncdc:C009471763-01-012018-01-01Global Summary of the Year1.0GSOY
4gov.noaa.ncdc:C003451991-06-052019-02-10Weather Radar (Level II)0.95NEXRAD2
5gov.noaa.ncdc:C007081994-05-202019-02-08Weather Radar (Level III)0.95NEXRAD3
6gov.noaa.ncdc:C008212010-01-012010-01-01Normals Annual/Seasonal1.0NORMAL_ANN
7gov.noaa.ncdc:C008232010-01-012010-12-31Normals Daily1.0NORMAL_DLY
8gov.noaa.ncdc:C008242010-01-012010-12-31Normals Hourly1.0NORMAL_HLY
9gov.noaa.ncdc:C008222010-01-012010-12-01Normals Monthly1.0NORMAL_MLY
10gov.noaa.ncdc:C005051970-05-122014-01-01Precipitation 15 Minute0.25PRECIP_15
11gov.noaa.ncdc:C003131900-01-012014-01-01Precipitation Hourly1.0PRECIP_HLY
# Fetch all information about the GSOY dataset specifically
cdo_datasets(cdo_token, "GSOY")

1 rows × 5 columns

mindatemaxdatenamedatacoverageid
DateDateStringFloat64String
11763-01-012018-01-01Global Summary of the Year1.0GSOY
# Fetch all available datasets with the Temperature at the time of observation (TOBS) data type
cdo_datasets(cdo_token, datatypes = "TOBS")

1 rows × 6 columns

uidmindatemaxdatenamedatacoverageid
StringDateDateStringFloat64String
1gov.noaa.ncdc:C008611763-01-012019-02-11Daily Summaries1.0GHCND
# Fetch all available datasets with data for a given set of stations
cdo_datasets(cdo_token, stations = "GHCND:USC00010008")

6 rows × 6 columns

uidmindatemaxdatenamedatacoverageid
StringDateDateStringFloat64String
1gov.noaa.ncdc:C008611763-01-012019-02-11Daily Summaries1.0GHCND
2gov.noaa.ncdc:C009461763-01-012019-01-01Global Summary of the Month1.0GSOM
3gov.noaa.ncdc:C009471763-01-012018-01-01Global Summary of the Year1.0GSOY
4gov.noaa.ncdc:C008212010-01-012010-01-01Normals Annual/Seasonal1.0NORMAL_ANN
5gov.noaa.ncdc:C008232010-01-012010-12-31Normals Daily1.0NORMAL_DLY
6gov.noaa.ncdc:C008222010-01-012010-12-01Normals Monthly1.0NORMAL_MLY

The next step is to find the data categories one might need (e.g., temperature vs precipitation).

# Fetch all available data categories
cdo_datacategories(cdo_token)

42 rows × 2 columns

nameid
StringString
1Annual AgriculturalANNAGR
2Annual Degree DaysANNDD
3Annual PrecipitationANNPRCP
4Annual TemperatureANNTEMP
5Autumn AgriculturalAUAGR
6Autumn Degree DaysAUDD
7Autumn PrecipitationAUPRCP
8Autumn TemperatureAUTEMP
9ComputedCOMP
10Computed AgriculturalCOMPAGR
11Degree DaysDD
12Dual-Pol MomentsDUALPOLMOMENT
13Echo TopsECHOTOP
14EvaporationEVAP
15Hydrometeor TypeHYDROMETEOR
16LandLAND
17MiscellanyMISC
18OtherOTHER
19OverlayOVERLAY
20PrecipitationPRCP
21PressurePRES
22ReflectivityREFLECTIVITY
23Sky cover & cloudsSKY
24Spring AgriculturalSPAGR
# Fetch all information about the Annual Agricultural dataset specifically
cdo_datacategories(cdo_token, "ANNAGR")

1 rows × 2 columns

nameid
StringString
1Annual AgriculturalANNAGR
# Fetch data categories for a given set of locations
cdo_datacategories(cdo_token, locations = ["FIPS:37", "CITY:US390029"])

42 rows × 2 columns

nameid
StringString
1Annual AgriculturalANNAGR
2Annual Degree DaysANNDD
3Annual PrecipitationANNPRCP
4Annual TemperatureANNTEMP
5Autumn AgriculturalAUAGR
6Autumn Degree DaysAUDD
7Autumn PrecipitationAUPRCP
8Autumn TemperatureAUTEMP
9ComputedCOMP
10Computed AgriculturalCOMPAGR
11Degree DaysDD
12Dual-Pol MomentsDUALPOLMOMENT
13Echo TopsECHOTOP
14EvaporationEVAP
15Hydrometeor TypeHYDROMETEOR
16LandLAND
17MiscellanyMISC
18OtherOTHER
19OverlayOVERLAY
20PrecipitationPRCP
21PressurePRES
22ReflectivityREFLECTIVITY
23Sky cover & cloudsSKY
24Spring AgriculturalSPAGR

Now we can inspect which variables we want to query from what data set.

# Fetch available data types
cdo_datatypes(cdo_token)

1,527 rows × 5 columns

mindatemaxdatenamedatacoverageid
DateDateStringFloat64⍰String
11994-03-191996-05-28Average cloudiness midnight to midnight from 30-second ceilometer data1.0ACMC
21965-01-012005-12-31Average cloudiness midnight to midnight from manual observations1.0ACMH
31994-02-011996-05-28Average cloudiness sunrise to sunset from 30-second ceilometer data1.0ACSC
41965-01-012005-12-31Average cloudiness sunrise to sunset from manual observations1.0ACSH
51991-06-052019-02-10Base Data0.95ALL
62010-01-012010-01-01Long-term averages of annual cooling degree days with base 45F1.0ANN-CLDD-BASE45
72010-01-012010-01-01Long-term averages of annual cooling degree days with base 50F1.0ANN-CLDD-BASE50
82010-01-012010-01-01Long-term averages of annual cooling degree days with base 55F1.0ANN-CLDD-BASE55
92010-01-012010-01-01Long-term averages of annual cooling degree days with base 57F1.0ANN-CLDD-BASE57
102010-01-012010-01-01Long-term averages of annual cooling degree days with base 60F1.0ANN-CLDD-BASE60
112010-01-012010-01-01Long-term averages of annual cooling degree days with base 70F1.0ANN-CLDD-BASE70
122010-01-012010-01-01Long-term averages of annual cooling degree days with base 72F1.0ANN-CLDD-BASE72
132010-01-012010-01-01Long-term averages of annual cooling degree days with base 65F1.0ANN-CLDD-NORMAL
142010-01-012010-01-01Long-term averages of annual diurnal temperature range1.0ANN-DUTR-NORMAL
152010-01-012010-01-01Long-term averages of annual growing degree days with base 40F1.0ANN-GRDD-BASE40
162010-01-012010-01-01Long-term averages of annual growing degree days with base 45F1.0ANN-GRDD-BASE45
172010-01-012010-01-01Long-term averages of annual growing degree days with base 50F1.0ANN-GRDD-BASE50
182010-01-012010-01-01Long-term averages of annual growing degree days with base 55F1.0ANN-GRDD-BASE55
192010-01-012010-01-01Long-term averages of annual growing degree days with base 57F1.0ANN-GRDD-BASE57
202010-01-012010-01-01Long-term averages of annual growing degree days with base 60F1.0ANN-GRDD-BASE60
212010-01-012010-01-01Long-term averages of annual growing degree days with base 65F1.0ANN-GRDD-BASE65
222010-01-012010-01-01Long-term averages of annual growing degree days with base 70F1.0ANN-GRDD-BASE70
232010-01-012010-01-01Long-term averages of annual growing degree days with base 72F1.0ANN-GRDD-BASE72
242010-01-012010-01-01Long-term averages of annual growing degree days with truncated bases 48F and 86F1.0ANN-GRDD-TB4886
# Fetch more information about the ACMH data type id
cdo_datatypes(cdo_token, "ACMH")

1 rows × 4 columns

mindatemaxdatedatacoverageid
DateDateFloat64String
11965-01-012005-12-311.0ACMH
# Fetch data types with the air temperature data category
cdo_datatypes(cdo_token, datacategories = "TEMP")

59 rows × 5 columns

mindatemaxdatenamedatacoverageid
DateDateStringFloat64⍰String
11763-01-012019-01-01Cooling Degree Days Season to Date1.0CDSD
21863-05-042019-01-30Number of days included in the multiday minimum temperature (MDTN)1.0DATN
31863-05-042019-01-29Number of days included in the multiday maximum temperature (MDTX)1.0DATX
42010-01-012010-12-31Long-term averages of daily diurnal temperature range1.0DLY-DUTR-NORMAL
52010-01-012010-12-31Long-term standard deviations of daily diurnal temperature range1.0DLY-DUTR-STDDEV
62010-01-012010-12-31Long-term averages of daily average temperature1.0DLY-TAVG-NORMAL
72010-01-012010-12-31Long-term standard deviations of daily average temperature1.0DLY-TAVG-STDDEV
82010-01-012010-12-31Long-term averages of daily maximum temperature1.0DLY-TMAX-NORMAL
92010-01-012010-12-31Long-term standard deviations of daily maximum temperature1.0DLY-TMAX-STDDEV
102010-01-012010-12-31Long-term averages of daily minimum temperature1.0DLY-TMIN-NORMAL
112010-01-012010-12-31Long-term standard deviations of daily minimum temperature1.0DLY-TMIN-STDDEV
121763-01-012019-01-01Extreme minimum temperature for the period.1.0EMNT
131763-01-012019-01-01Extreme maximum temperature for the period.1.0EMXT
141763-07-012019-01-01Heating Degree Days Season to Date1.0HDSD
152010-01-012010-12-31Dew point 10th percentile1.0HLY-DEWP-10PCTL
162010-01-012010-12-31Dew point 90th percentile1.0HLY-DEWP-90PCTL
172010-01-012010-12-31Dew point mean1.0HLY-DEWP-NORMAL
182010-01-012010-12-31Heat index mean1.0HLY-HIDX-NORMAL
192010-01-012010-12-31Temperature 10th percentile1.0HLY-TEMP-10PCTL
202010-01-012010-12-31Temperature 90th percentile1.0HLY-TEMP-90PCTL
212010-01-012010-12-31Temperature mean1.0HLY-TEMP-NORMAL
222010-01-012010-12-31Wind chill mean1.0HLY-WCHL-NORMAL
231763-01-012019-02-08Highest minimum temperaturemissingHTMN
241763-01-012019-02-08Highest maximum temperaturemissingHTMX
# Fetch data types that support a given set of stations
cdo_datatypes(cdo_token, stations = ["COOP:310090", "COOP:310184", "COOP:310212"])

21 rows × 5 columns

mindatemaxdatenamedatacoverageid
DateDateStringFloat64⍰String
11763-01-012019-01-01Cooling Degree Days1.0CLDD
21781-01-012019-01-01Number of days with greater than or equal to 0.1 inch of precipitation1.0DP01
31781-01-012017-05-01Number of days with greater than or equal to 0.5 inch of precipitation1.0DP05
41781-01-012019-01-01Number of days with greater than or equal to 1.0 inch of precipitation1.0DP10
51888-12-012015-11-01Departure from normal monthly precipitation.1.0DPNP
61888-06-012015-11-01Departure from normal monthly temperature.1.0DPNT
71840-05-012019-01-01Number days with snow depth > 1 inch.1.0DSNW
81763-01-012019-01-01Number days with minimum temperature less than or equal to 0.0 F1.0DT00
91763-01-012019-01-01Number days with minimum temperature less than or equal to 32.0 F1.0DT32
101763-01-012016-03-01Number days with maximum temperature greater than or equal 90.0 F1.0DT90
111763-01-012019-01-01Number days with maximum temperature < 32 F.1.0DX32
121763-01-012019-01-01Extreme minimum temperature for the period.1.0EMNT
131781-01-012019-01-01Extreme maximum precipitation for the period.1.0EMXP
141763-01-012019-01-01Extreme maximum temperature for the period.1.0EMXT
151763-01-012019-01-01Heating degree days1.0HTDD
161763-01-012016-03-01Monthly Mean minimum temperature1.0MMNT
171763-01-012016-03-01Monthly Mean maximum temperature1.0MMXT
181763-01-012016-03-01Monthly mean temperature1.0MNTM
191857-01-012016-03-01Maximum snow depth1.0MXSD
201781-01-012016-03-01Total precipitation1.0TPCP
211840-05-012016-03-01Total snow fall1.0TSNW

We must identify the spatial constraints of the search and that can be accomplished at various levels (e.g., State vs Zip code).

# Fetch all available location categories
cdo_locationcategories(cdo_token)

12 rows × 2 columns

nameid
StringString
1CityCITY
2Climate DivisionCLIM_DIV
3Climate RegionCLIM_REG
4CountryCNTRY
5CountyCNTY
6Hydrologic Accounting UnitHYD_ACC
7Hydrologic Cataloging UnitHYD_CAT
8Hydrologic RegionHYD_REG
9Hydrologic SubregionHYD_SUB
10StateST
11US TerritoryUS_TERR
12Zip CodeZIP
# Fetch more information about the climate region location category
cdo_locationcategories(cdo_token, "CLIM_REG")

1 rows × 2 columns

nameid
StringString
1Climate RegionCLIM_REG
# Fetch available location categories that have data after 1970
cdo_locationcategories(cdo_token, startdate = Date(1970, 1, 1))

12 rows × 2 columns

nameid
StringString
1CityCITY
2Climate DivisionCLIM_DIV
3Climate RegionCLIM_REG
4CountryCNTRY
5CountyCNTY
6Hydrologic Accounting UnitHYD_ACC
7Hydrologic Cataloging UnitHYD_CAT
8Hydrologic RegionHYD_REG
9Hydrologic SubregionHYD_SUB
10StateST
11US TerritoryUS_TERR
12Zip CodeZIP

Now select which locations are of interest.

# Fetch available locations
cdo_locations(cdo_token)

38,859 rows × 5 columns

mindatemaxdatenamedatacoverageid
DateDateStringFloat64String
11983-01-012019-01-30Abu Dhabi, AE1.0CITY:AE000001
21944-03-012019-01-30Ajman, AE0.9991CITY:AE000002
31944-03-012019-01-30Dubai, AE0.9991CITY:AE000003
41944-03-012019-01-30Sharjah, AE0.9991CITY:AE000006
51966-03-022019-01-30Kabul, AF0.9969CITY:AF000007
61973-01-022019-01-30Kandahar, AF0.9819CITY:AF000008
71877-04-012019-01-30Algiers, AG1.0CITY:AG000001
81909-11-012019-01-30Annaba, AG1.0CITY:AG000002
91973-04-012019-02-05Batna, AG0.9993CITY:AG000003
101957-01-012019-02-05Bechar, AG1.0CITY:AG000004
111909-11-012019-02-05Bejaia, AG1.0CITY:AG000005
121880-05-012019-02-05Constantine, AG1.0CITY:AG000006
131995-10-012019-02-05Guelma, AG1.0CITY:AG000007
141888-01-012019-01-30Laghouat, AG1.0CITY:AG000008
151995-10-012019-02-05Medea, AG0.9993CITY:AG000009
161976-04-012019-02-05Mostaganem, AG0.9995CITY:AG000010
171957-01-012019-02-05Oran, AG1.0CITY:AG000011
181985-02-012019-02-05Oum el Bouaghi, AG1.0CITY:AG000012
191981-01-012019-02-05Saida, AG0.9973CITY:AG000013
201995-10-012019-02-05Sidi-Bel-Abbes, AG1.0CITY:AG000014
211957-12-312019-02-05Skikda, AG1.0CITY:AG000015
221940-01-012014-02-01Tamanrasset, AG0.9973CITY:AG000016
231981-01-012019-02-05Tlemcen, AG1.0CITY:AG000017
241881-07-011992-01-31Baku, AJ0.991CITY:AJ000001
# Fetch more information about location id FIPS:37
cdo_locations(cdo_token, "FIPS:37")

1 rows × 5 columns

mindatemaxdatenamedatacoverageid
DateDateStringFloat64String
11869-03-012019-02-10North Carolina1.0FIPS:37
# Fetch available locations for the GHCND (Daily Summaries) dataset
cdo_locations(cdo_token, datasets = "GHCND")

28,450 rows × 5 columns

mindatemaxdatenamedatacoverageid
DateDateStringFloat64String
11983-01-022019-01-30Abu Dhabi, AE0.9959CITY:AE000001
21944-03-202019-01-30Ajman, AE0.9973CITY:AE000002
31944-03-202019-01-30Dubai, AE0.9973CITY:AE000003
41944-03-202019-01-30Sharjah, AE0.9973CITY:AE000006
51966-03-022019-01-30Kabul, AF0.5559CITY:AF000007
61973-01-022019-01-30Kandahar, AF0.4529CITY:AF000008
71877-04-072019-01-30Algiers, AG1.0CITY:AG000001
81909-11-232019-01-30Annaba, AG0.9252CITY:AG000002
91973-04-032019-02-05Batna, AG0.8649CITY:AG000003
101957-01-092019-02-05Bechar, AG1.0CITY:AG000004
111909-11-232019-02-05Bejaia, AG1.0CITY:AG000005
121880-05-182019-02-05Constantine, AG0.7634CITY:AG000006
131995-10-252019-02-05Guelma, AG1.0CITY:AG000007
141888-01-012019-01-30Laghouat, AG0.4328CITY:AG000008
151995-10-252019-02-05Medea, AG0.739CITY:AG000009
161976-04-282019-02-05Mostaganem, AG0.5775CITY:AG000010
171957-01-012019-02-05Oran, AG1.0CITY:AG000011
181985-02-072019-02-05Oum el Bouaghi, AG0.637CITY:AG000012
191981-01-012019-02-05Saida, AG0.5947CITY:AG000013
201995-10-252019-02-05Sidi-Bel-Abbes, AG0.7411CITY:AG000014
211957-12-312019-02-05Skikda, AG0.6945CITY:AG000015
221940-01-012008-12-31Tamanrasset, AG0.9404CITY:AG000016
231981-01-012019-02-05Tlemcen, AG1.0CITY:AG000017
241881-07-171992-01-31Baku, AJ0.9797CITY:AJ000001
# Fetch all U.S. States
cdo_locations(cdo_token, locationcategories = "ST")

51 rows × 5 columns

mindatemaxdatenamedatacoverageid
DateDateStringFloat64String
11888-02-012019-02-10Alabama1.0FIPS:01
21893-09-012019-02-10Alaska1.0FIPS:02
31867-08-012019-02-10Arizona1.0FIPS:04
41871-07-012019-02-10Arkansas1.0FIPS:05
51850-10-012019-02-10California1.0FIPS:06
61852-10-012019-02-10Colorado1.0FIPS:08
71884-11-012019-02-10Connecticut1.0FIPS:09
81893-01-012019-02-10Delaware1.0FIPS:10
91872-01-012019-02-10District of Columbia1.0FIPS:11
101871-10-012019-02-10Florida1.0FIPS:12
111849-01-012019-02-10Georgia1.0FIPS:13
121905-01-012019-02-10Hawaii1.0FIPS:15
131892-06-012019-02-10Idaho1.0FIPS:16
141870-10-152019-02-10Illinois1.0FIPS:17
151886-02-012019-02-10Indiana1.0FIPS:18
161888-06-012019-02-10Iowa1.0FIPS:19
171857-04-012019-02-10Kansas1.0FIPS:20
181872-10-012019-02-10Kentucky1.0FIPS:21
191882-07-012019-02-10Louisiana1.0FIPS:22
201885-06-012019-02-10Maine1.0FIPS:23
211880-01-012019-02-10Maryland1.0FIPS:24
221831-02-012019-02-10Massachusetts1.0FIPS:25
231887-06-012019-02-10Michigan1.0FIPS:26
241886-01-012019-02-10Minnesota1.0FIPS:27

Lastly, one can obtain the relevant stations and verify their spatial information, temporal coverage, and data quality. To select from feasible weather stations one can use packages such as Distances.jl to obtain the nearest acceptable weather station to the desired location.

# Fetch a list of stations that support a given set of data types
cdo_stations(cdo_token, datatypes = ["EMNT", "EMXT", "HTMN"])

12,832 rows × 9 columns

elevationmindatemaxdatelatitudenamedatacoverageidelevationUnitlongitude
Float64⍰DateDateFloat64StringFloat64StringString⍰Float64
134.01944-03-012019-01-3025.333SHARJAH INTER. AIRP, AE0.7247GHCND:AE000041196METERS55.517
210.41983-01-012019-01-3025.255DUBAI INTERNATIONAL, AE0.9973GHCND:AEM00041194METERS55.364
326.81983-01-012019-01-3024.433ABU DHABI INTERNATIONAL, AE1.0GHCND:AEM00041217METERS54.651
424.01940-01-012019-01-3036.7167ALGER DAR EL BEIDA, AG1.0GHCND:AG000060390METERS3.25
5397.01892-01-012019-02-0530.5667EL GOLEA, AG0.7834GHCND:AG000060590METERS2.8667
6561.01958-10-012019-02-0528.05IN AMENAS, AG1.0GHCND:AG000060611METERS9.6331
71362.01940-01-012014-02-0122.8TAMANRASSET, AG0.9911GHCND:AG000060680METERS5.4331
850.01852-01-011966-12-3135.7297ORAN HOPITAL MILITAIRE, AG0.6507GHCND:AGE00135039METERS0.65
959.01877-04-011938-12-2936.78ALGIERS VILLE UNIVERSITE0.9784GHCND:AGE00147705METERS3.07
10222.01879-01-012019-02-0536.72TIZI OUZOU, AG0.5094GHCND:AGE00147708METERS4.05
11942.01879-01-011938-12-2936.63FORT NATIONAL, AG0.932GHCND:AGE00147709METERS4.2
12660.01880-05-011938-12-3036.3697CONSTANTINE, AG0.8736GHCND:AGE00147711METERS6.62
13112.01879-01-011938-12-2836.17ORLEANSVILLE CHLEF, AG0.9084GHCND:AGE00147712METERS1.34
141081.01878-01-011938-12-2936.18SETIF, AG0.7132GHCND:AGE00147713METERS5.4
15863.01879-01-011938-12-2935.42TEBESSA, AG0.6473GHCND:AGE00147715METERS8.1197
1683.01878-01-012019-02-0535.1NEMOURS GHAZAOUET, AG0.5214GHCND:AGE00147716METERS-1.85
17476.01880-01-011938-12-2735.2SIDI BEL ABBES, AG0.791GHCND:AGE00147717METERS0.63
18125.01880-01-012019-02-0534.85BISKRA, AG0.7064GHCND:AGE00147718METERS5.72
19767.01888-01-012019-01-3033.7997LAGHOUAT, AG0.5047GHCND:AGE00147719METERS2.89
201320.01888-01-011938-12-2833.68GERYVILLE EL BAYADH, AG0.8432GHCND:AGE00147720METERS1.0
2111.01981-11-012019-02-0536.795JIJEL, AG0.9928GHCND:AGM00060351METERS5.874
227.01957-12-312019-02-0536.933SKIKDA0.7656GHCND:AGM00060355METERS6.95
234.91945-06-092019-01-3036.822ANNABA, AG0.8749GHCND:AGM00060360METERS7.809
246.11973-01-012019-02-0536.712SOUMMAM, AG0.9885GHCND:AGM00060402METERS5.07
# Fetch all information about the Abbeville AL station specifically
cdo_stations(cdo_token, "COOP:010008")

1 rows × 9 columns

elevationmindatemaxdatelatitudenamedatacoverageidelevationUnitlongitude
Float64DateDateFloat64StringFloat64StringStringFloat64
1139.01948-01-012014-01-0131.5702ABBEVILLE, AL US0.8813COOP:010008METERS-85.2482
# Fetch all the stations in North Carolina, US (FIPS:37)
cdo_stations(cdo_token, locations = "FIPS:37")

2,596 rows × 9 columns

elevationmindatemaxdatelatitudenamedatacoverageidelevationUnitlongitude
Float64⍰DateDateFloat64StringFloat64StringString⍰Float64
1185.91931-01-012015-11-0135.3992ALBEMARLE, NC US0.9647COOP:310090METERS-80.1994
2841.91931-01-011962-03-0135.9ALTAPASS, NC US0.9308COOP:310160METERS-82.0167
3533.11931-01-012005-09-0135.2014ANDREWS, NC US0.9811COOP:310184METERS-83.8386
4519.11949-01-011962-03-0135.0667ANDREWS DAM, NC US1.0COOP:310192METERS-83.9167
5137.21993-07-012015-11-0135.7426APEX, NC US0.9739COOP:310212METERS-78.8369
6100.61931-01-012015-11-0136.2911ARCOLA, NC US0.8881COOP:310241METERS-77.9822
7265.21931-01-012015-11-0135.7044ASHEBORO 2 W, NC US0.9941COOP:310286METERS-79.8378
8637.91946-02-011958-06-0135.4333ASHEVILLE HENDERSONVILLE AIRPORT, NC US0.9468COOP:310296METERS-82.4833
9645.31964-09-012015-11-0135.4319ASHEVILLE AIRPORT, NC US1.0COOP:310300METERS-82.5375
10682.11902-08-012015-11-0135.5954ASHEVILLE, NC US1.0COOP:310301METERS-82.5568
11571.51948-01-012014-01-0135.8922ASHFORD, NC US1.0COOP:310312METERS-81.9352
12604.11973-09-011980-11-2735.9ASHFORD 2 N, NC US0.0429COOP:310314METERS-81.95
131.22004-07-012015-11-0134.6997ATLANTIC BEACH WATER PLANT, NC US1.0COOP:310356METERS-76.7381
146.11973-01-012015-11-0135.3872AURORA 6 N, NC US0.9845COOP:310375METERS-76.7763
15182.91931-01-012014-01-0135.4591BADIN, NC US0.9318COOP:310438METERS-80.1827
16755.91949-01-011962-03-0136.0167BAKERSVILLE, NC US1.0COOP:310466METERS-82.1667
171066.81949-01-011995-05-0135.4167BALSAM, NC US0.3142COOP:310490METERS-83.0833
181149.11931-01-012015-11-0136.1616BANNER ELK, NC US0.9804COOP:310506METERS-81.8741
19707.11949-01-011962-03-0135.76BARNARDSVILLE 2 SE, NC US1.0COOP:310530METERS-82.4325
20707.12011-01-012015-11-0135.76BARNARDSVILLE 2 SE, NC US0.9835COOP:310531METERS-82.4325
213.01954-07-011967-06-0135.45BATH 2 WSW, NC US0.9359COOP:310562METERS-76.8333
221.51968-07-012015-11-0135.1311BAYBORO 3 SW, NC US0.9613COOP:310576METERS-76.816
23641.01949-01-011951-03-0135.2333BEAVERDAM CREEK, NC US1.0COOP:310634METERS-84.0833
24573.01951-04-011962-03-0135.2167BEAVERDAM CREEK, NC US0.9999COOP:310635METERS-84.1

The final step is to obtain the raw data itself. A few transformations are recommended before proceeding with the analysis of the data (e.g., transforming the dataframe from long to short and filling the missing records with missing values for those observations). Read the documentation to interpret the various flags under the attributes column.

# Fetch data from the GHCND dataset (Daily Summaries) for zip code 28801, May 1st of 2010
cdo_data(cdo_token, "GHCND", Date(2010, 5, 1), Date(2010, 5, 1), locations = "ZIP:28801")

8 rows × 5 columns

datedatatypestationattributesvalue
DateTimeStringStringString⍰Float64
12010-05-01T00:00:00PRCPGHCND:US1NCBC0005,,N,0.0
22010-05-01T00:00:00SNOWGHCND:US1NCBC0005,,N,0.0
32010-05-01T00:00:00PRCPGHCND:USW00013872,,0,24000.3
42010-05-01T00:00:00SNOWGHCND:USW00013872,,0,0.0
52010-05-01T00:00:00SNWDGHCND:USW00013872,,0,0.0
62010-05-01T00:00:00TMAXGHCND:USW00013872,,0,240026.7
72010-05-01T00:00:00TMINGHCND:USW00013872,,0,240013.9
82010-05-01T00:00:00TOBSGHCND:USW00013872,,0,240020.6
# Fetch data from the PRECIP_15 dataset (Precipitation 15 Minute) for COOP station 010008, for May of 2010 with metric units
cdo_data(cdo_token, "PRECIP_15", Date(2010, 5, 1), Date(2010, 5, 31), stations = "COOP:010008")

63 rows × 5 columns

datedatatypestationattributesvalue
DateTimeStringStringString⍰Float64
12010-05-01T00:15:00QGAGCOOP:010008g,,HT0.0
22010-05-01T00:15:00QPCPCOOP:010008g,,HT0.0
32010-05-03T14:00:00QGAGCOOP:010008,,HT109.73
42010-05-03T14:15:00QGAGCOOP:010008,,HT110.74
52010-05-03T14:15:00QPCPCOOP:010008,,HT10.16
62010-05-03T14:30:00QGAGCOOP:010008,,HT111.51
72010-05-03T14:30:00QPCPCOOP:010008,,HT7.62
82010-05-03T14:45:00QGAGCOOP:010008,,HT112.01
92010-05-03T14:45:00QPCPCOOP:010008,,HT5.08
102010-05-03T15:00:00QGAGCOOP:010008,,HT112.27
112010-05-03T15:00:00QPCPCOOP:010008,,HT2.54
122010-05-03T15:15:00QGAGCOOP:010008,,HT113.03
132010-05-03T15:15:00QPCPCOOP:010008,,HT7.62
142010-05-03T15:30:00QGAGCOOP:010008,,HT113.54
152010-05-03T15:30:00QPCPCOOP:010008,,HT5.08
162010-05-03T16:00:00QGAGCOOP:010008,,HT113.79
172010-05-03T16:00:00QPCPCOOP:010008,,HT2.54
182010-05-03T17:00:00QGAGCOOP:010008,,HT114.05
192010-05-03T17:00:00QPCPCOOP:010008,,HT2.54
202010-05-03T17:15:00QGAGCOOP:010008,,HT114.3
212010-05-03T17:15:00QPCPCOOP:010008,,HT2.54
222010-05-03T17:30:00QGAGCOOP:010008,,HT114.55
232010-05-03T17:30:00QPCPCOOP:010008,,HT2.54
242010-05-03T17:45:00QGAGCOOP:010008,,HT114.81
# Fetch data from the GSOM dataset (Global Summary of the Month) for GHCND station USC00010008, for May of 2010 with standard units
cdo_data(cdo_token, "GSOM", Date(2010, 5, 1), Date(2010, 5, 31),
         stations = "GHCND:USC00010008", metric = false)

10 rows × 5 columns

datedatatypestationattributesvalue
DateTimeStringStringString⍰Float64
12010-05-01T00:00:00DP01GHCND:USC00010008,04.0
22010-05-01T00:00:00DP10GHCND:USC00010008,04.0
32010-05-01T00:00:00DP1XGHCND:USC00010008,02.0
42010-05-01T00:00:00DSNDGHCND:USC00010008,00.0
52010-05-01T00:00:00DSNWGHCND:USC00010008,00.0
62010-05-01T00:00:00EMSDGHCND:USC00010008,,0,31,+0.0
72010-05-01T00:00:00EMSNGHCND:USC00010008,,0,31,+0.0
82010-05-01T00:00:00EMXPGHCND:USC00010008,,0,04,4.0
92010-05-01T00:00:00PRCPGHCND:USC00010008,,,06.6
102010-05-01T00:00:00SNOWGHCND:USC00010008,,,00.0