Investigate some Geographic and Reference materials from the UNBC Library
investigate how the postal code data was brought into a GIS TOP
The UNBC Library is great data store for Spatial Information, especially in regards to social science data from Statistics Canada. Use today’s tutorial to: become familiar with the library statistics and data content, the GIS lab’s spatial data holdings and give thought to where your interests may take you in this course. Use this information to develop questions for subsequent tutorials.
The data we collect today will be used in the labs on Tuesday and Thursday. Scott will demonstrate a variety of ways this information can be acquired, so take notes as this type of data acquisition may be useful for your projects. We will also learning how to connect to the GIS lab files server from the student labs, figuring out how to create your own workspaces on this server as well as seeing how the GIS lab Windows server (terminal server) can be accessed from anywhere you have internet access.
It should be mentioned that the student computer lab we are using for this tutorial has all of the software we need to arrange the data we are interested in for our use of the postal code conversion table. For instance there is a web browser and a spreadsheet program on all the student lab computers in the school. We could make use of these computers to illustrate the transportability of data across all sorts of computers. We also could connect to the GIS lab Terminal Server (just like we will in the GIS lab) – you decide what works for you.
For this tutorial we want to download the spreadsheet version of data. These data are essentially a comma delimited form of a text file that spreadsheets can import easily.
Connecting to the windows server for the GIS lab :
We will begin by clicking on the Remote Desktop Icon on your desktop. At home you would click start –> All program –> Accessories — > Communications –> remote Desktop Connections (the lab computers do not allow you to do so). This server is named osmotar.unbc.ca (or just osmotar if you are at the school) . Scott will show you how to connect to this server (take notes as this same procedure can be utilized from home).
Map a drive:
The drives we will be using for the course should be automatically mapped for you on osmotar. If you are a returning student, you may have some older drives still be referenced (such as the n drive for ninkasi). Once we are logged into the terminal server, we can connect to the network drive from the GIS file server (in our case gisfs2.unbc.ca – boring name unfortunately). If you are looking to map the drive from the computers in the student labs, you can do so in the following manner:
- start the command prompt – type cmd in the search box when you click on the start button
- type net use k: \\gisfs2.unbc.ca\yourusername /persistent:YES
This will give you the same k drive as you see on osmotar
Scott will illustrate this.
Create a directory :
Once we have a n: drive connected to /home on ninkasi, we will need to make a directory in your geog204 directory called tut1 (i.e. you will need a directory like Scott’s called n:emmonsgeog204tut1). Why would we create this directory, and what does windows call a directory?
Setting some environmental variables
This is a one time event that Scott will show you how to do. This sets your temporary files to ninkasi – rather than the university server.
Exercises 2: Data downloads
After creating the tut1 directory open up a web browser (CTS has supplied Internet explorer as the only browser on this system) and go to www.library.unbc.ca –> Collections –> Data and Statistics –> Canadian Data –> Canada Census Analyzer –> Enumeration Dissemnination Areas. We will use the data from 2006 (for reasons we will discuss in next weeks tutorial. This is the 2006 Cummulative link.
We are looking for data for Prince George, but there is no way to find these data for a specific city. Instead look for the data for the Fraser Fort George Regional Distrct. You should have something like this:
Next selec the total population:
and leave the rest as the defaults – then submit query.
You can see that the resultant query provides a text file made of three parts.The first group would be considered meta data. It could contain information that described who put the data together, when and how it was collected , what algorithms may have been applied to it or a descriptive index indicating what the tabular records equate to. These are just some of many possible meta descriptors. In the case of this file the header titles are described.
The second line is the header information for the file. As all values are separated by a space (or tab) you can see what the header columns will be once taken into a spreadsheet.
The third is the listings of all census data in Prince George (the raw data). We are going to clean up this data somewhat so it can be used in GIS Software.
We will also bring the data down in html format – much easier for working with, but Scott makes you do things the hard way first!
Save this file to your tut1 directory (if you used internet explorer you can click file –> save as –> your directory (as a text file)). If you are using firefox (what we in the lab tend to use mostly), you will have to copy the data and paste it into a separate program. This is done by opening wordpad first (programs –> accessories –> wordpad) then highlight all the data in the web page, copy (right click copy – or edit –> copy) then paste it into wordpad (right click paste or edit –> paste).
What would be the steps to obtain all the postal codes for B.C.?
Exercise 2: data cleanup
We have to clean up the data somewhat before it can be brought into QGIS. We will take two approaches: the first being a text editor, the second being a spreadsheet program. We are not actually doing that much to the data but it introduces two key pieces of software we will use in these tutorials.
Start the program wordpad programs –> accessories –> wordpad (or notepad++ – much better). Then open up the file you just downloaded. Use this software to remove the metadata, and properly locate the headers. Scott will illustrate. Once done save it (file –> save).
Start the program Excel and open this file in it. Scott will illustrate (TAKE NOTES). Once in excel, this data can be saved as a Dbase IV file (dbf) or as a text (CSV) file for easy import to QGIS. What are dbf files used for in QGIS? Don’t worry will be going over this during he course.
Exercise 3: Bring the data into a GIS, if you feel like it
You can now reload this file into a table in QGIS for joining to the Dissemintion Area boundary files we use in the lab.
As with the Linux OS in the GIS lab, you can access the GIS Terminal Server from windows. The most common way to access a terminal server is programs –> accessories –> communications –> remote desktop connection. Once you are connected go back to lab 1 to bring in the data.
You may find it useful to navigate around the UNBC library web site to see if there are any avenues that may help form a topic for your projects. Look for the type journal information that the library has access to as we will be checking this out after Gail Curry’s tutorial. We will also be looking at the spatial data we have on the GIS server.