From a70cb7eda82ffc9c00b2a51cc9751cd905ecc497 Mon Sep 17 00:00:00 2001 From: Carl Date: Tue, 19 Dec 2023 22:05:03 +0000 Subject: [PATCH] notes --- .github/workflows/compute.yml | 2 ++ .gitpod.yml | 8 ++++++++ README.md | 17 ++++++++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .gitpod.yml diff --git a/.github/workflows/compute.yml b/.github/workflows/compute.yml index cb30471..0deef1c 100644 --- a/.github/workflows/compute.yml +++ b/.github/workflows/compute.yml @@ -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 }} diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..946b74c --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,8 @@ + +image: ghcr.io/boettiger-lab/solara-geospatial:latest + +vscode: + extensions: + - ms-toolsai.jupyter + - ms-python.python + - ms-toolsai.jupyter-renderers \ No newline at end of file diff --git a/README.md b/README.md index d4e97ea..f41f451 100644 --- a/README.md +++ b/README.md @@ -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 ) \ No newline at end of file