Skip to content

Commit

Permalink
Update soildata.py
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvonk committed Feb 6, 2024
1 parent 6b8f9f2 commit bc7be2d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/pedon/soildata.py
Original file line number Diff line number Diff line change
@@ -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"])

0 comments on commit bc7be2d

Please sign in to comment.