Skip to content

python code to read and show shapefiles for analysis using geopandas and matplotlib

Notifications You must be signed in to change notification settings

salmanA1259/shapeFile_Reading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Islamabad Shapefile Visualization

This repository contains Python code for visualizing shapefiles related to Islamabad, utilizing geopandas and matplotlib libraries. The code reads and plots geographic data from multiple shapefiles, presenting them in a structured grid layout for easy analysis and comparison.

Code Overview

The Python script included (visualize_shapefiles.py) demonstrates how to:

  1. Load shapefiles from a specified directory.
  2. Create a grid of subplots to display individual shapefiles.
  3. Customize subplot appearance: setting titles, borders, and colors.
  4. Adjust aspect ratios for consistent visualization.

How to Use

  1. Requirements: Ensure geopandas, matplotlib, and their dependencies are installed.
  2. Shapefile Directory: Update the file path variable to point to your shapefile directory.
  3. Run the Code: Execute the script to visualize the Islamabad-related shapefiles.

Example Output

The generated visualization consists of a 4x2 grid of subplots, each showcasing a different aspect of the Islamabad geographical data. The resulting images provide insights into various geographic features and divisions within Islamabad.

Saving the Visualization

The script includes an option to save the combined plot as a PNG image for future reference or analysis.

Feel free to explore, modify, and utilize this code for visualizing geographic data related to Islamabad!

About

python code to read and show shapefiles for analysis using geopandas and matplotlib

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published