Foundations Of Geographic Information Systems Assignment Package
Week 5 – Assignment UPDATE – 2/1/2020
Our week 5 assignment has us serving as a GIS analyst with Boston’s department of community development. This department is responsible for assisting in project designed to enhance Boston’s sense of place and city branding, and to organize programs that drive citizen engagement. The community development manager has approached you with a new service initiative between the Boston Homeless Shelter, and some of the many coffee shops and vendors in the city. In this new outreach program, coffee shops will be offering free cups of coffee and day-shelter for homeless citizens in the community during particularly cold and snowy days. The manager has asked for a simple map he can attach to a flyer with dots marking the locations of participating coffee shops, and concentric rings marking 2-mile, 1-mile, and 0.5-mile radii around the Boston Homeless Shelter. He has provided you with a list of participating coffee shops that signed up for the program online, but the data isn’t ready for geoprocessing or mapping. Let’s use QGIS and Excel in concert to clean and visualize this data.
Attached Files: Boston_Homeless_Shelter.shp – Point shapefile of Boston Homeless Shelter Boston_Coffee_Shops – table of participating coffee shops Before beginning the exercise, be sure you are using a machine with access to QGIS. If you would like to download it on your personal computer for this exercise, check out the instructional video on Blackboard before completing the exercise. 1. Load plugins Let’s begin by opening QGIS and accessing some plug-ins that will help make this task easier. Recall that plug-ins are openly sourced tools and applications that operate within QGIS to perform analysis and data processing. Usually, these plug-ins are just python scripts that someone has coded, and shared with the GIS community. All for free! Remember, this is one of the chief advantages and disadvantages of QGIS. Lots of great plug-ins, but those plug-ins can easily become obsolete if not maintained and updated regularly by contributors. In the top ribbon of QGIS, select the Plugins dropdown and select Manage and Install Plugins…
A new window will appear showing you all of the different plug-ins QGIS has to offer. There are two we will need for this exercise. Begin by searching “HCMQGIS”. Select this plugin and click Install Plugin in the bottom right of the window. HCMQGIS offers a great suite of different basemaps of roads and landmarks, all with unique designs. This plug-in is maintained by the GIS administrator of Ho Chi Minh in Vietnam. Let’s all so search and download “MMQGIS”. This is a simple vector analysis plug-in that will allow us to draw concentric rings around the Boston Homeless Shelter. We will also use the MMQGIS plugin as our geocoder. It is important to note that 2. Data Cleaning/Preparation in Microsoft Excel Open up Boston_Coffee_Shops.csv. You will see that the data has some issues. All of the location information from the address has been parsed into separate columns, and the zip codes are not in the correct format. Let’s use some Excel functions to clean this up and get it ready for geocoding in QGIS. The geocoding tool in QGIS can handle a single column with address information.
Create a new column called Zip2 and use the concatenation above to add on a zero. Note that we can only use this function because all zip codes in Boston have leading zeros. If we were looking at a larger set of zip codes, we would need to use a conditional statement to separate zip codes with and without a leading zero for increased accuracy. Copy and paste this new column as a value in your original Zip field. You may then delete the Zip2 column. Create another new column called address. In this case we will use a more complex concatenation to create a complete address field. The geocode ingests addresses the same way that Google Maps or the U.S. Postal Service would (ie. ### Street Name). Don’t forget the space between the number and the street name.
Again, copy and paste your column as values to lock in each cell and get rid of the formula behind it. Then save your .csv file and return to the QGIS interface. 3. Add Layers in QGIS Just like ArcGIS, QGIS has plenty of basemap functionality. Most of the latest versions of the software come with preset basemaps. But the plug-in offered by HCMGIS is even better because it gives us a lot of options for some beautiful basemaps. In this case, we need to think carefully about the audience for our final map. The homeless population of Boston will be relying on this map to get to coffee shops when they need to, so emphasis on road networks is essential. Click on HCMGIS in the QGIS ribbon and hover over Basemap. Lets choose Google Maps or ESRI Street as our basemap.
Next, open the Data Source Manager and pull in the Boston_Homeless_Shelter shapefile. Right click the layer and select Zoom to Layer if the GIS does not zoom to the point automatically.
Finally, let’s add our .csv through the Data Source Manager, too.
Be sure that Attribute Table Only is selected in your parameters before uploading the file. Once the .csv is loaded into the GIS, we are ready to do some geocoding.
4. Geocoding So now we have a QGIS map open to the Boston area. We have added layers included the location of the Homeless Shelter as well as a list (csv file) of the coffee shops in the Boston Area. Now we need to geocode the coffee shops, so they will show up on the map. There are many ways to Geocode address. QGIS has several plugins to accomplish this work. Some plugins function correctly, and some don’t, but that is why it is free. GIS programs that cost money or have a subscription fee (ESRI) have geocoding tools that work and are a part of the program package. For this exercise, open the MMQGIS plugin by clicking on it. It should be in the top ribbon of the program interface. Select Geocode>Geocode CSV with Web Service.
In the subsequent popup window, put the coffee shop csv file as the input file. Make sure the csv field with the number and street name in the address field, and the city, and state are in their respected fields. Use the dropdown at the Web Service and choose OpenStreetMap – we use this because there is no requirement for an API Key.
Make sure the output File name has a good path as well as the Not Found Output List (this will list the address that could not be geocoded. Click Apply and let the geocoding begin. It may take a few minutes. Be Patient! The results should look similar to what is below. To save the geocoded file, be sure to export it as a shapefile back to your working folder, and rename it appropriately. Let’s also adjust the symbology to something that makes sense. You can use your judgement here. I used a Red star burst to mark the homeless shelter and a simple redish node to mark each coffee shop in Boston and layered these on top of the Google basemap. Yours should resemble this:
5. Geoprocessing Let’s now add those distance rings to our map. This last part of the exercise will be a nice segue into our material for next week in which we cover vector geoprocessing. Under the Vector option in the QGIS ribbon select MMQGIS > Create > Create Buffers. Use the following parameters.
Click Apply, and then repeat this procedure twice over, adjusting the Fixed Radius parameter to be 1 and 2, respectively. Adjust the symbology on your rings to have a higher opacity, or make them completely hollow. You may also add some coloring. We really need readers to be able to see the road network so it is not obstructed by polygons on the map. Your map should resemble what is below:
v 6. Prepare for Publication Open up a new print layout page in QGIS and take some time to prepare this map for printing and sharing. Your audience will not know what this is right away so you should include some text explaining that they can visit these coffee shops for a free cup of coffee and temporary shelter. Definitely add a legend and some text labels to your distance rings (buffers), and a north arrow and scale bar. Here is an example below, but you are always welcome to use your own discretion on style, fonts, colors etc. Just think carefully about making the map easy to digest, especially for someone who is not a geographer. You may use this example as a template to follow if you like. When you are finished, export the print layout as a .pdf file and submit to Blackboard for review.