Skip to content

This is a tool to help users download large quantities of US drought monitor shapefiles from the GIS database. Contains an example to get point descriptions from 18 sites for 20 years.

Notifications You must be signed in to change notification settings

Corey4005/get-usdm-shapefiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-usdm-shapefiles

This is a tool to help users download large quantities of US drought monitor shapefiles from the GIS database.

Clone this repo

git clone https://github.com/Corey4005/get-usdm-shapefiles.git

Requirements

GNU Wget version 1.14

How to use this tool

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

Cool statistic

I was able to download 20 years of USDM shapefiles to my hard drive in 34 seconds using this script!

Example script utilizing 20 years of USDM data

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.

About

This is a tool to help users download large quantities of US drought monitor shapefiles from the GIS database. Contains an example to get point descriptions from 18 sites for 20 years.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages