You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a researcher who primarily works with Python/R/Leaflet, I would like a code snippet that I can use in my Python Notebook/RScript/Leaflet Map to make immediate use of the data I have discovered in Earthworks
We currently provide a link directly to the geoserver, and the WMS/WFS layer name, but no reference on how to make use of those? Preference would be to develop a set of boilerplate snippets to insert this info into for a more useful presentation of this info. Code snippets might provide cut-&-paste code for:
Python:
import geopandas as gpd
import requests
import geojson
# Specify the url for the backend. Here we are using data from Statistics Finland: https://www.stat.fi/org/avoindata/paikkatietoaineistot_en.html
url = 'http://geo.stat.fi/geoserver/vaestoruutu/wfs'
# Specify parameters (read data in json format).
# Available feature types in this particular data source: http://geo.stat.fi/geoserver/vaestoruutu/wfs?service=wfs&version=2.0.0&request=describeFeatureType
params = dict(service='WFS', version='2.0.0', request='GetFeature',
typeName='vaestoruutu:vaki2017_5km', outputFormat='json')
# Fetch data from WFS using requests
r = requests.get(url, params=params)
# Create GeoDataFrame from geojson
data = gpd.GeoDataFrame.from_features(geojson.loads(r.content))
per @mapninja, Planet.com does this really well with its API links that allow you to copy/paste code snippets directly. we want stuff you can copy-paste and use immediately.
As a researcher who primarily works with Python/R/Leaflet, I would like a code snippet that I can use in my Python Notebook/RScript/Leaflet Map to make immediate use of the data I have discovered in Earthworks
We currently provide a link directly to the geoserver, and the WMS/WFS layer name, but no reference on how to make use of those? Preference would be to develop a set of boilerplate snippets to insert this info into for a more useful presentation of this info. Code snippets might provide cut-&-paste code for:
Python:
R:
https://inbo.github.io/tutorials/tutorials/spatial_wfs_services/
Leaflet JS (may need to enable the Jsonp in GeoServer):
Really nice example from Google Earth Engine Catalog:
https://developers.google.com/earth-engine/datasets/catalog/LANDSAT_LC08_C02_T1_L2
The text was updated successfully, but these errors were encountered: