Visualizing GLOBE Hotspots#
import numpy as np
import pandas as pd
import geopandas as gpd
import seaborn as sns
import matplotlib.pyplot as plt
import folium
from folium.plugins import HeatMap
mosquito = gpd.read_file('https://github.com/geo-di-lab/emerge-lessons/raw/refs/heads/main/docs/data/globe_mosquito.zip')
land_cover = gpd.read_file('https://github.com/geo-di-lab/emerge-lessons/raw/refs/heads/main/docs/data/globe_land_cover.zip')
Create a heatmap of GLOBE Mosquito Mapper data using the Python library Folium. The heatmap groups points that are close together, allowing us to see general patterns in the distribution of the citizen science observations submitted to NASA. Note that a “heatmap” does not necessarily refer to a map showing temperature data; rather, it is a map that shows “hot” areas where there are a lot of points.
# Create empty map zoomed to Florida
map = folium.Map(location=[28.263363, -83.497652], tiles="Cartodb dark_matter", zoom_start=7)
# Add mosquito heatmap
heat_data = [[point.xy[1][0], point.xy[0][0]] for point in mosquito.geometry]
HeatMap(heat_data).add_to(map)
display(map)
Make this Notebook Trusted to load map: File -> Trust Notebook
Create a heatmap of GLOBE Land Cover data.
# Create empty map zoomed to Florida
map = folium.Map(location=[28.263363, -83.497652], tiles="Cartodb dark_matter", zoom_start=7)
# Add land cover heatmap
heat_data = [[point.xy[1][0], point.xy[0][0]] for point in land_cover.geometry]
HeatMap(heat_data).add_to(map)
display(map)
Make this Notebook Trusted to load map: File -> Trust Notebook
References