Skip to main content
Home
  • Hours
  • Contact
Menu
Search this site

Ask A Librarian

Give Now

  • Search
  • About
  • Research & Teaching Support
  • Locations
  • News & Events
  • Using the Library
  • About the UCLA Library
  • About the Collections
  • Giving to UCLA Library
  • UCLA Homepage
  • Jobs @ UCLA Library
  • Social Media Directory

Data visualization and raster analysis with QGIS and R

At a Glance

  • 2021-2022 UCLA Library Impact Report
  • Schedule Source
  • is location open

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.

Contour map with purple lines and numbers overlaying it representing the elevation

Raster data analysis

Zonal statistics

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. 

Rasterize

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. 

Home

The UCLA Library creates a vibrant nexus of ideas, collections, expertise, and spaces in which users illuminate solutions for local and global challenges. We constantly evolve to advance UCLA’s research, education, and public service mission by empowering and inspiring communities of scholars and learners to discover, access, create, share, and preserve knowledge.

facebook social-link-twitter class= social-link-instagram class= social-link-youtube class=

  • About the UCLA Library
  • About the Collections
  • Giving to UCLA Library
  • UCLA Homepage
  • Jobs @ UCLA Library
  • Social Media Directory
  • © 2014–2021 UC Regents,
  • Creative Commons Attribution 4.0