Making Simple Graphs with Pandas

Plotting a column of data in a csv file to make a graph is super simple with pandas, the popular Python library.   An example code is shown below: The line df = pd.read_csv(".../earthquakes1970-2014.csv") reads the data and stores it as a pandas dataframe object. The next line df.head() allows you to view several rows of … Continue reading Making Simple Graphs with Pandas

Advertisements

Displaying Rasters Using Rasterio

Single Band Images Rasterio is a popular open source Python library used for viewing and manipulating rasters.  With rasterio, viewing a raster can be done with just a few lines of code, like the example below.  Notice, we are using pyplot's imshow method to display the data. The argument src.read(1) means read the first band … Continue reading Displaying Rasters Using Rasterio

Displaying Shapefiles and Attribute Data Using GeoPandas

Displaying shapefiles in Python using the geopandas and matplotlib libraries is very easy, particularly when using Jupyter notebook. First, import the two libraries into Jupyter notebook, as shown below. import matplotlib.pyplot as plt import geopandas as gpd Next, read the shapefile and convert it into a geopandas dataframe object using the read_file command shown below.  … Continue reading Displaying Shapefiles and Attribute Data Using GeoPandas

Geography and Geographic Methods of Problem Solving

  Traditionally, geography has been a discipline primarily concerned with the location and description of places with the goal of providing people with comprehensive knowledge of the earth as the home of humans.  Today, geography still retains this locational and descriptive focus. However, in its modern form, a fundamental goal of the discipline is understanding … Continue reading Geography and Geographic Methods of Problem Solving

What else to do in Clusters Analyses?

I just read Geoffrey Jacquez's (2008) paper on “Spatial Cluster Analysis”. Chapter 22 In “The Handbook of Geographic Information Science”, S. Fotheringham and J. Wilson (Eds.). Blackwell Publishing, pages 395-416. I enjoyed reading the paper for the simple fact that it points to a broad range of considerations that should enter into mainstream cluster analysis … Continue reading What else to do in Clusters Analyses?