diff --git a/src/pedon/soildata.py b/src/pedon/soildata.py index e69de29..15badc6 100644 --- a/src/pedon/soildata.py +++ b/src/pedon/soildata.py @@ -0,0 +1,15 @@ + +# import requests library +import requests +import pandas as pd + +# send get request +r = requests.get( + url = "https://www.soilphysics.wur.nl/soil.php", + params = {"latitude": 52, "longitude": 5.5} ) + +# extract data in json format +data = r.json() + +# further processing +pd.DataFrame(data["horizon"])