test post
Urban Heat Islands (UHI) are metropolitan areas that are significantly warmer than their surrounding rural areas. This analysis explores how building density, green spaces, and surface materials contribute to temperature variations across the city.
Analysis
Click markers on the map or scroll through the annotations below
Downtown Core - Highest Temperatures
The central business district shows temperatures 5-8°F higher than surrounding areas. Dense high-rise buildings trap heat, dark roofing absorbs solar radiation, and limited vegetation reduces natural cooling through evapotranspiration.
Industrial Zone - Secondary Heat Source
Large warehouse roofs, parking lots, and industrial processes create another significant heat pocket. The lack of tree canopy and prevalence of impervious surfaces contribute to elevated temperatures.
Residential with Tree Cover - Cooling Effect
Neighborhoods with mature tree canopy show temperatures 3-4°F cooler than similar density areas without trees. This demonstrates the measurable cooling impact of urban forestry initiatives.
Park and Green Space - Urban Oasis
The large urban park creates a distinct cool zone, with temperatures matching rural baselines. This 'park cool island' effect extends into adjacent neighborhoods, providing cooling benefits beyond park boundaries.
Code
urban_heat_analysis.pyimport rasterio
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
import geopandas as gpd
# Load Landsat 8 thermal band data
with rasterio.open('landsat_band10.tif') as src:
thermal = src.read(1)
transform = src.transform
crs = src.crs
# Convert digital numbers to brightness temperature (Kelvin)
ML = 0.0003342 # Band-specific multiplicative factor
AL = 0.1 # Band-specific additive factor
K1 = 774.8853 # Thermal constant 1
K2 = 1321.0789 # Thermal constant 2
# Calculate Top of Atmosphere radiance
radiance = ML * thermal + AL
# Convert to brightness temperature
bt_kelvin = K2 / np.log((K1 / radiance) + 1)
bt_celsius = bt_kelvin - 273.15
bt_fahrenheit = (bt_celsius * 9/5) + 32
# Create custom colormap (cool to hot)
colors = ['#313695', '#4575b4', '#74add1', '#abd9e9',
'#fee090', '#fdae61', '#f46d43', '#d73027']
cmap = LinearSegmentedColormap.from_list('heat', colors)
# Plot the heat map
fig, ax = plt.subplots(figsize=(12, 10))
im = ax.imshow(bt_fahrenheit, cmap=cmap, vmin=70, vmax=105)
# Add colorbar
cbar = plt.colorbar(im, ax=ax, label='Surface Temperature (°F)')
# Add city boundary overlay
city_boundary = gpd.read_file('city_boundary.geojson')
city_boundary.boundary.plot(ax=ax, color='white', linewidth=2)
ax.set_title('Urban Heat Island Analysis', fontsize=16)
ax.axis('off')
plt.tight_layout()
plt.savefig('urban-heat-map.png', dpi=300, bbox_inches='tight')
plt.show()Conclusion
This analysis reveals the stark temperature disparities within urban environments. Strategic interventions like increasing tree canopy, implementing cool roof policies, and expanding green infrastructure can significantly reduce urban heat island effects, improving public health outcomes and reducing energy consumption for cooling.