Data visualization and raster analysis with QGIS and R
Have questions about your research?
We can help!
Our center provides a series of GIS support to faculty, undergraduate and graduate students, as well as staff who need help. In most GIS related consultations, we use tools/software, such as QGIS and R studio, to do the mapping and data analysis. QGIS stands for Quantum Geographic Information Systems. It is a free and open-source desktop GIS application. R studio is an integrated development environment for R, a programming language. Both QGIS, R studio and R are free to the public. We take advantage of the open-source software to help our patrons solve their problems. The following are some examples of the service we provided.
Mapping contour lines
A contour line indicates equal elevation above a given level, such as mean sea level. A contour map reveals elevations and shows hills and valleys, representing a three-dimensional landscape within a two-dimensional space. One faculty member did research about historical ruins and needed to explore the geographic features of this area. For this project, we decided to make a contour map out of a Digital Elevation Model (DEM). Using the DEM data that was collected between 2006 to 2011, we created a contour map, shown below.
Raster data analysis
Zonal Statistics is a function that calculates statistical values for pixels of input raster inside certain zones, defined as a polygon layer (vector layer). Statistical values include minimum, maximum, sum, count, mean, standard deviation, number of unique values, range, and variance. This function is used to do descriptive statistics for each study, based on the input values of raster data.
An undergraduate student reached out to our center and seeked help to analyze the average and maximum concentration of PM2.5 within each census tract after fires in California. The data included the raster data of the concentration of PM2.5 and the boundaries of census tracts. Zonal Statistics analyzed the data and calculated a variety of descriptive statistics which consisted of the average and the maximum.
When dealing with a large volume of data, especially raster data, people find that R packages are efficient and convenient, given the dynamic and fast updated R community. The Raster package in R is a powerful package that aims to do raster analysis. Among multiple functions within the Raster package, the rasterize function is used to convert vector data (points, lines, and polygons) to raster data, while keeping selected attributes from the vector data.
A graduate student from the Institute of the Environment and Sustainability seeked help from our center to rasterize shapefiles using R. The vector data she had contained the Los Angeles River catchment area, Los Angeles river and streams, and census tracts. She aimed to rasterize this data and overlay it with the urban heat island data (Raster data) to investigate whether the river and the trees along the river reduced the urban heat island. Given the large volume of data and the repeated procedures, we rasterized the vector data and analyzed the converted raster in a loop.
These cases are examples of how our center has helped our community solve research problems using geospatial techniques. In addition to consulting, our center offers geospatial workshops regularly. Want to know more about the workshop? Please check out the Events page at the Data Science Center. Seeking help with geospatial problems? Feel free to make an appointment with our center.