Please use these guidlines to create 2 mapson qgis, send screenshots of the maps and the joined table.
QGIS Assignment Instructions:
PercentofEligible2019 Demographics (table) Percent of eligible
population that is
registered to vote
SUM_VOTERS VotingDistricts Registered voters
SLDLST WashingtonStateLegislature State Legislature District
C_DISTRICT SeattleCityCouncil Seattle City Council
District
kccdst KingCountyCouncil King County Council
District
All data from the US Census Bureau, the City of Seattle, or the King County Board
of Elections. All data from 2019.
b. Like Lab 6, this lab includes a series of questions scattered throughout the lab
(the first of which are below). Take a few minutes to find the answers to the
questions below. Make note of your answers as you’ll submit them, along with
your map, in the Lab 7 Submission Portal.
Question 1:
What is the name of the eastern-most ballot dropbox in King County?
HINT: Use the identify tool, to see the data associated with any feature.
a. Issaquah City Hall Ballot Drop Box
b. Vashon Library Ballot Drop Box
c. North Bend Library Ballot Drop Box
d. Garfield Community Center Ballot Drop Box
e. Snoqualmie Library Ballot Drop Box
Question 2:
What shapefile can we join our tables to given the data they contain and the unique
identifiers available?
a. VotingDistricts
b. CensusTracts
c. SeattleCityCouncil
d. KingCountyCouncil
e. WashingtonStateLegislature
3. Using your answer above, join the table to the appropriate shapefile. Take a screenshot
of your successfully joined tables.
GEOG 360: GIS & Mapping
Question 3:
Upload a screenshot of your joined table (Demographics table, joined to the census tracts
shapefile).
Question 4:
How many people in Census Tract 1 (GeoID: 53033000100) identify as of two or more races?
a. 0
b. 260
c. 575
d. 756
Question 5:
What percent of eligible people in Census Tract 14 (GeoID: 53033001400) are registered to
vote?
a. 0.71 (71%)
b. 0.83 (83%)
c. 0.87 (87%)
d. 0.91 (91%)
4. First, let’s learn how to query data.
a. We will start with an
attribute query. Let’s select
all of the census tracts
where less than 50% (.50) of
people eligible to vote are
registered. To do this click
on the ‘Select Features Using an Expression’ button (see image above).
NOTE: If you don’t see the selection/query tools in your toolbar, right click on any
blank area in the toolbar part of your screen and check the box next to ‘Selection
Toolbar.’
b. You should see a ‘Select by Expression’ pop-up window. In the Expression
window, we will write an expression to select or query all of the census tracts
where less than 50 percent of eligible voters are registered. We can use the
following expression:
Demographics_PercentofEligible2019 < 0.5
GEOG 360: GIS & Mapping
When you have entered the above expression, click Select Features.
NOTE: When you start typing the name of the column, QGIS will start giving you
a list of options. A bug prevents you from simply clicking on the option you want,
but you can use the up and down arrow keys on your keyboard to navigate to the
one you are interested in and then click enter to select it.
c. You should see 12 features selected. They will light up in yellow on the map and
simultaneously in blue in the attribute table.
NOTE: You can clear the
selection using the
‘Deselect Features from All
Layers’ button (see image
to the right).
d. We can also use an
attribute query to find a specific record. Say, we want to examine the census
tract that is home to the UW’s Seattle campus. The UW campus is in Census
Tract 53.02 (GEOID: 53033005302). Use the ‘Select Features Using an
Expression’ button with the expression below to select the census tract that
houses the UW.
GEOID = 53033005302
Scroll through the attribute table to find the selected record and use it to answer
the questions below. Alternatively, you can use the identify tool to click on the
selected features on the map and use the results to answer the questions below.
Question 6:
Are there more males or more females living in Census Tract 53.02?
a. There are more males.
b. There are more females.
c. There are the same number of males and females.
Question 7:
How many people aged 65 or older live in Census Tract 53.02?
a. 0
b. 105
c. 378
d. 1467
GEOG 360: GIS & Mapping
5. Now let’s try a spatial query.
a. Let’s examine which ballot drop boxes are within the City of Seattle. Our
SeattleCityCouncil layer is of city council districts so matches up perfectly with
the boundaries of the city, so we can use that.
b. Click the ‘Select by Location’ button to bring up a pop-up window. There we are
going to set it to select features from ‘Dropboxes’ where the features ‘are
within’ ‘SeattleCityCouncil.’ While we won’t be adjusting using this option now,
note that there is a box we can select to only compare our first layer (the one
being selected) with features that have been selected in the second layer (the
one we are comparing the features with). We also have the option to either
create a new selection, add to the current selection, select from the current
selection, or remove from the current selection. For now, let’s keep this set to
“creating new selection.” When your pop-up window looks like the image
below, click Run.
c. Examine the resulting selection.
GEOG 360: GIS & Mapping
Question 8:
How many ballot dropboxes are within the City of Seattle?
HINT: You can count them up on the map or you can open the attribute table where at the top
it will tell you the total number of features and the number that are selected.
a. 0
b. 15
c. 23
d. 31
e. 36
6. Using what you have learned about queries, answer the following questions:
Question 9:
How many ballot dropboxes are in King County Council District 3?
a. 8
b. 10
c. 12
d. 14
Question 10:
How many census tracts have more than 1000 people who identify as Chinese?
a. 16
b. 26
c. 36
d. 46
Question 11:
How many ballot dropboxes are in census tracts that have more than 1000 people who
identify as Chinese?
a. 0
b. 3
c. 6
d. 9
GEOG 360: GIS & Mapping
7. Now, let’s make some buffers.
a. We will start by making a buffer showing us the area that is within one mile of a
ballot dropbox site. To do this, click on Vector in the topmost menu bar. Select
‘Geoprocessing Tools’ and then ‘Buffer.’ This will open a pop-up window.
b. For the ‘Input layer’ we want to select whatever it is we want to draw a buffer
around. In our case, this is the Dropboxes layer.
c. Next, we want to set the distance to 1 mile.
d. Next, we want to check the box to dissolve the results (this just means that in
areas where dropboxes are within a mile of one another, instead of producing
unique overlapping circles around our points, those circles will be merged
together).
e. Finally, we want to click on the ... button at the end of the line that says [Create
temporary layer] and tell QGIS where to save the resulting buffer.
f. When your pop-up menu looks like the one below, click ‘Run.’
GEOG 360: GIS & Mapping
g. When it is done, click close to return to your map.
8. Use what you have learned to create a map showing the parts of King County that are 1,
2, 3, 4, and 5 miles from the nearest ballot dropbox.
Question 12:
MAP 1: Make a map that uses concentric buffers to show the parts of King County that are
within 1, 2, 3, 4, and 5 miles from the nearest ballot dropbox.
9. Finally, let’s explore our overlay tools.
a. Remember that the most commonly used overlays are union, intersect, clip and
erase/difference. You may have noticed that these tools are next to the Buffer
tool in the Vector Geoprocessing Tools menu.
b. Let’s start with an intersect. Say we want to know how many voting districts
have a ballot dropbox within one mile of (at least somewhere within) the district.
We can use an intersect and then look at how many features there are in the
resulting layer.
c. Go to Vector Geoprocessing Tools Intersection.
d. Choose the one mile buffer layer you created and the VotingDistricts layer as the
input and overlay layers (order doesn’t matter).
e. Tell QGIS where to save the output file.
f. Everything else can stay the same, but note that we have the option to only
include some of the fields (columns) from the attribute table of each layer. Also
note that we can choose only the selected features in either layer if we have
features selected from a query. While we don’t want to do this now, this is a
useful way to tie together different analytical operations.
g. Click Run.
h. When the intersect is complete, click close and examine the results.
i. If you open the attribute table, we can easily see the total number of features at
the top of the table. That is how many districts have at least somewhere within
the district that is within a mile of a ballot drop box.
GEOG 360: GIS & Mapping
Question 13:
How many voting districts are within a mile of a ballot dropbox?
e. 392
f. 763
g. 1251
h. 1712
10. We can also use the intersect tool to help us focus in on the city of Seattle.
a. Use the intersect tool to intersect the voting districts and Seattle City Council
districts. This will return a layer that only includes voting districts in the City of
Seattle and that includes the council district as a column in the attribute table.
b. Take a screenshot of the new intersected layer of your map.
Question 14:
Upload a screenshot of the new intersected layer of your map (Voting Districts intersected
with Seattle City Council Districts).
11. Now let’s consider whether minority status affects the likelihood of someone living
within walking distance of a ballot dropbox. Let’s say that walking distance is one mile.
a. To do this, we first need to estimate how many registered voters in each census
tract are minorities. This is a little more complicated than it initially looks as the
data we have about race is all people of that race, not just those registered to
vote. So, we will need to make some calculations.
b. First, let’s figure out what percentage of all people in the census tract are
minorities. While we can do this by adding up the minority categories, it is easier
to just look at what percentage of the population is White and subtract that from
100% (or 1). Use the Field Calculator (with field type decimal) and the following
formula to determine what percentage of people in that census tract are
minorities:
1 - (Demographics_WhiteOnly/Demographics_TotalPop)
c. Now, we need to figure out what percentage of the population is eligible to vote.
Use the Field Calculator (with field type decimal) and the following formula to
determine what percentage of people are eligible to vote:
GEOG 360: GIS & Mapping
Demographics_EligibleVote/Demographics_TotalPop
d. Now, we can tie our different percentages together. Again, in Field Calculator
(this time with with field type integer) and the following formula we can
estimate how many minority registered voters there are in each census tract.
Demographics_TotalPop * PercentMinority * PercentEligible *
Demographics_PercentofEligible2019
In the above formula PercentMinority is the percent of the population that is a
racial minority (whatever column you calculated in step 11b above). And
PercentEligible is the percent of the population that is eligible to vote (whatever
column you calculated in step 11c above).
e. Now that we have a column of the estimated number of minority voters, we can
use that to create a dot density layer of minority voters. You’ve done this before
for the sake of visualizing data. Here, we are doing it to analyze data.
f. Go to Vector Research Tools Random Points in Polygons...
g. Set the Input polygon layer as Census Tracts.
h. Click on the button at the right side of the ‘Number of points for each feature
line’ and select Assistant (see image below).
GEOG 360: GIS & Mapping
i. In the assistant menu, select your Minority Voters category and use the refresh
button to find the value range. For the output, make sure that your output
range encompasses that range (i.e. change the output values to match the input
values above.
j. Now use the blue arrow at the top of the assistant menu to go back to the
original pop-up window (Random Points in Polygons). Where it says [Create
temporary layer] tell QGIS where to save your file and then click ‘Run.’
k. This may take a couple minutes. Click the Close button when the operation
finishes.
l. There will be more points that we can reasonably see and that is totally fine.
Here, the point isn’t to demonstrate anything visually, but to perform an
analysis.
GEOG 360: GIS & Mapping
m. Now, let’s do that analysis—we want to know what percentage of the points are
within one mile of the ballot drop boxes. Use the Selection tool to select all
points within the 1-mile buffer.
n. Use that selection to answer the following question
Question 15:
Approximately how many minority voters live within one mile of a ballot dropbox?
NOTE: These are approximate values because as the points are random, there will be some
variation in your results.
a. ~90,000 people (or about 23%)
b. ~120,000 people (or about 30%)
c. ~155,000 people (or about 39%)
d. ~190,000 people (or about 49%)
For your own interest, about 44% of all voters in King County live within 1 mile of
a ballot drop box.
Now, we just did that using a spatial query, but we could also use a clip or
intersect if we wanted to make our selection permanent.
12. Finally, use what you have learned and the data available to make a map that answers a
question of your choice about the placement of ballot dropboxes. Be sure that your
map includes the research question you have chosen to answer and a short paragraph
explaining how you answered it. In making the map please use at least one of the
spatial analysis operations introduced in this lab.
Your question can relate to race, gender, ethnicity, elderly status, city, county, or state
council/legislature districts, or any other piece of data available to you. You may find it
helpful to write out the steps you need to take or draw a diagram.
Question 16:
MAP 2: Make a map that answers a question of your choice using the data available. Be sure
that you use at least one spatial analysis operation in the process. Your map should include
the research question (this can be in the title or in a text box) as well as a text box with a
short explanation of what you did.