-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Mapbox GL for visualisations in the worked examples #770
Conversation
Codecov Report
@@ Coverage Diff @@
## master #770 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 130 130
Lines 6522 6522
Branches 691 691
=======================================
Hits 6076 6076
Misses 326 326
Partials 120 120
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #770 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 130 130
Lines 6522 6522
Branches 691 691
=======================================
Hits 6076 6076
Misses 326 326
Partials 120 120
Continue to review full report at Codecov.
|
Running |
Co-Authored-By: maxalbert <[email protected]>
@jch1g10 This command does indeed spin up the demo system with the worked examples, but running the notebooks fails because it spins up FlowclientConnectionError: Something went wrong. API returned with status code 400.
Error message: 'Unable to create query object.'.
Payload: {'exception': 'No data for date: 2016-01-08 - 2016-01-09'} Do you think there is an easy fix for this? If not, I'd rather address it in a separate PR. |
Codecov Report
@@ Coverage Diff @@
## master #770 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 130 130
Lines 6522 6522
Branches 691 691
=======================================
Hits 6076 6076
Misses 326 326
Partials 120 120
Continue to review full report at Codecov.
|
Oops! Should use the synthetic data now, with the latest commit:
(once CI finishes) |
Thanks! I tried to run the worked examples using this command. I can execute part of the Flows notebook, but sadly I get an internal error. I don't think this has anything to do with this PR, though, so I'm happy to merge this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work. 🏅👍 🎉
Closes #526 #528 #711
I have:
Description
This PR replaces the use of Folium with Mapbox GL for producing choropleths and heatmaps in the worked examples.
Running
pipenv run build
now also pre-caches flowmachine queries by executingdocs/cache_queries.py
, meaning that the example notebooks can run quickly enough to be executed during the CI docs build.Note: Mapbox requires an API token for producing the visualisations. The dockerised worked examples are set up to read this from the
MAPBOX_ACCESS_TOKEN
env var. I haven't made it mandatory to set this env var before spinning up the worked examples container, because some people may want to run parts of the example notebooks without having to sign up for a mapbox account, but I have added a note to the docs explaining that a token is required to produce the maps.Another note:
mapboxgl-jupyter
is not yet as full-featured as folium, and doesn't currently include some features we were previously using, such as multi-layered choropleths and time sliders. There are open issues for both of these features and more, though (see mapbox/mapboxgl-jupyter#34, mapbox/mapboxgl-jupyter#82), so we should continue to monitor this.