Add setup.py

master
Dan Howe 6 years ago
parent 42b59fb9c8
commit 253c8d7ae9

@ -0,0 +1,10 @@
from setuptools import setup
setup(
name='waternsw_grabber',
version='0.1.0',
packages=['waternsw_grabber'],
install_requires=['pandas', 'selenium', 'requests', 'lxml', 'tqdm'],
author='Dan Howe',
author_email='d.howe@wrl.unsw.edu.au',
description='Download bore records from the WaterNSW data portal.')

@ -1,3 +1,7 @@
"""waternsw_grabber.py
Download bore records from the WaterNSW data portal.
"""
import os import os
import re import re
import time import time
@ -49,6 +53,18 @@ def wait_for_element(driver, by, x, timeout=60):
def get_telemetered_bore(driver, bore_id, start_date, end_date): def get_telemetered_bore(driver, bore_id, start_date, end_date):
"""Download records from telemetered bore.
Args:
driver: selenium webdriver object
bore_id: bore id (string)
start_date: start date (string in ISO-8601 format)
end_date: end date (string in ISO-8601 format)
Returns:
input values in model scale
"""
url = 'https://realtimedata.waternsw.com.au/water.stm' url = 'https://realtimedata.waternsw.com.au/water.stm'
driver.get(url) driver.get(url)

Loading…
Cancel
Save