Learning Goal:I’m working on a r multi-part question and need the explanation and answer to help me learn.
Exercise 2: Mapping Disease Ecology with
Data: Zipped data file from Intro to QGIS tutorialDownload Zipped data file from Intro to QGIS tutorial
Downloadable Copy of this Assignment
Actions
Learning Objectives:
- Use data to produce maps in QGIS
- Use proxy data to make a claim about the disease ecology of malaria
- Consider the choices cartographers make when creating a map
- Practice putting map elements together to make a cohesive argument through a map
Description:
Students are expected to complete three exercises over the course of the quarter. This is the second of those. In this exercise, students are introduced to data manipulation and mapping in QGIS. QGIS is an open-source GIS mapping and spatial analysis platform with growing usage around the world.
This exercise uses proxy data about the climactic and environmental conditions associated with malaria and other parasitic diseases to predict disease risk in Kenya. Effectively, we are building a disease ecology model and using it to map expected risk of infections. Because we are dealing with environmental proxies, we will be working primarily with raster data. This exercise follows the QGIS tutorial introduced in section on October 26th which was designed to illustrate how we can construct ecological models to predict disease and give you some introductory skills in QGIS such that you can use it to both produce maps and conduct spatial analysis.
This exercise is worth 10% of your course grade and will be graded out of 10 points.
Instructions:
Using the QGIS tutorial introduced in section on Thursday, October 26th and available at
https://canvas.uw.edu/courses/1666622/pages/intro-to-qgis-tutorial
, answer the questions that follow. After you have made your two maps (one each in response to the two questions below), you are asked to reflect on the experience following the prompt.
Question 1: In the Intro to QGIS tutorial, we walked through modeling year-round malaria risk in Kenya. In that model, we simply looked at whether malaria was present or absent, but of course even in areas where malaria is found, it isn’t necessarily found in the same amount. You are now being tasked with making a map of malaria risk in Kenya in May, showing areas of high, medium, low, and no risk. You’ll need to use all of the exclusionary factors identified in the introductory tutorial (elevation, humidity, and temperature) to identify areas of no risk. Remember that the mosquitoes that carry malaria:
- Live in areas that are below 1500m in elevationAre active when temperatures are between 21 and 32°C (NOTE: when assessing year-round risk, we only excluded areas that were too hot or too cold all year round. Since we are now looking at a specific month and assessing how active mosquitoes are in that month, we can exclude areas that are too hot or too cold during the month of May using the maximum and minimum May temperatures.)Can reproduce if humidity is above 60%
Because mosquitoes breed faster and thus bite more at higher temperatures (as long as it isn’t too hot!), you’ll then use the following temperature ranges to assess malaria risk:
- High risk: average monthly temp >28Medium risk: average monthly temp 25-27.9Low risk: average monthly temp <24.9
Note: this intentionally requires you to think about how you can use Raster Calculator to create three different risk bands. If you get stuck, feel free to ask for help, but please try to think it through for at least a couple minutes on your own first. You’ll also need to think about how to symbolize your final map as you have a couple of different options depending on how you created your risk bands. Ultimately, it is up to you how you make your map, but you will be assessed on whether the bands are correct and on how clearly your map conveys the information. As you work, make note of the choices you are making to include in your reflection (see below).
Question 2: Another disease that is common in Kenya are intestinal parasites. One type of these parasites, nematodes, move through the soil during parts of their lifecycle so require particular climactic conditions to become endemic in a region. First, they are temperature sensitive and require temperatures between 15 and 25 degrees Celsius to survive (Remember that like mosquitoes, since they have a relatively short lifecycle, there are places where they will be endemic during parts of the year, even if it is too hot or cold during other parts of the year). Second, they require 6% or more soil moisture which is found in places with at least 65% humidity. Given these two constraints, construct a binary (risk / no risk) map of where in Kenya nematode infection is likely to be endemic. Once again, it is up to you how you make your map, but you will be assessed on whether the information it communicates is correct and on how clearly your map conveys the information. As you work, make note of the choices you are making to include in your reflection (see below).
Question 3: Finally, please write a reflection (250 – 400 words) that considers:
- What choices did you make as a cartographer?Why / how did you make them?How did the technology you were using (QGIS, raster data) constrain or support those choices?What impact did the choices you made and the technology and data you used have on the story your maps tell?
Note: please do not simply copy and paste your reflection from Exercise 1 here and change R to QGIS. We will be looking for your reflection to be specific to this technology and these maps. If you wish, you are welcome to compare the choices you made here to those you made in Exercise 1.
GEOG 381: Maps & Health
Autumn 2023
Intro to QGIS Tutorial
Description:
This tutorial introduces students to mapping, data manipulation, and basic spatial analysis in
QGIS. QGIS is an open-source GIS mapping and spatial analysis platform with growing usage
around the world.
This tutorial uses proxy data about the climactic and environmental conditions associated with
malaria to predict malaria risk in Kenya. Effectively, we are building a disease ecology model
and using it to map expected malaria risk. This exercise is designed to illustrate how we can
construct ecological models to predict disease and give you some introductory skills in QGIS
such that you can use it to both produce maps and conduct spatial analysis. You will use the
skills you learn in this tutorial to complete Exercise 2.
Directions:
1. Go to www.qgis.org and download QGIS.
a. Click the “Download Now” button to see the most recent versions of QGIS
available for your device.
b. The website should be able to tell what type of device you are on, but if not, click
on the appropriate tab in the download page (Download for Windows, Download
for macOS, etc.) that pops up.
c. You will have the option of the “Latest release” (3.30) in a big green button or,
underneath, the “Long term release” (3.28). Please download Version 3.28 (the
long term release) as it is more stable and should cause less issues than the latest
version which is less tested.
NOTE: If you prefer to use the CSDE terminal servers, they already have QGIS installed on
them.
d. The download may take a few minutes.
e. Once downloaded, click to install and follow the prompts on your computer. You
may have to install a couple packages (that will all download together) in order to
get it to work.
f. Trouble shoot the Security and Privacy settings.
1. Try opening QGIS.
2. On a Mac, you will likely get a message that says, “QGIS3.28” can’t
be opened because Apple cannot check it for malicious software.” This
is because your computer does not recognize the developer.
3. Go to the System Preferences on the Desktop. It is generally accessed
through the apple icon in top left corner of your screen.
4. Select the “Security and Privacy” subsection.
5. If the little lock icon is “locked,” you will have to click it to unlock it
so that you can make changes.
6. Select the “Open Anyway” button next to the sentence that says,
““QGIS3.28” was blocked from use because it is not from an
identified developer.”
7. Now, you should be ready to open QGIS 3.28. Your computer will one
more time ask you if you want to open the program. Select “Open.”
2. Download your data.
a. All of the data associated with this tutorial can be found in a zipped file on
Canvas.
b. Download the zipped file and then unzip it on your computer. Put all contents of
that unzipped folder into a single folder where you will save all of your material
associated with your lab. I highly recommend saving all of your work and data in
a single folder for this class (you can have subfolders within that if you like) so
that if you need to move to a different computer, you can simply move the whole
folder together. This can be the same folder you used as your Working Directory
in Exercise 1 in R. Depending on your computer, you may be able to unzip
directly into your folder or you may have to click and drag stuff over.
c. Recall that shapefiles contain multiple files that all have important information for
the GIS program to be able to read and depict them. As such, be sure that you
keep each of the component files together.
3. Open QGIS.
a. When you open it, click “New Empty Project” in the pop-up or go to Project in
the top menu bar and select “New Project.”
b. You will notice that the screen that first appears has a number of boxes and
toolbars. The largest box is your mapping window. On the left-hand side there is
also a Browser box and a Layers box.
c. Check out what is there. You can hover over a tool with your mouse and it will
tell you what it is. As you become more familiar with it, you will learn what the
important tool symbols are.
4. Save your file.
a. Like in other GIS platforms, map files must be saved in the same relative position
to the data you are using. Please save your map in the folder with your data for
this tutorial.
b. To save your file, click “Project” in the top menu bar and select ‘Save As.’ Give
it a name and save it in your class folder.
c. In the future, if you want to open that file, you would click “Project” and then
“Open” and navigate to the file you wish to work on.
5. Import your data into QGIS.
a. In the Browser window, navigate to your class folder and find the shapefile you
want to add. (Alternatively, you can click “Layer” from the top menu bar, then
click “Add Layer” and then click “Add Vector Layer”.)
b. Navigate to the Kenya.shp shapefile (shapefiles end with .shp) and click “Open”
or double click on it. You should now see an image of a map in your mapping
window. This is a shapefile simply showing the boundaries of the country.
c. Then we will add elevation data which is a raster file, so you can either drag the
elevation.tif raster into your Browser window or go to “Layer,” “Add Layer,” and
then click “Add Raster Layer”).
6. First, let’s consider elevation. The mosquitoes that carry malaria cannot survive above
1500m. So, let’s figure out which areas of Kenya are below 1500m as those are the only
areas at risk.
a. We have a .tif file showing elevation globally (elevation). Since we are only
interested in Kenya, let’s shrink our file to only show Kenya. This will make
future calculations faster as we will be working with a smaller dataset.
b. To do this, have the
elevation file selected (in
your Layers window it
will be highlighted in
blue), and select Raster
from the menu bar at the
top of your screen, then
Extraction, then Clip by
Mask Layer….
c. Your input layer should
be elevation (this is the layer you are clipping). Your mask layer should be Kenya
(this is the layer you are clipping it to). By default, “Match the extent of the
clipped raster to the extent of the mask layer” should be selected (if it is not,
please check the box next to it).
d. If you scroll down in the clip window, you will see that the default is to “Save to
Temporary File” under “Clipped (mask).” Click on the … at the end of that line,
select “Save to File,” and save the resulting clip to your class folder.
e. Be sure “Open output file after running algorithm is selected. Then click “Run.”
f. You should now see your new elevation layer only showing Kenya. You can turn
off the other layers by unchecking the boxes next to them in the Layers window.
g. Now we want to figure out which parts of Kenya are below 1500m in elevation.
To do this, we want to be sure that our new Kenyan elevation layer is selected (it
should appear highlighted in blue in your Layers window) and then we want to
select Raster from the menu at the top of your screen, and then Raster Calculator.
h. In the pop-up window, start by writing your expression. You’ll want to double
click on your Kenyan elevation layer from the list of Raster Bands in the top left
corner. Then click on the less than symbol (