-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.noaa_historic_severe_storms.storms_2006`
(
  episode_id STRING OPTIONS(description="ID assigned by NWS to denote the storm episode; links the event details file with the information within location file"),
  event_id STRING OPTIONS(description="ID assigned by NWS to note a single, small part that goes into a specific storm episode; links the storm episode between the three files downloaded from SPC’s website"),
  state STRING OPTIONS(description="The full text state name where the event occurred"),
  state_fips_code STRING OPTIONS(description="Unique FIPS code identifier assigned to each state. State names and their corresponding FIPS codes are available as a BigQuery Public Dataset: bigquery-public-data.census_fips_codes.states_2016  The geographic polygons that define the perimeter of each state are available as a BigQuery Public Dataset: bigquery-public-data.geo_us_boundaries.us_states"),
  event_type STRING OPTIONS(description="The only events permitted in Storm Data are listed in Table 1 of Section 2.1.1 of NWS Directive 10-1605 at http://www.nws.noaa.gov/directives/sym/pd01016005curr.pdf. The chosen event type is the one that most accurately describes the meteorological event leading to fatalities, injuries, damage, etc. However, significant events, such as tornadoes, having no impact or causing no damage, are also included in Storm Data."),
  cz_type STRING OPTIONS(description="Indicates whether the event happened in   - C: County/Parish  - Z: NWS zone  - M: Marine"),
  cz_fips_code STRING OPTIONS(description="Unique FIPS code identifier assigned to each county.   State names and their corresponding FIPS codes are available as a BigQuery Public Dataset: bigquery-public-data.census_fips_codes.counties_2016  The geographic polygons that define the perimeter of each state are available as a BigQuery Public Dataset: bigquery-public-data.geo_us_boundaries.us_counties"),
  cz_name STRING OPTIONS(description="(County/Parish, Zone or Marine Name assigned to the county FIPS number or NWS Forecast Zone  NWS Forecast Zones are available as a BigQuery Public Dataset: bigquery-public-data.noaa_historic_severe_storms.nws_forecast_zones"),
  wfo STRING OPTIONS(description="National Weather Service Forecast Office’s area of responsibility (County Warning Area) in which the event occurred"),
  event_begin_time DATETIME OPTIONS(description="The date and time that the event began. Note that episodes and events may have different start and end times if multiple events occured in the same episode"),
  event_timezone STRING OPTIONS(description="The time zone in which the event_begin_time and the event_end_time is recorded."),
  event_end_time DATETIME OPTIONS(description="The date and time that the event ended. Note that episodes and events may have different start and end times if multiple events occured in the same episode"),
  injuries_direct INT64 OPTIONS(description="The number of injuries directly related to the weather event"),
  injuries_indirect INT64 OPTIONS(description="The number of injuries indirectly related to the weather event"),
  deaths_direct INT64 OPTIONS(description="The number of deathes directly related to the weather event"),
  deaths_indirect INT64 OPTIONS(description="The number of deathes indirectly related to the weather event"),
  damage_property INT64 OPTIONS(description="The estimated amount of damage to property incurred by the weather event, in USD at the time of the event. Values are not adjusted for inflation  Note: Values listed as 0 do not necessarily mean that no property damage occurred as a result of the event"),
  damage_crops INT64 OPTIONS(description="The estimated amount of damage to crops incurred by the weather event, in USD at the time of the storm. Values are not adjusted for inflation  Note: Values listed as 0 do not necessarily mean that no property damage occurred as a result of the event"),
  source STRING OPTIONS(description="Source reporting the weather event  Note: This can be any entry. Values are not restricted to specific categories"),
  magnitude FLOAT64 OPTIONS(description="Measured extent of the magnitude type. This is only used for wind speeds and hail size. Wind speeds are in MPH; Hail sizes are in inches"),
  magnitude_type STRING OPTIONS(description="Differentiates between the type of mangitude measured. - EG = Wind Estimated Gust  - ES = Estimated Sustained Wind  - MS = Measured Sustained Wind  - MG = Measured Wind Gust  No magnitude type is included for hail"),
  flood_cause STRING OPTIONS(description="Reported or estimated cause of the flood"),
  tor_f_scale STRING OPTIONS(description="Enhanced Fujita Scale describes the strength of the tornado based on the amount and type of damage caused by the tornado. The F-scale of damage will vary in the destruction area; therefore, the highest value of the F-scale is recorded for each event.    - EF0 – Light Damage (40 – 72 mph)   - EF1 – Moderate Damage (73 – 112 mph)   - EF2 – Significant damage (113 – 157 mph)   - EF3 – Severe Damage (158 – 206 mph)   - EF4 – Devastating Damage (207 – 260 mph)   - EF5 – Incredible Damage (261 – 318 mph)"),
  tor_length STRING OPTIONS(description="Length of the tornado or tornado segment while on the ground (minimal of tenths of miles)"),
  tor_width STRING OPTIONS(description="Width of the tornado or tornado segment while on the ground (in feet)"),
  tor_other_wfo STRING OPTIONS(description="Indicates the continuation of a tornado segment as it crossed from one National Weather Service Forecast Office to another. The subsequent WFO identifier is provided within this field."),
  location_index STRING OPTIONS(description="Number assigned by NWS to specific locations within the same Storm event. Each event’s sequentially increasing location index number will have a corresponding lat/lon point"),
  event_range FLOAT64 OPTIONS(description="A hydro-meteorological event will be referenced, minimally, to the nearest tenth of a mile, to the geographical center (not from the village/city boundaries or limits) of a particular village/city, airport, or inland lake, providing that the reference point is documented in the Storm Data software location database."),
  event_azimuth STRING OPTIONS(description="16-point compass direction from a particular village/city, airport, or inland lake, providing that the reference point is documented in the Storm Data software location database of > 130,000 locations."),
  reference_location STRING OPTIONS(description="Reference location of the center from which the range is calculated and the azimuth is determined"),
  event_latitude FLOAT64 OPTIONS(description="The latitude where the event occurred (rounded to the hundredths in decimal degrees; includes an ‘-‘ if it’s S of the Equator)"),
  event_longitude FLOAT64 OPTIONS(description="The longitude where the event occurred (rounded to the hundredths in decimal degrees; includes an ‘-‘ if it’s W of the Prime Meridian)"),
  event_point GEOGRAPHY OPTIONS(description="Geographic representation of the event_longitude and latitude")
);

INSERT INTO `bigquery-public-data.noaa_historic_severe_storms.storms_2006` (episode_id, event_id, state, state_fips_code, event_type, cz_type, cz_fips_code, cz_name, wfo, event_begin_time, event_timezone, event_end_time, injuries_direct, injuries_indirect, deaths_direct, deaths_indirect, damage_property, damage_crops, source, magnitude, magnitude_type, flood_cause, tor_f_scale, tor_length, tor_width, tor_other_wfo, location_index, event_range, event_azimuth, reference_location, event_latitude, event_longitude, event_point) VALUES ('1202410', '5482488', 'Co', '8', 'avalanche', 'Z', '19', 'SOUTHWESTERN SAN JUAN MOUNTAINS', 'GJT', '2006-01-20 09:00:00', 'MST', '2006-01-20 13:00:00', 0, 0, 0, 0, 0, 0, 'GOVT OFFICIAL', nan, NULL, 'nan', NULL, NULL, NULL, NULL, '1.0', nan, NULL, NULL, nan, nan, NULL), ('1202410', '5482487', 'Co', '8', 'avalanche', 'Z', '18', 'NORTHWESTERN SAN JUAN MOUNTAINS', 'GJT', '2006-01-20 09:00:00', 'MST', '2006-01-20 13:00:00', 0, 0, 0, 0, 0, 0, 'GOVT OFFICIAL', nan, NULL, 'nan', NULL, NULL, NULL, NULL, '1.0', nan, NULL, NULL, nan, nan, NULL), ('1202411', '5482489', 'Co', '8', 'avalanche', 'Z', '18', 'NORTHWESTERN SAN JUAN MOUNTAINS', 'GJT', '2006-01-26 02:00:00', 'MST', '2006-01-26 12:00:00', 0, 0, 0, 0, 0, 0, 'GOVT OFFICIAL', nan, NULL, 'nan', NULL, NULL, NULL, NULL, '1.0', nan, NULL, NULL, nan, nan, NULL), ('1202411', '5482490', 'Co', '8', 'avalanche', 'Z', '19', 'SOUTHWESTERN SAN JUAN MOUNTAINS', 'GJT', '2006-01-26 02:00:00', 'MST', '2006-01-26 12:00:00', 0, 0, 0, 0, 0, 0, 'GOVT OFFICIAL', nan, NULL, 'nan', NULL, NULL, NULL, NULL, '1.0', nan, NULL, NULL, nan, nan, NULL), ('1202412', '5482581', 'Co', '8', 'avalanche', 'Z', '18', 'NORTHWESTERN SAN JUAN MOUNTAINS', 'GJT', '2006-01-29 16:00:00', 'MST', '2006-01-29 17:00:00', 0, 0, 0, 0, 0, 0, 'DEPT OF HIGHWAYS', nan, NULL, 'nan', NULL, NULL, NULL, NULL, '1.0', nan, NULL, NULL, nan, nan, NULL);