This is a tool to help users download large quantities of US drought monitor shapefiles from the GIS database.
git clone https://github.com/Corey4005/get-usdm-shapefiles.git
Open a command prompt and enter a starting and end date:
python get_usdm.py 20000104 20201229 #example timestamp representing startdate 2000-01-04 and enddate 2020-12-29 (20 years!)
This script will create a file called usdm_links.txt
containing all of the links that wget could call to download US drought monitor shapefiles.
Then, you can call wget on the textfile and retreive the shapefiles from USDM REST API services.
wget -i usdm_links.txt -P shapefiles/ --progress=bar:force:noscroll
All of the shapefiles between the start and end date will be downloaded to the shapefiles
directory!
In order to unzip the .zip files in the /shapefiles
directory so that you can get each .shp, .prj, .xml, .sbn, .dbf, open a command prompt and enter the following:
python unzip.py
I was able to download 20 years of USDM shapefiles to my hard drive in 34 seconds using this script!
For a project I was working on, I needed USDM data for 18 USDA SCAN soil moisture sites across Alabama.
The metadata for the example is found here.
I ran the make_dataframe.py
script on the /shapefiles
directory to collect the USDM data for each point, for each shapefile. I then sent this data to the /outdata
directory, where you can find an example drought climatology in .csv format.