Version 16 (modified by 3 years ago) ( diff ) | ,
---|
Table of Contents
GRASS GIS Mini Project 2022: Space-Time Dataset Visualization and Improved Interactive Maps for grass.jupyter
Title: | Space-Time Dataset Visualization and Improved Interactive Maps for grass.jupyter |
Student Name: | Caitlin Haedrich, North Carolina State University |
Mentor Name: | Vaclav Petras, Helena Mitasova, Stephan Blumentrath |
GitHub Fork: | View Repo |
Proposal: | View Proposal |
Budget: | 1000 € (via GRASS GIS Student Grants) |
Abstract
During GSoC 2021, we created “grass.jupyter”, a package that improves the integration of GRASS GIS and Jupyter with a set of functions for displaying GRASS data in Jupyter Notebooks. In its current state, “grass.jupyter” allows users to create static visuals and simple interactive maps. However, several additional features are needed to allow Jupyter users to fully and easily access the power GRASS, including space-time dataset visualization and more options for interactive mapping (such as color or vector attribute access).
Goal
This project had three main objectives:
- create a class for visualizing space time datasets allowing users to create interactive time-sliders and non-interactive animations such as GIFs.
- improve the integration of grass and folium, the library used for InteractiveMap, so that users can access all of folium’s functionality. Currently, InteractiveMap allows users to add rasters and vectors to folium maps. Users can toggle between layers and export the map in HTML. However, folium allows for much more sophisticated mapping as well: users can control color, vector symbology, create heatmaps (point density maps) and view vector attributes with a click or hover. I propose to create new grass-folium objects that allow users to directly call folium (thus avoiding the problem of needing to wrap the entire folium library and continue to update as folium features change, depreciate and expand).
- create a function to display vector attribute data in nicely-formatted Pandas or GeoPandas tables (as opposed to text output which is currently possible with “v.db.select”).
Timeline
Time Period | Milestones | |
---|---|---|
Tasks | Status | |
January 10th - January 14th |
Project Intro Email |
Ok |
January 17th - January 21st | Draft of TimeSlider method | Ok |
January 24th - January 28th | Draft of time_slider and animate | Ok |
January 31st - February 4th | -- | -- |
February 7th - February 11th |
Docstrings and comments for time_slider and animate |
Ok |
February 14th - February 18th |
Fixed region handling for InteractiveMap |
Ok |
February 21st - February 25th | ||
February 28th - March 4th | ||
March 7th - March 11th |
Weekly reports
Week 2
Here's a quick update of what I worked on last week for my Mini Project on improving grass.jupyter.
1) What did I accomplish this week?
I started on visualization functions for space time datasets (strds and stvds). I created a grass.jupyter
class called TimeSeries
that will eventually have two methods: TimeSlider
for creating an interactive time slider where users can scroll through the rendered maps and animate
for creating animations of the space time datasets. I have a draft version of the TimeSlider
working - currently, users have to switch through the maps with a drop down menu instead of a slider (or scroll with arrow keys) . You can test it out on Binder here and view the PR on GitHub.
2) What do I plan to do next week?
- Switch from a dropdown menu to a SelectionSlider for the
TimeSlider
visualization - Create more robust ways to add background and overlay layers to the
TimeSlider
- Start the
TimeSeries.animate()
function for animating space time datasets
3) Am I blocked on anything? No, I'm not currently blocked on anything.
Feedback, thoughts and comments welcome!
Week 3
Here's a quick update on my Mini Project for improving grass.jupyter
.
1) What did I accomplish this week?
- Switched from a Dropdown menu to a SelectionSlider for the
time_slider
visualization. I found a bug in ipywidgets which slowed me down a bit this week. I ended up opening an issue on GitHub and it was quickly addressed (go ipywidgets!). - Wrote
TimeSeries.animate()
function for animating space time datasets You can test it out on Binder and view the PR.
2) What do I plan to do next week?
- Cleanup and write nice docstrings for TimeSeries visualizations
- The current visualizations are not great for multitemporal datasets (i.e. datasets with varying time steps), since the steps in the animation and time slider are all regularly spaced. Next week, I'll work on a way to address this.
- Maybe start working on GRASS-folium integration for interactive mapping
3) Am I blocked on anything?
- No, I'm not currently blocked on anything.
Feedback, thoughts and comments welcome!
Week 4
Here's an update on what I've been working on over the last two weeks for my Mini Project on improving grass.jupyter
.
1) What did I accomplish over the past week?
- Took a week off to catch up on other work
- Made minor edits, cleaned-up and wrote docstrings for TimeSeries visualizations (view the PR)
- Addressed visualizations issues with datasets that have varying time steps (view the PR)
- Started improving GRASS-folium integration for interactive mapping by restructuring interact_display.py and adding classes that can be passed to folium (view the PR)
You can test it out the TimeSeries visualizations (animate and time_slider) in Binder
2) What do I plan to do next week?
- Work on cleaning up temporary files created by grass.jupyter
- Region handling for InteractiveMap (as you can see in the Binder, the map is no longer automatically zoomed to the computation region)
- Docstrings, comments, cleanup interact_display.py
- Update grass_jupyter Notebook to include GRASS-folium example
- Begin functions for viewing vector attributes in Pandas
3) Am I blocked on anything?
- No, I'm not currently blocked on anything.
Feedback, thoughts and comments welcome!
Week 5
Here's my weekly update on my Mini Project on improving grass.jupyter
.
1) What did I accomplish over the past two weeks?
- Fixed region handling for InteractiveMap (now, it automatically zooms to the computation region or layer added!) and added tiles keyword argument so you can use a tile of your choice in the background by passing one of folium's defaults or a URL address (cool!) (view the PR)
- Docstrings, comments, Pylint cleanup, and tempfile clean-up of interact_display.py (view the PR)
- Update
grass_jupyter
Notebook to include GRASS-folium example (view the PR)
You can test the restructured InteractiveMap and GRASS-folium integration in Binder at in Binder.
2) What do I plan to do next week?
- Merge existing PRs
- Begin functions for viewing vector attributes in Pandas
3) Am I blocked on anything?
- No, I'm not currently blocked on anything.
Feedback, thoughts and comments welcome!
Week 6/7
I'm just sending out an update on my GRASS Mini Project on improving grass.jupyter.
1) What have I accomplished since my last update?
- I've been having frequent meetings with Vashek Petras to discuss the structure of grass.jupyter and to improve the code (thanks to Vashek, I'm learning a lot of better coding practices and I think the current code is a lot more robust than before)
- Improved region handling, method for filling gaps in space-time datasets, baselayer/overlay methods for TimeSeries (view the PR)
2) What do I plan to do next week?
- Write tests for TimeSeries and GRASS-folium objects
- Functions for viewing vector attributes in Pandas
3) Am I blocked on anything?
- No, I'm not currently blocked on anything.
Feedback, thoughts and comments welcome!
Week 7
I'm just sending out an update on my GRASS Mini Project on improving grass.jupyter.
1) What have I accomplished since my last update?
- I continue to have regular meetings with Vashek Petras. This past week we discussed how to decrease the rendering time for TimeSeries objects and using the pytest package for writing tests.
- Wrote tests for TimeSeries (view the PR)
- Took a week off for our Spring Break.
2) What do I plan to do next week?
- Write test for (!ReprojectionRenderer)
- Merge existing pull requests (here and here)
3) Am I blocked on anything?
- One thing Vashek Petras and I have been discussing is the naming of classes and methods in grass.jupyter. With the release of 8.2 coming up, we're hoping to produce a relatively stable API and want to solicit some feedback and ideas on naming conventions so they could be changed, if needed, before the release. I've opened an Issue on GitHub.
Feedback, thoughts and comments welcome!
Week 8
Final Report
Title: Title
Abstract:
The state of integration BEFORE the start of Mini Grant:
The state of integration AFTER Mini Grant:
Conclusion:
Future Work:
Attachments (2)
- timeseriesmap.PNG (137.8 KB ) - added by 3 years ago.
- grass-folium.PNG (592.3 KB ) - added by 3 years ago.
Download all attachments as: .zip