Skip to content

Commit

Permalink
notes
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Dec 19, 2023
1 parent 0b6e435 commit a70cb7e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/compute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
uses: actions/checkout@v3
- name: compute
run: python fire.py
- name: git-lfs
run: apt-get update && apt-get -y install git-lfs
- name: push
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
Expand Down
8 changes: 8 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

image: ghcr.io/boettiger-lab/solara-geospatial:latest

vscode:
extensions:
- ms-toolsai.jupyter
- ms-python.python
- ms-toolsai.jupyter-renderers
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,19 @@ license: mit
app_port: 8765
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
NOTE: The YAML header above is required for HuggingFace Spaces deployment. Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

# Simple Solara demo

This respository demonstrates how we can deploy an interactive map tool from a few lines of python to an app on HuggingFace spaces using Solara.

[Solara App on HuggingFace](https://huggingface.co/spaces/cboettig/solara-test)

### Overview

This application accesses boundary polygons from the National Parks Service and fire polygon data from CalFire to determine the location of all recorded fires in Joshua Tree national park. We select the largest area fire since 2015 in the database (currently turns out to be Elk Trail Fire) and access all Sentinel-2 imagery from the two weeks before and after the fire alarm date. From this imagery, we compute the Normalized Burn Severity metric (NBS) around the fire polygon before and after the fire (using cloud-native approach of `pystac`, `odc.stac`, and dask), and plot this on a leaflet map overlay with splitmap and fire polygons.


### Code

The required code for analysis is in `fire.py`, with solara visualization in `pages/01_leafmap.py`. (For interactive )

0 comments on commit a70cb7e

Please sign in to comment.