File size: 2,785 Bytes
894fbd3
 
 
 
 
 
 
 
c47a6e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b124e84
c47a6e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b124e84
 
c47a6e2
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
title: GIS322FinalProject
sdk: docker
app_port: 7860
pinned: false
---


# Urban Vegetation Dashboard — Maricopa County, AZ

Christian Anderson
GIS 322
Spring 2026
Instructor: Debayan Mandal

---

## Description

This interactive Solara dashboard explores the relationship between NDVI vegetation index, tree equity scores, and U.S. Census demographics at the block-group level across Maricopa County, Arizona. Users can visualize a bivariate choropleth map comparing greenness to demographic variables (Income, % Minority), toggle a Tree Equity Score overlay, and inspect a summary statistics table and chart of the top 15 block groups most in need of tree canopy investment.

---

## Screenshot

![Dashboard preview](screenshot.png)

---

## Data Sources

| Dataset | Source | License |
|---|---|---|
| NDVI (vegetation index) | [Google Earth Engine](https://earthengine.google.com) — Landsat/Sentinel composites | Free for research/education |
| Block-group demographics | [U.S. Census Bureau ACS 5-Year Estimates](https://api.census.gov) | Public domain |
| Tree Equity Scores | [American Forests — Tree Equity Score](https://treeequityscore.org/map/) | Free download |
| Block-group boundaries | [U.S. Census TIGER/Line Shapefiles](https://www.census.gov/geographies/mapping-files/time-series/geo/tiger-line-file.html) | Public domain |

---

## Environment Setup

### 1. Virtual environment
```anaconda prompt
pip install -r requirements.txt
```

### 2. Census API key *(free)*
Sign up at https://api.census.gov/data/key_signup.html, then either paste your key into `data_pipeline.py` when defining CENSUS_API_KEY

### 3. Google Earth Engine *(free for students)*
1. Sign up at https://earthengine.google.com with your Google account.
2. Authenticate in anaconda prompt:
   ```
   python -c "import ee; ee.Authenticate()"
   ```
3. Create a project at https://console.cloud.google.com (free tier).
4. Paste your project ID into `data_pipeline.py` where it says     ee.Initialize(project="gis322final").

### 4. Tree Equity Scores *(free)*
1. Go to https://treeequityscore.org/map/
2. Click **Download Data** → Arizona → Shapefile
3. Save to `data/raw/az_tes.shp`

### 5. Build the database
Run this once (~5 min) to fetch and process all data into `processed_dashboard.db`:
```anaconda prompt
python data_pipeline.py
```

---

## Run Instructions

```anaconda prompt
solara run app.py
```

---

## Project Files

| File | Purpose |
|---|---|
| `data_pipeline.py` | Run once to fetch data and build `processed_dashboard.db` |
| `app.py` | Solara dashboard — launch with `solara run app.py` |
| `dashboard_helpers.py` | Map and chart builder functions used by `app.py` |
| `requirements.txt` | Python dependencies |
| `data/raw/` | Place downloaded raw files here |