'AttributeError on everything with Greppo in JupyterLab
I am trying to create a dashboard using Greppo in JupyterLab, but whatever I try to do following the documentation gives me an AttributeError:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/var/folders/kt/ttp65kq11zdgh8vfjd7dtgm40000gn/T/ipykernel_83794/915093404.py in <module>
----> 1 app.base_layer(
2 name="CartoDB Light",
3 visible=True,
4 url="https://cartodb-basemaps-a.global.ssl.fastly.net/light_all/{z}/{x}/{y}@2x.png",
5 subdomains=None,
AttributeError: 'GreppoApp' object has no attribute 'base_layer'
And:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/var/folders/kt/ttp65kq11zdgh8vfjd7dtgm40000gn/T/ipykernel_83794/1068074614.py in <module>
5 }
6
----> 7 app.vector_layer(
8 data = iceye_breaks,
9 name = 'Flood',
AttributeError: 'GreppoApp' object has no attribute 'vector_layer'
I installed Greppo on a MacBook using: "pip install greppo". Here is a sample of my code that gives the errors:
from greppo import app
app.base_layer(
name="CartoDB Light",
visible=True,
url="https://cartodb-basemaps-a.global.ssl.fastly.net/light_all/{z}/{x}/{y}@2x.png",
subdomains=None,
attribution='© <a target="_blank" href="http://osm.org/copyright">OpenStreetMap</a> contributors',
)
app.base_layer(
provider = "CartoDB Positron"
)
choropleth_style = {
'key_on': 'flood_class',
'bins': [0, 1, 2, 3, 4, 5, 6],
'palette': 'Blues',
}
app.vector_layer(
data = iceye_breaks,
name = 'Flood',
description = 'Flood depths monitored by ICEYE',
style = {'choropleth': choropleth_style},
)
app.vector_layer(
data = sos_build,
name = 'Severly inundated buildings',
description = 'Buildings inundated by at least 0.5m of floodwater.',
style = {"color": "#e41a1c"},
visible = True
)
Google or StackOverFlow didn't give any results regarding this problem and all instructions and tutorials point to me doing everything right. I even tried terminating the kernel and restarting JupyterLab.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
