Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Environmental Data Mapping | Real-World Geospatial Projects
Geospatial Analysis with Python

Environmental Data Mapping

Swipe to show menu

Environmental geospatial datasets play a crucial role in understanding and managing natural and urban environments. These datasets often include information about parks, rivers, green spaces, pollution sources, and other environmental features, each with attributes like location coordinates, type, area, and quality indicators. Analyzing such data allows you to identify patterns, monitor changes, and inform decision-making in urban planning, conservation, and public health.

However, working with environmental datasets can present challenges, such as:

  • Inconsistent attribute naming;
  • Varying coordinate reference systems;
  • Missing or outdated records.

Careful preprocessing and validation are essential for producing reliable and meaningful maps that accurately reflect the environmental situation.

123456789101112131415161718192021
import geopandas as gpd import matplotlib.pyplot as plt # Load parks (protected areas) and rivers datasets from valid GeoJSON URLs parks_url = "https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson" # Example: country boundaries as protected areas rivers_url = "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_10m_rivers_lake_centerlines.geojson" parks = gpd.read_file(parks_url) rivers = gpd.read_file(rivers_url) # Align both datasets to the same CRS (EPSG:4326) parks = parks.to_crs("EPSG:4326") rivers = rivers.to_crs("EPSG:4326") # Plot rivers as blue lines and parks as green polygons fig, ax = plt.subplots(figsize=(10, 6)) rivers.plot(ax=ax, color="blue", linewidth=1, label="Rivers") parks.plot(ax=ax, color="green", edgecolor="black", alpha=0.5, label="Parks") ax.set_title("Environmental Features: Parks and Rivers") ax.legend() plt.show()
Data loading
expand arrow

The code loads parks and rivers datasets from public GeoJSON URLs using geopandas.read_file.

CRS alignment
expand arrow

Both datasets are set to the same coordinate reference system (EPSG:4326) to ensure accurate overlay.

Plotting
expand arrow

The code uses matplotlib to plot rivers as blue lines and parks as green points on a single map, adding a title and legend for clarity.

question mark

Which of the following best describes a possible insight from overlaying parks and rivers on a single map?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 2

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Section 3. Chapter 2
some-alt