Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Dec 10, 2021
1 parent 84ad318 commit c358a7b
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 109 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -1 +1,2 @@
*.ipynb linguist-vendored
THIRD_PARTY_NOTICES linguist-vendored
6 changes: 5 additions & 1 deletion example/observations_sql.py
Expand Up @@ -36,11 +36,15 @@ def sql_example():
end_date="2020-01-01",
tidy=True,
humanize=True,
si_units=False,
)

stations = request.filter_by_station_id(station_id=(1048,))

sql = "SELECT * FROM data WHERE parameter='temperature_air_200' AND value < -7.0;"
sql = (
"SELECT * FROM data WHERE "
"parameter='temperature_air_mean_200' AND value < -7.0;"
)
log.info(f"Invoking SQL query '{sql}'")

# Acquire observation values and filter with SQL.
Expand Down
4 changes: 2 additions & 2 deletions example/observations_stations.py
Expand Up @@ -32,9 +32,9 @@ def station_example():
humanize=True,
)

df = stations.filter_by_distance(latitude=50.0, longitude=8.9, distance=30).df
result = stations.filter_by_distance(latitude=50.0, longitude=8.9, distance=30)

print(df)
print(result.df)


def main():
Expand Down

0 comments on commit c358a7b

Please sign in to comment.