From 96513e49b23f711048f6adc05f34d0599f49e7b9 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Fri, 15 Feb 2019 17:30:07 +1100 Subject: [PATCH] Add example to README --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index b978939..d632c0a 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,25 @@ https://realtimedata.waternsw.com.au ``` pip install git+http://git.wrl.unsw.edu.au:3000/danh/waternsw-grabber.git ``` + +## Usage ## + +```python +from waternsw_grabber import telemetered_bore_downloader, extract_records + +download_dir = 'downloads' +output_dir = 'csv' +start_date = '1900-01-01' +end_date = '2019-02-14' +bore_ids = [ + 'GW039102.1.1', + 'GW039114.1.1', + 'GW039117.1.1', +] + +# Download bore records +telemetered_bore_downloader(bore_ids, start_date, end_date, download_dir) + +# Extract zip archives +extract_records(download_dir, output_dir, clean_up=False) +```