weather icon

Weather Python Library

From the CORGIS Dataset Project

By Austin Cory Bart, Ryan Whitcomb
Version 2.0.0, created 6/13/2016
Tags: weather, rain, snow, sleet, fog, temperature, wind, climate, environment, geology

Overview

Under the National Oceanic and Atmospheric Administration, the National Weather Service provides daily weather reports for cities across the county. This is done through the use of 122 different Weather Forcast Offices throughout the country. These WFOs are responsible for the daily weather reports for serveral cities throughout their region of coverage. This data set takes the information from these WFO reports for cities across the country and summarizes it at the weekly level for all of 2016.

http://w2.weather.gov/climate/

Explore Structure

Each row represents $MISSING_FIELD.

Index Type Example Value
0 dict { }
1 dict (same structure)
2 dict (same structure)
... ... ...
Key Type Example Value Description
"Data" dict { }
"Date" dict { }
"Station" dict { }
Key Type Example Value Description
"Precipitation" float 0.0 The average amount of rain, in inches.
"Temperature" dict { }
"Wind" dict { }
Key Type Example Value Description
"Full" str "2016-01-03" A full string representation of the date this report was made.
"Month" int 1 The month of the year that this report was made.
"Week of" int 3 The first day of the week that this report was made.
"Year" int 2016 The year that this report was made.
Key Type Example Value Description
"City" str "Birmingham" The city that the reporting station sends its data to. Note that the recording station itself might actually be in a different city.
"Code" str "BHM" The unique code representing this station.
"Location" str "Birmingham, AL" The exact location of this recording station. Note that the recording station itself might be in a different location than where it sends its data.
"State" str "Alabama" The state that the reporting station sends its data to. Note that the recording station itself might actually be in a different state.
Key Type Example Value Description
"Avg Temp" int 39 The average recorded temperature on this week, in degrees Fahrenheit.
"Max Temp" int 46 The highest recorded temperature on this week, in degrees Fahrenheit.
"Min Temp" int 32 The lowest recorded temperature on this week, in degrees Fahrenheit.
Key Type Example Value Description
"Direction" int 33 The average wind direction for that week, in degrees.
"Speed" float 4.33 The average windspeed for that week, in Miles per Hour.

Downloads

Download all of the following files.

  1. weather.py
  2. weather.data

Usage

import weather
report = weather.get_report()

Documentation

get_report()
Returns a list of dictionaries representing report.