Topics In Today’s Lab
Spatial Layers – a comparison of accuracy and precision.
This lab is a short lab that illustrates the problems that can occur from using data from poorly described sources. In other words we may have to guess at what has happened to the data from collection to our obtaining it – no meta data. We will look at the fit of data layers and make decisions as to the usage of the spatial layers in regards to attribute information.
Load up the layers in the /home/gislabs/tutlab5 directory (not the layers in the extras directories) except the dabc_stats layer, and manipulate the layers to have the best presentation. Lets turn off the ealatlong, ealatlong_walberta and bcmnppm layers (leaving only the prafil and bcboundline layers visible) and zoom into the B.C. Alberta border.
Checking out data
We will be talking more about the concepts of accuracy and precision in lecture and tutorial.
What is the level of accuracy of this layer in metres? If we were going to make changes to this layer, should we copy over the meta file and add what changes we make to the layer?
The projecton of your project should be set to World Geodetic System 1984 (4326), but if it is not – you can set the projection (a topic in the next tutorial) to 4326 (WGS84). This enables the use of the measuring tool (in order to determine the length of line segments in the BCbound layer). You can do this by:
Then we can set the units for measuring distances and areas on the map by:
These line segments should all be less than the accuracy description distances in the meta file.
Measure line segments of the prafil layer – how do they compare?
Question 1):This question is to be completed after the tutorial again this week.
Of the two layers, prafil and bcboundline, which appears to be more accurate? Does this view of the layers give any indication as to which layer is derived from more precise data (made from higher resolute data)?
Lets turn the ealatlong layer on. Where does this layer fit in regards to resolution (precision of methods used to create the data) with the other two layers?
Query building within and between layers
Removing unwanted features
From the techniques you have used so far, how could we solve the following problem. We have created BC data from a country wide EA data set (all ea units from Canada) producing the ealatlong_walberta.shp layer that was within or touching a polygon built from the bcboundline layer.
Test your memory: Can you remember how you could select all the polygons that intersect with the bcboundline layer? Try it – or better yet see if Aita can remember.
In the ealatlong_walberta we have EA polygons form BC as well as small units from Alberta (slivers) as a result of clipping layers. We are not too concerned that our geographic shape is that accurate, but we are more concerned about statistics performed on the data set will skew the results (as we do not want any data from Alberta in our analysis).
Question 2): Write out how you removed the Albertan polygons from the ealatlong_walberta without using your mouse to select any features.
HINTS:To fully complete the task you:
There are a couple of ways of doing this You can write out your steps to answer the question.
Using Join attributes by location to add comparative data to the Municipality layer
The point data layer (bcmnppn.shp) has population information that could be compared to data already downloaded from Stats Canada. Scott downloaded census information to match each EA and saved it to retrieve_census_96_ea_gis.csv. We will use the bcmnppn.shp layer to perform some joining and data comparisons with the EA layer.
Last week we performed some overlay functions between layers, and this week we are going to gain attribute data only from one layer and append it to another. The reason for this is to gain information from a polygon layer and add these data to a point layer that overlays these polygons (fly in the JELLO).
What function will join the attribute of one layer to another based on where it is spatially? Aita or Scott will illustrate if you cannot figure out how – but look at the following image to help out:
Now join retrieve_census_96_ea_gis.csv to the newly ceated layer (HINT notice the two different fields containing ea values). This will add statistical information to the ea and subsequent point layer. Why are the data for the EA units for 1996? We added the ability to joining census data to the municipality layer (bcmnppn.shp) to add supplementary data to the municipality. We could now summarize these point data based on the EA they fall in to compare populations information from stats can. We would have to sum all the values with similar EAUIDs and then join back to the Enumeration polygons. We had to do this because you cannot get attribute from a point layer, and add it directly to a polygon layer (as there could be more that one point (infinite possibilities actually) withing a polygon.
Question 3):There is method by which you can add the sum (or other mathematical functions) of attributes in a point layer (such as the population values held in the municipality layer) to a polygon layer. Determine how this can be done a write your steps for question 3.
More data cleaning
In your newly joined layer (municipality point layer) there are values for the Peace and Bukley electoral districts. The rest are empty because there were no data collected from stats can for these points. How can you easily remove the records (rows), and the attached geographic features (points), that have no values contained within them?
Load the dabc_stats layer into the project.
Question 4): Do a query to determine the polygons that employ 100 or more males for each age group. That is to say that if any polygon that employs 100 or more males for any age grouping will be included in this query. Write out your query expression and the number of polygons you selected.
One more practice piece
Make the dabc _stats layer active and turn off all the other layers.
Now query for da polygons that have a population greater than 1000 people (do you still need an illustration – just ask).
What is the age group (i.e. F15_19) and location of the polygon that employs the most females?
Which polygon has the largest number of employed females across all age groups?