!pip install pyshp
import shapefile
Vector
Vector data is best described as graphical representations of the real world. There are three main types of vector data: points, lines, and polygons. Connecting points create lines, and connecting lines that create an enclosed area create polygons. Vectors are best used to present generalizations of objects or features on the Earth’s surface. Vector data and the file format known as shapefiles (.shp) are sometimes used interchangeably since vector data is most often stored in .shp files.
Raster
Raster data is data that is presented in a grid of pixels. Each pixel within a raster has a value, whether it be a colour or unit of measurement, to communicate information about the element in question. Rasters typically refer to imagery. However, in the spatial world, this may specifically refer to orthoimagery which are photos taken from satellites or other aerial devices. Raster data quality varies depending on resolution and your task at hand.