Needs["GeoGraphics"]; Needs["GeoGraphics"];

DynamicModule[ { selectedContinent = "World", img = None, greenMask = None, referenceNote = "" },

Panel[ Style[ Column[{ Style["🌳 Vegetation Cover Tracker 🌳", 35, Bold, Darker[Green]],

    "Select Continent:",
    PopupMenu[
      Dynamic[selectedContinent], 
      Prepend[{"Africa", "Asia", "Europe", "North America", 
               "South America", "Australia", "Antarctica"}, "World"]
    ],

    Button["Analyze Vegetation",
      Module[{bbox},
        bbox = GeoBounds[Entity["Continent", selectedContinent]];
        img = GeoImage[bbox, GeoResolution -> "Medium"];

        If[img === Missing["NotAvailable"],
          CreateDialog[{"No satellite image available for this continent."}],

          greenMask = ColorDetect[img, "Green"];

          (* Set reference note per continent *)
          referenceNote = Style[
            Switch[selectedContinent,
              "Africa", "Reference: Africa ~60%",
              "Asia", "Reference: Asia ~55%",
              "Europe", "Reference: Europe ~40%",
              "North America", "Reference: North America ~45%",
              "South America", "Reference: South America ~70%",
              "Australia", "Reference: Australia ~20%",
              "Antarctica", "Reference: Mostly ice, very low vegetation",
              "World", "Reference: Global vegetation varies widely by region.",
              _, ""
            ],
            Italic, 14, Darker[Green]
          ];
        ]
      ]
    ],

    Dynamic[
      If[img =!= None && greenMask =!= None,
        Column[{
          HighlightImage[img, greenMask, ImageSize -> Large]
        }],
        ""
      ]
    ],

    Dynamic[
      If[referenceNote =!= "", referenceNote, ""]
    ]

  }],
  Background -> LightGreen,
  Spacings -> 2
],
FrameMargins -> 20,
Background -> LightGreen

] ]

Share this project:

Updates

Submission history