These scripts will download and collate huge amounts of information on natural disasters.
The getEvents.js
script, found in the data folder, downloads all natural disaster data from the National Oceanic and Atmospheric Administration and organizes it by state and county. The script produces a JSON file for each state in processed/states/
folder.
git clone https://github.com/TimeMagazine/natural_disasters && cd natural_disasters
npm install
To download the raw files, run this:
node lib/getEvents.js
Warning: The script may take up to two hours to download all NOAA events, but the downcache module will cache the files locally for future references. Upon completion, the state files will be updated with the latest natural disasters from NOAA.
The natural disasters are downloaded from:
The first database contains 41 types of events, ranging from heavy fogs to rip tides. The second database only contains earthquakes.
The NOAA events come in various geographies, e.g. hurricanes use National Weather Zones, and earthquakes are recorded in latitude and longitude. The following geographic data, contained in the data/raw
folder, is used in the getEvents.js
script to convert other geographies to U.S. counties for the final map.
-
The latitude and longitude from National Weather Services Zones is used to locate weather events in counties.
-
The FCC Census Block Conversions API converts lat and lon from earthquakes to counties.