greppo-io / greppo Goto Github PK
View Code? Open in Web Editor NEWBuild & deploy geospatial applications quick and easy.
Home Page: https://greppo.io
License: Apache License 2.0
Build & deploy geospatial applications quick and easy.
Home Page: https://greppo.io
License: Apache License 2.0
Is it possible to export a map to HTML like in Folium? I've created a simple map with a couple of layers and it seems like docker is an overkill for this kind of map.
As far a I can tell, a user needs to specify all details of a base layer when adding it to app.
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',
)
You can make this easier if you make this dependent on the xyzservices
package we have built for geopandas and contextily. It has all these info, so you could do something like
from greppo import app
import xyzservices.providers as xyz
app.base_layer(
xyz.CartoDB.Positron,
visible=True,
)
Or you can use its query_name
method under the hood and simplify it to
from greppo import app
app.base_layer(
name="CartoDB Positron",
visible=True,
)
Happy to help with that if you need.
Hi all, I wanted to prepare a class with a simple use case of map/geodashboard publishing using Greppo. The problem is, it works in Mac but can't get installed in the environment in Windows. Any guides through instalation in Windows systems?
I reached to this point: Aditha's Github says 'Windows users: Installation of Fiona (one of Greppo's dependencies) on Windows machines usually doesn't work by default. A manual installation with e.g. wheel files by Christoph Gohlke the would be a work around.' But Christoph Gohlke link has hundreds of pythonlibs to install. Which one should be?
I am able to install greppo package. But getting this error:
# greppo serve app.py --host 172.31.38.540
INFO: Started server process [10836]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://172.31.38.540:8080 (Press CTRL+C to quit)
INFO: 18.209.195.135:54298 - "GET / HTTP/1.1" 200 OK
INFO: 18.209.195.135:54298 - "GET /css/app.a14da775.css HTTP/1.1" 200 OK
INFO: 18.209.195.135:54297 - "GET /css/chunk-vendors.db50bcea.css HTTP/1.1" 200 OK
INFO: 18.209.195.135:54301 - "GET /js/chunk-vendors.526a29f2.js HTTP/1.1" 200 OK
INFO: 18.209.195.135:54300 - "GET /js/app.7529265e.js HTTP/1.1" 200 OK
ERROR:fiona._env:geospatial_data.geojson: No such file or directory
INFO: 18.209.195.135:54301 - "GET /api HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "fiona/_shim.pyx", line 83, in fiona._shim.gdal_open_vector
File "fiona/_err.pyx", line 291, in fiona._err.exc_wrap_pointer
fiona._err.CPLE_OpenFailedError: geospatial_data.geojson: No such file or directory
Hello Guys!
Thanks for building Greppo! I am having some issues installing it, so I would really appreciate it if you could please five a hand:
I have created a different environment in Anaconda Prompt and tried to install greppo there, as @KrishAdi mentioned in the Discord group, but still with no success.
Any help would be greatly appreciated.
Looking forward to hearing from you soon. Have a good one!
David E.
I'm running Greppo on Colab and I was thinking whether it would be worth making this simpler in Greppo. It works well, but it requires tunneling and running the tunnel separately, which Colab is not too happy running 2 processes at once so it gets a bit cumbersome.
I'm using localtunnel right now. Some ideas I've had (I'm happy to contribute too):
python3 script.py
. This would make it more colab-friendly since we don't have to write a file to run like greppo serve script.py
These changes would also improve the general use case of sharing externally-available Greppo links during development, which we want for more exploratory / quick data-analysis type of work (as opposed to building an app to be published). What do you think?
The installation of Fiona on Windows machines usually doesn't work by default. Since Fiona
seems to be a dependency of greppo
(and GDAL
being a dependency of Fiona
, ...) I'd give a hint regarding a manual installation with e.g. the wheel files by Christoph Gohlke.
It probably is up for discussion on whose repository this issue should be submitted and I understand if you think that it isn't the greppo
repository since you are targeting Data Scientists that probably know their ways around Python and packages. However, in order to make the library available to a wider audience, I think the accessibility should be as best as possible which is why it might make sense to hint how to get the dependencies right.
I would like for greppo to constantly reevaluate data, or at least to trigger a reevaluation after user input changes
Hello Greppo team. I Found your project through a LinkedIn post and am willing to contribute. Just wanted to check if the project is still actively maintained for PRs. Thanks.
I followed the installation described here: https://docs.greppo.io/installation.html
yet when running pip install greppo it seems that collecting shapely is not possible:
Collecting Shapely==1.7.1 (from greppo)
Using cached Shapely-1.7.1.tar.gz (383 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
Is the installation advice still valid?
Hey there!
Tried to run the example code from the quickstart locally and got an error thrown:
INFO: 127.0.0.1:42240 - "GET /api HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/conor/.local/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/home/conor/.local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
return await self.app(scope, receive, send)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
raise exc
File "/home/conor/.local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/middleware/cors.py", line 84, in __call__
await self.app(scope, receive, send)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
raise exc
File "/home/conor/.local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/routing.py", line 656, in __call__
await route.handle(scope, receive, send)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/routing.py", line 259, in handle
await self.app(scope, receive, send)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/routing.py", line 61, in app
response = await func(request)
File "/home/conor/.local/lib/python3.8/site-packages/greppo/greppo_server.py", line 30, in api_endpoint
payload, _ = await script_task(script_name=user_script, input_updates=input_updates)
File "/home/conor/.local/lib/python3.8/site-packages/greppo/user_script_utils.py", line 253, in script_task
payload = run_script(
File "/home/conor/.local/lib/python3.8/site-packages/greppo/user_script_utils.py", line 226, in run_script
logger.debug(ast.unparse(user_code))
AttributeError: module 'ast' has no attribute 'unparse'
ERROR:uvicorn.error:Exception in ASGI application
Traceback (most recent call last):
File "/home/conor/.local/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/home/conor/.local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
return await self.app(scope, receive, send)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
raise exc
File "/home/conor/.local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/middleware/cors.py", line 84, in __call__
await self.app(scope, receive, send)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
raise exc
File "/home/conor/.local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/routing.py", line 656, in __call__
await route.handle(scope, receive, send)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/routing.py", line 259, in handle
await self.app(scope, receive, send)
File "/home/conor/.local/lib/python3.8/site-packages/starlette/routing.py", line 61, in app
response = await func(request)
File "/home/conor/.local/lib/python3.8/site-packages/greppo/greppo_server.py", line 30, in api_endpoint
payload, _ = await script_task(script_name=user_script, input_updates=input_updates)
File "/home/conor/.local/lib/python3.8/site-packages/greppo/user_script_utils.py", line 253, in script_task
payload = run_script(
File "/home/conor/.local/lib/python3.8/site-packages/greppo/user_script_utils.py", line 226, in run_script
logger.debug(ast.unparse(user_code))
AttributeError: module 'ast' has no attribute 'unparse'
Being lazy I didn't install Greppo in a virtualenv or anything, just ran python3 -m pip install greppo
.
Environment:
That's a great project and I'm very happy to try it out! Unfortunately, after installing the necessary dependencies and create a sample app.py
with app.base_layer( ... )
as shown in the demo section of the documentation, I keep getting errors like:
AttributeError: 'GreppoApp' object has no attribute 'base_layer'
.
Is there something I'm missing?
Logging error in the backend
File "/Users/adi/proj/greppo/library/src/greppo/greppo_server.py", line 29, in api_endpoint
logging.error("Unable to parse request body: ", await request.body())
Message: 'Unable to parse request body: '
Arguments: (b'',)
Having an '_' character in the name of the display method causes errors. Suggestion is to raise an error that is more meaningful.
I see that you included Leaflet.draw, it would be fair if you list somewhere (visible) which Libraries you are using behind.
PS: Leaflet.draw is a dead project, Leaflet-Geoman is more modern and up to date
"Collecting Shapely==1.7.1
Using cached Shapely-1.7.1.tar.gz (383 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\waqas\AppData\Local\Temp\pip-install-tejpkfb2\shapely_c15553460ad04164b9fc4f0138c13331\setup.py", line 85
, in
from shapely.buildcfg import geos_version_string, geos_version,
File "C:\Users\waqas\AppData\Local\Temp\pip-install-tejpkfb2\shapely_c15553460ad04164b9fc4f0138c13331\shapely_buildcfg.
py", line 205, in
lgeos = CDLL("geos_c.dll")
File "C:\Users\waqas\AppData\Local\Programs\Python\Python310\lib\ctypes_init.py", line 374, in init
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'geos_c.dll' (or one of its dependencies). Try using the full path with construct
or syntax.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
"
"
This error is coming how to resolve it
"
Thank you for greppo!
Is there any plans to implement vector tiles support? They are available in leaflet via plugins, e. g. https://github.com/Leaflet/Leaflet.VectorGrid
Is possible to integrate widget in the sidebar? I got a parametric script and I would put it on a web app as widget
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.