-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEx6.Rmd
433 lines (286 loc) · 39.2 KB
/
Ex6.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
---
title: "Exercise 6: Creating Point Data <br><small>Geographic Information Systems 1 Lab</small></br>"
author: "GEOG 3150"
output:
html_notebook:
df_print: paged
rows.print: 10
theme: cosmo
highlight: breezedark
number_sections: yes
toc: yes
toc_float:
collapsed: no
smooth_scroll: yes
pdf_document: default
html_document:
toc: yes
df_print: paged
editor_options:
chunk_output_type: inline
mode: gfm
---
```{=html}
<style type="text/css">
h1.title {
font-size: 40px;
font-family: "Times New Roman", Times, serif;
color: DarkBlue;
text-align: center;
}
h4.author { /* Header 4 - and the author and data headers use this too */
font-size: 20px;
font-family: "Times New Roman", Times, serif;
color: DarkBlue;
text-align: center;
}
.zoom {
transform-origin: 40% 50% 0;
transition: transform .2s;
margin: 0 auto;
}
.zoom img{
width:auto;
height:auto;
}
.zoom:hover {
transform: scale(2);
}
th, td {padding: 5px;}
</style>
```
<hr></hr>
The purpose of this exercise is to teach methods of creating point data for display in various programs. These skills will help you understand the foundation of point data, creation of new point datasets, and editing attribute tables.
# The Introduction
A recent survey was sent to new students at APSU to determine what information they felt was missing in their new student orientation packets. One of the most common responses was that while there is enough dining options on campus, the students were not always aware of where certain options were located. Additionally, students were also interested in dining options were located close to campus. So the [APSU Dining Services](https://www.apsu.edu/dining/index.php) director has asked you to develop a map specific to dining locations in and around campus. On this map the director would like to see the name of each point, a way to determine if it is part of Dining Services or an off-campus location (think about symbology), and some method of listing their hours of operation. They provided a list of campus dining locations and convenience stores [here](https://dineoncampus.com/apsu/hours-of-operation). Off campus dining should be within walking distance (~1mi). A dataset for this has been developed by obtaining location information from [other sources](https://www.google.com/search?rlz=1C1GCEU_enUS880US880&tbs=lf:1,lf_ui:9&tbm=lcl&sxsrf=AOaemvIjLEw11Ti6yVkpO2bynAOhhlsQMA:1631811609395&q=dining+near+me&rflfq=1&num=10&ved=2ahUKEwjOs8X6-4PzAhWmSPEDHU7vCjUQtgN6BAgMEAc#rlfi=hd:;si:;mv:[[36.54333655278211,-87.33321681176771],[36.517956229819426,-87.37012400781263],null,[36.530647432362045,-87.35167040979017],15]). However, if there is missing information from this list you should feel free to append the data.
In this exercise you will:
- Learn to create point data
- Work with external datasets that contain x,y data
- Edit and add information to the attribute table
- Optionally work to:
- Develop multi-part symbology
- Add tables to a map
Software specific directions can be found for each step below. Please submit the answer to the questions and your final map by the due date.
## Step One: The Data
You will need to use aerial imagery for this exercise in order to identify the dining locations on and off campus. The information contained in the link in the introduction should provide you all of the basic information. Adding Montgomery County or the county/state datasets for Tennessee from previous exercises might help to provide location information but is not necessarily required.
<details>
<summary><big>View Directions in <b> [ArcGIS Pro]{style="color:#ff4500"} </b></big></summary>
After creating your project folder for this exercise, begin by going to _Map Tab > Basemap > Imagery_ to change the basemap applied to the project to a satellite image of North America.
<p align="center"><div class="zoom"><img src= "Images/arcgis-imagery-basemap.png" alt="Add Imagery Basemap" style="width:100%"></div></p>
With this imagery now set as your basemap, you need to create a new dataset to store the point data you will create for this exercise. To do this you should navigate to the _View Tab_ and click on the _Catalog Pane_. This will open a new pane to the right of the screen with a series of folders and drop-down menus. Use the drop-down next to **Folders** to view the folder you created for this exercise. Next, right-click on that folder and click _New > Shapefile_. This will open a new **Create Feature Class** pane where you will provide the following information and click Run:
- Feature Class Location = Make sure it is directed to your project folder
- Feature Class Name = Give your new shapefile a name like _on_campus_dining_
- Geometry Type = Point
- Template Dataset = Leave this blank as we will not use it for this exercise
- Has M = No
- Has Z = No
- Coordinate System = Current Map or WGS_1984_Web_Mercator_Auxillary_Sphere
- Feature Class Alias = Leave blank
This is the same process you would take if creating a _multipoint_, _polygon_, _polyline_ (line), or _multipatch_ dataset.
<p align="center"><div class="zoom"><img src= "Images/arcgis-new-shapefile.png" alt="Create New Shapefile" style="width:100%"></div></p>
After clicking _Run_ the new shapefile should have been added to your table of contents. If not add it now and zoom in on the imagery basemap to campus. If you are unable to find campus you can use the **Go To XY** button on the _Map Tab_ and type in the following coordinates: -87.35, 36.53 and use _Flash Location_ to find Clarksville, TN.
<p align="center"><div class="zoom"><img src= "Images/arcgis-on-campus-dining-shp.png" alt="New Shapefile" style="width:100%"></div></p>
Now that you have the dataset created you can begin to add data points. Start by navigating to the _Edit Tab_ and click on the drop-down beneath **Snapping** and select _Snapping Settings..._. Snapping tolerance sets the distance at which two points will be snapped together. This is really important when trying to close/avoid closing a polygon. In this case it might not make much of a difference though there are some on campus points in the Morgan University Center that could be fairly close together. In the _Snapping Settings_ window, change the XY tolerance to 3 map units and click OK. Next, click on the **Create** button. In the _Create Features_ pane that opens on the right of the screen click on the "Create a point feature" button <img src= "Images/arcgis-create-point-feature-button.jpg" alt="Create new point feature" width="20" height="20"> and notice that your cursor now become a cross hairs. Place the target over the Woodward Library building _roughly_ where the [Starbucks](https://www.starbucks.com/store-locator/store/87005/austin-peay-state-university-601-college-st-clarksville-tn-370440001-us) is located and click.
<p align="center"><div class="zoom"><img src= "Images/arcgis-create-point.png" alt="Create New Data Point" style="width:100%"></div></p>
The new data point should now appear on the library. Repeat this process and create points for all of the on-campus dining locations and convenience stores (~12). When you have created your final point, click the _Finish Sketch_ button <img src= "Images/arcgis-finish-sketch-button.jpg" alt="Finish Sketch Button" width="20" height="20"> and save the edits using the _Save_ button <img src= "Images/arcgis-edits-save-button.jpg" alt="Save Edits" width="20" height="20">. Now you can close the _Create_ pane. Once saved, you should open the attribute table for this data layer and give each location a unique Id (numeric: 0, 1, 2, 3...). To do this, double click in the Id field for each record and type in a number. When finished return to the _Edit Tab_ and save the edits. Before leaving the Edit Tab, make sure to click the _Clear_ button <img src= "Images/arcgis-clear-selection-button.jpg" alt="Clear Selection Button" width="50" height="20"> to ensure no points are actively being selected.
With the on-campus locations created you could also use the same steps to create the off-campus location. However, sometimes you will find that collaborators send you information in the form of a spreadsheet or some other format such as **keyhole markup language** (KML) from Google Earth or a KMZ which is a compressed version of a KML. In this case the data being shared is stored in a \*.csv file at the following URL:
[https://raw.githubusercontent.com/chrismgentry/GIS1-Exercise-6/main/Data/off-campus-dining.csv](https://raw.githubusercontent.com/chrismgentry/GIS1-Exercise-6/main/Data/off-campus-dining.csv) (click to open the link, then right-click on the GitHub page and select "Save as…". Be sure to save it in your project folder for this exercise.)
Then from the _Map Tab_ click on the drop-down for the _Add Data_ button and select **XY Point Data**. In the _XY Table To Point_ pane input the following options and click Run.
- Input Table = Navigate to the saved CSV file
- Output Feature Class = Navigate to your project folder and save the file as a \*.shp file
- X Field = x
- Y Field = y
- Z Field = Leave blank
- Coordinate Systems - Leave as default (GCS_WGS_1948)
<p align="center"><div class="zoom"><img src= "Images/arcgis-xy-point-data.png" alt="Create New Point Data from XY" style="width:100%"></div></p>
Alternatively, you can add the \*.csv file through the typical _Add Data > Data_ steps from previous exercises and then right-click on the standalone table in Table of Contents and click **Display XY Data**. In the resulting window input the same options for the similar process above and click OK. This is just one of many demonstrations how [ArcGIS Pro]{style="color:#ff4500"} has a number of duplicate ways to achieve similar outcomes.
<p align="center"><div class="zoom"><img src= "Images/arcgis-display-xy-data.png" alt="Create New Point Data from XY table" style="width:100%"></div></p>
The resulting process should have placed another 24 data points on your map. You can use right-click on the off-campus points and “Zoom to Layer” to see all of the new points (symbology my vary).
<big><b>Question No. 1</b></big>
<blockquote>
_Which on-campus location is the last to close on a Saturday night? What other variables were included in the off-campus points that weren’t included in the on-campus data you created?_
</blockquote>
</details>
<hr></hr>
<details>
<summary><big>View directions in <b> [QGIS]{style="color: #006400"} </b></big></summary>
In [Exercise 4, Step 2](https://chrismgentry.github.io/GIS1-Exercise-4/#12_Step_Two:_The_Analyses) you added a remote connection to satellite imagery using the **XYZ Tiles** of the _Browser Pane_. Because this exercise will rely heavily on having accessible imagery you will begin by adding several other remote connections. This way you have options as to which imagery works best for this exercise. Remember in [Exercise 4](https://chrismgentry.github.io/GIS1-Exercise-4/#12_Step_Two:_The_Analyses) you needed to right/CRTL-click on **XYZ Tiles** and add a "New Connection". Below is the URLs you need to use for each connection:
| **Service** | **Provider** | **URL** | **Appx. Max Scale** |
| ----------- | ------------ | ------- | ------------------- |
| Satellite Imagery | Bing | http://ecn.t3.tiles.virtualearth.net/tiles/a{q}.jpeg?g=1 | 1:1 |
| Satellite Imagery | ESRI | https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x} | 1:1 |
| Street Map | [OpenStreetMap](https://www.openstreetmap.org/) | https://tile.openstreetmap.org/{z}/{x}/{y}.png | 1:1 |
| Topographic Map | [OpenStreetMap](https://www.openstreetmap.org/) | https://tile.opentopomap.org/{z}/{x}/{y}.png | 1:3400 |
You will be using one of the services above to locate the on and off-campus dining locations so take some time to <u>add each one to your layers and examine the area surrounding campus</u>. It is up to you to choose which type of imagery is best used for the data creation as well as the final map for this assignment.
Once you have selected the imagery you plan to use, click _Layer > Create Layer > New Shapefile Layer_ to create a new shapefile dataset. In the resulting window, click on the browse button <img src= "Images/qgis-file-location-button.jpg" alt="Browse for file location" width="20" height="20"> to give your shapefile a new name and save it in your project folder.
<p align="center"><div class="zoom"><img src= "Images/qgis-new-shapefile-layer.png" alt="New Shapefile Layer" style="width:100%"></div></p>
For the rest of the options use the following settings:
- File encoding = UTF-8
- Geometry type = Point
- Additional dimensions = None, EPSG:4326 - WGS 84
- New Field
- Name = Name
- Type = TextData
- Length = 80
<p align="center"><div class="zoom"><img src= "Images/qgis-new-shapefile-layer-dialog.png" alt="New Shapefile Layer Box" style="width:100%"></div></p>
Because you will be creating a series of points the geometry should be set to point. However, you would take these same steps to create a multipoint, line, or polygon shapefile as well. The UTF-8 encoding allows for the dataset to be used on Windows of Mac OS systems which enables the possibility of sharing the data. After adding the information for the New Field click the button to **Add to Fields List** to add a field called "Name" to your dataset and click OK.
This will create a new dataset in your layers that allows you to add additional point information. With the new dataset selected, begin by either right/CRTL clicking on the new data layer or clicking the pencil icon <img src= "Images/qgis-toggle-editing-button.jpg" alt="Toggle Editing" width="20" height="20"> to _Toggle Editing_. This will make the new layer editable. Next, click on the **Add Point Feature** button <img src= "Images/qgis-add-point-feature-button.jpg" alt="Add Point Feature" width="20" height="20"> and notice as your cursor becomes a target.
<p align="center"><div class="zoom"><img src= "Images/qgis-edit-new-shapefile.png" alt="Adding Point Data" style="width:100%"></div></p>
Place the target over the Woodward Library building _roughly_ where the [Starbucks](https://www.starbucks.com/store-locator/store/87005/austin-peay-state-university-601-college-st-clarksville-tn-370440001-us) is located and click. In the resulting window give this location attributes where the **id = 1** and the **Name = Starbucks** and click OK. You will notice a new point that appears on the map and your cursor will return to a target like appearance. This created point data representing Starbucks and is uniquely identified by the ID and Name variables. Repeat this process and create points for all of the on-campus dining locations and convenience stores (~12). For the ID field continue to increase the number by one each time and for the Name field type in the name of the location you are depicting. When you have finished the last data point, click the _Save Layer Edits_ button <img src= "Images/qgis-save-layer-edits-button.jpg" alt="Save Layer Edits" width="20" height="20"> and toggle editing for that layer off by clicking the toggle button <img src= "Images/qgis-toggle-editing-button.jpg" alt="Toggle Editing" width="20" height="20">.
With the on-campus locations created you could also use the same steps to create the off-campus location. However, sometimes you will find that collaborators send you information in the form of a spreadsheet or some other format such as **keyhole markup language** (KML) from Google Earth or a KMZ which is a compressed version of a KML. In [Exercise 5, Step 2](https://chrismgentry.github.io/GIS1-Exercise-5/#12_Step_Two:_The_Analyses) you learned how to import a \*.csv file without geometry (meaning there were no X and Y values for locations). If the \*.csv file has variables for a location, such as longitude and latitude or UTM, you can simply choose "Point Coordinate" and provide the fields where the XY data is located. However, with a useful QGIS plug-in you have the ability to import some data directly from a URL depending on the format. Similar to [Exercise 5, Step 4](https://chrismgentry.github.io/GIS1-Exercise-5/#14_Step_Four:_The_County_Commisson_Report), go to **Plugins > Manage and Install Plugins** on the menu bar and search for **MMQGIS** and install the plug-in.
<p align="center"><img src= "Images/mmqgis-plugin-page.png" alt="MMQGIS" style="width:85%"></p>
On the menu bar you will see a new option for MMQGIS available. Click _MMQGIS > Import/Export > Geometry Import from CSV File_ and in the resulting window use the following options and click apply:
- Input CSV Nodes File = https://raw.githubusercontent.com/chrismgentry/GIS1-Exercise-6/main/Data/off-campus-dining.csv
- This process works in QGIS Version 3.16.6-Hannover. If you encounter any issues you can always click on the link to open the webpage, right/CRTL click and save as... in your project folder, and load that local file into the Input CSV Nodes File option
- Geometry type = Point
- Shape ID Field = name
- Part ID Field = (this should be grayed out and not accessible)
- Latitude Field = y
- Longitude Field = x
- Output File Name = In this field click on the browse button to give the new file a name and save it to your project folder
<p align="center"><div class="zoom"><img src= "Images/mmqgis-import-dialog.png" alt="Importing CSV File with MMQGIS" style="width:100%"></div></p>
The resulting import should have placed another 24 data points on your map. You can use right/CRTL click and "Zoom to Layer" on the new layer to see all of the new points (colors my vary).
<p align="center"><div class="zoom"><img src= "Images/qgis-off-campus-import.png" alt="Imported CSV Points" style="width:100%"></div></p>
<big><b>Question No. 1</b></big>
<blockquote>
_Which on-campus location is the last to close on a Saturday night? What other variables were included in the off-campus points that weren't included in the on-campus data you created?_
</blockquote>
</details>
<hr></hr>
<details><summary><big>View directions in <b> [R]{style="color: #6495ED"} </b></span></big></summary>
Before you begin, you will need to open the [Ex2 Colab Notebook](https://github.com/chrismgentry/GIS1-Exercise-6/blob/main/GIS1_EX6.ipynb) and insert **tocolab** after _github_ in the URL to open in the _Colab Environment_. As you have seen before, R requires various packages to complete certain analyses. In this exercise you will be using **tidyverse, OpenStreetMaps, ggfortify, maptools, and rgeos**. To install and load the packages we will use the following script:
Blah...blah...blah...
<big><b>Question No. 1</b></big>
<blockquote>
_Insert Text Here_
</blockquote>
</details>
## Step Two: The Analyses
With datasets for both on-campus and off-campus created, in this step you will edit the attribute table to provide options for categorizations when making the final map.
<details>
<summary><big>View Directions in <b> [ArcGIS Pro]{style="color:#ff4500"} </b></big></summary>
Now that you have your two datasets it makes sense to merge them into one combined file. On the _Analysis Tab_, navigate through the _Tools_ to locate the **Merge** icon and click it. With the two layers selected in the table of contents, choose the following options in the _Merge_ pane and click Run.
- Input Datasets = off_campus and on_campus dining
- Output Dataset = Save the new \*.shp file with an appropriate name in your project folder
- Field Map
- Output Fields
- Click on name
- In the source options click to "Add New Source"
- Click on the on_campus dataset and click the id field
- Click on _add selected_ in the lower right corner
<p align="center"><div class="zoom"><img src= "Images/arcgis-merge-datasets.png" alt="Merge Vector Layers" style="width:100%"></div></p>
Examining the attribute table for the merged dataset you will find that the data points you created have no information for the majority of the fields in the table. If you click on the corresponding square to the right of the FID for an individual row you can highlight the point you created and fille in the information for _name_, _location_, _hours_, and _hours_category_ by double clicking in each empty cell and typing the information. Then return to the _Edit Tab_ and save your edits.
If you are interested in creating an additional field to provide further data about the locations (type of food, dining atmosphere, etc.) you can click the **Add Field** button <img src= "Images/arcgis-add-field-button.jpg" alt="Add Field" width="38" height="20"> at the top of the attribute table. In the window give the field a _name_, _data type_ like a numeric value (short, long, float, double) or date or text, _length_ which is the number of “characters” for any non text or integer value, and/or _precision_ which is the number of places to the right of the decimal. Think about categories you can create that might be useful in your visualization.
<big><b>Question No. 2</b></big>
<blockquote>
_Based on data in the attribute table, how many locations would not be an option at 3pm this afternoon?_
</blockquote>
</details>
<hr></hr>
<details>
<summary><big>View Directions in <b> [QGIS]{style="color:#006400"} </b></big></summary>
Now that you have your two datasets it makes sense to merge them into one combined file. In the _Processing Toolbox_ or in _Vector > Data Management Tools > Merge Vecor Layers_ on the menu bar, open the processing tool to create a merged dataset.
<p align="center"><div class="zoom"><img src= "Images/qgis-merge.png" alt="Merge Vector Layers" style="width:100%"></div></p>
In the **Merge Vector Layers** dialog box click browse button <img src= "Images/qgis-file-location-button.jpg" alt="Browse for file location" width="20" height="20"> to select the input layers. Using the select all button or by checking the boxes next to each layer, select the on and off campus datasets and click the _Go Back_ button <img src= "Images/qgis-go-back-button.jpg" alt="Go Back Button" width="20" height="20"> to return to the main merge menu. To save the dataset as a permanent file click the browse button <img src= "Images/qgis-file-location-button.jpg" alt="Browse for file location" width="20" height="20"> in the _Merged_ option and select "Save to File..." Remember to save it in your project folder.
With the newly merged dataset added to your layers, open the attribute table to examine the output.
<p align="center"><div class="zoom"><img src= "Images/qgis-merged-attribute-tables.png" alt="Merge Vector Layer Attribute Table" style="width:100%"></div></p>
Notice that the variables from each dataset are now included in the full table. However, because each attribute table had varying data some of the cells are filled will _NULL_ values. To edit these values click on the toggle editing button <img src= "Images/qgis-toggle-editing-button.jpg" alt="Toggle Editing" width="20" height="20"> <u>on the attribute table</u> and you will be able to click within each _NULL_ value cell and edit the information. For this exercise focus on completing the ID (simply number them 1-36), location (off-campus or on-campus), hours, and hours_cate (short for category) columns. The X and Y columns are completed for the off-campus locations because the information was included in the initial \*.csv file. When you created the on-campus locations that data is not specifically recorded in the attribute table. So don't worry about adding that information into the table as it is very unlikely it will be useful for the visualization.
If you are interested in creating an additional field to provide further data about the locations (type of food, dining atmosphere, etc.) you can click the **New Field** button while editing is toggled on in the attribute table to make a new field. In the window give the field a _name_, _type_ such as integer, decimal, text, date, etc., _length_ which is the number of "characters" for any non text or integer value, and/or _precision_ which is the number of places to the right of the decimal. Think about categories you can create that might be useful in your visualization.
<big><b>Question No. 2</b></big>
<blockquote>
_Based on data in the attribute table, how many locations would not be an option at 3pm this afternoon?_
</blockquote>
</details>
<hr></hr>
<details>
<summary><big>View Directions in <b> [R]{style="color:#6495ED"} </b></big></summary>
Blah...blah...blah...
<big><b>Question No. 2</b></big>
<blockquote>
_Insert Text Here_
</blockquote>
</details>
## Step Three: The Visualization
In this step you will use previous examples and your own design concepts to create a visualization that can be distributed by APSU Dining Services to students as part of their "Welcome to Campus" packet when they arrive in the fall. You may need to use various inset maps or other methods to ensure all locations can be viewed.
<details><summary><big>View directions in <b> [ArcGIS Pro]{style="color:#ff4500"} </b></span></big></summary>
Unlike previous exercises, there will not be an example provided of how this map could be designed. Because there is a large number and variety of data points you will need to think about how to create the most useful visualization possible for dining services. However, in [Exercise 4, Step 4](https://chrismgentry.github.io/GIS1-Exercise-4/#14_Step_Four:_Your_Turn) you used a more advanced labeling feature to filter out and add labels to specific locations to the map. This process skipped over the basic steps for labeling data. While you could use the more advance rule-based labeling for this, here is how you produce basic labels for a given dataset.
Right-click on the layer you would like to have labeled and click **Labeling Properties...**. This will open the _Label Class_ pane for that dataset. In order to label a feature class you need to provide the field that will be used as the label. There are several ways to do this but in this exercise you will use either the Python or Arcade language. For Python you can double click on name or type [name] into the Expression box and click Apply or in Arcade you can use the $feature.name expression. You could also select from any other field by changing name above to the title of another field. From this pane you can also change the _Symbol_ or appearance of the text, or the _Position_ or placement of the label. When finished, be sure the **Label** button on the right-click menu is selected so the label will be visible.
<p align="center"><div class="zoom"><img src= "Images/arcgis-label-properties.png" alt="Labeling Properties" style="width:100%"></div></p>
Because of the difficulties with label organization on various maps, some cartographers prefer to manually label items so their precise positioning can be controlled better than if placed by the software.
One last option for this visualization is to change the opacity of the background imagery. Depending on the background that was selected, the intensity or variation in the color or texture can make it difficult to visualize some overlays. By clicking on the background imagery layer and going to the _Layer > Appearance_ tab you can set the **Transparency** of the displayed layer. This might help with the legibility of some labels.
<big><b>Question No. 3</b></big>
<blockquote>
_Describe some of the issues with visualizing the default labels for the data points displayed on the map_
</blockquote>
</details>
<hr></hr>
<details><summary><big>View directions in <b> [QGIS]{style="color:#006400"} </b></span></big></summary>
Unlike previous exercises, there will not be an example provided of how this map could be designed. Because there is a large number and variety of data points you will need to think about how to create the most useful visualization possible for dining services. However, in [Exercise 4, Step 4](https://chrismgentry.github.io/GIS1-Exercise-4/#14_Step_Four:_Your_Turn) you used a more advanced labeling feature to filter out and add labels to specific locations to the map. This process skipped over the basic steps for labeling data. While you could use the more advance rule-based labeling for this, here is how you produce basic labels for a given dataset.
Right/CRTL click on the dataset you wish to label can select the properties menu. Navigate to the Labels tab on the left and select **Single Labels** from the drop-down menu at the top of the window.
<p align="center"><div class="zoom"><img src= "Images/qgis-labeling-options.png" alt="Single Labels" style="width:100%"></div></p>
This will provide a number of options for label customizations once you select the **Value** or the field you want to be used for the labels. In this case you want to select _name_. Now you can move through the various options on the left such as _text_, _formatting_, _buffer_, _mask_, _background_, _shadow_, etc. to design a style of labeling that is appropriate for display on your map.
Because of the difficulties with label organization on various maps, some cartographers prefer to manually label items so their precise positioning can be controlled better than if placed by the software.
One last option for this visualization is to change the opacity of the background imagery. Depending on the background that was selected, the intensity or variation in the color or texture can make it difficult to visualize some overlays. By right/CRTL clicking on the background imagery layer and selecting **Transparency** you can change the _Global Opacity_ value to adjust how the layer is displayed. This might help with the legibility of some labels.
<big><b>Question No. 3</b></big>
<blockquote>
_By changing the labeling options, describe the difference between what **mask** and **buffer** do._
</blockquote>
</details>
<hr></hr>
<details><summary><big>View directions in <b> [R]{style="color:#6495ED"} </b></span></big></summary>
Blah...blah...blah...
<big><b>Question No. 3</b></big>
<blockquote>
_Insert Text Here_
</blockquote>
</details>
## Step Four: Culinary Cartography
After reviewing the information you have collected with the APSU Dining Services Director, they have given you full control of the final design of the map but asked that you include and APSU logo on the map. To download official logos for the university you must go do [http://aspire.apsu.edu](http://aspire.apsu.edu) and click the login link in the upper right corner. Using the APSU Login link, enter your OneStop username/password and click login. On the ASPIRE Homepage click the link for Public Relations and Marketing under the Communities heading in the center of the page. Under "Recent Submissions" you will find a number of different logos to choose from. Select the one you would like to use and click on the link. Finally select either the JPEG or PNG version of the logo and right/CRTL click on the corresponding view/open link to download to your project folder. Once you have the logo you can log out.
<details><summary><big>View directions in <b> [ArcGIS Pro]{style="color:#ff4500"} </b></span></big></summary>
Although the final design of the dining map will be up to you, there are a couple techniques which might be helpful in trying to visually organize the data on the layout screen. In [Exercise 4, Step 3](https://chrismgentry.github.io/GIS1-Exercise-4/#13_Step_Three:_The_Visualization) you learned how to create an inset map that provided a small scale view of the dataset. Insets can also be used to view clustered data in a large scale view. For example, in the sample images above you can see a few distinct dining clusters that could be placed in a larger scale inset to provide additional legibility. Following similar steps to [Exercise 4, Step 3](https://chrismgentry.github.io/GIS1-Exercise-4/#13_Step_Three:_The_Visualization) you can create an inset for the locations along University Ave. In this case, because the inset is at a larger scale than the primary map, you can have [ArcGIS Pro]{style="color:#ff4500"} create an **extent indicator** to highlight the inset location.
After creating the large scale inset on your layout, select the primary map in the table of contents. Next, navigate to the _Insert Tab_ and click on the drop-down menu for _Extent Indicator_ and select the inset map. This will insert a rectangle over the area covered by the inset. The extent indicator now appears in your table of contents and can be styled according to your design asthetics.
<p align="center"><div class="zoom"><img src= "Images/arcgis-extent-indicator.png" alt="Extent Indicator" style="width:100%"></div></p>
If you were to create multiple extent indicators you could simply add some identifying text like a capital letter A in matching boxes and B in the second boxes or create some other way to identify which inset connects to which area.
Additionally, there are times you may want to add a table to your map. Suppose you would want to add the attribute table information to the inset you just created to use the IDs as the location indicators and allow the users to scan the table for specific information. This can be accomplished by selecting the inset map in the table of contents and clicking the _Table Frame_ button <img src= "Images/arcgis-table-frame-button.jpg" alt="Toggle Editing" width="20" height="20"> on the _Insert Tab_. Next you would draw the square representing the table (this can be moved). When the table is created a new _Format Table Frame_ pane will open on the right margin. Select the inset map as the _Map Frame_ and the merged dining dataset as the _Table_. For the _Query_ select visible rows. This will add a new table frame in the table of contents. Here you can select the fields you wanted displayed in the table and reorganized them if necessary. In the _Format Table Frame_ pane you can select various options to style the data table based on your design aesthetics.
<p align="center"><div class="zoom"><img src= "Images/arcgis-new-table-frame.png" alt="Adding a Table to the Map" style="width:100%"></div></p>
While tables are not required and should be used sparingly, they can be used to help provide additional information regarding the data that cannot be displayed through labels. However, there are always ways to create symbology that can hold multiple attributes simultaneously as discussed in lecture.
Finally, to add the APSU logo to your layout, click the **Picture** button <img src= "Images/arcgis-add-picture-button.jpg" alt="Add Picture" width="20" height="20"> located on the insert tab in the graphics and text box when your layout is open and draw a square on the map to place the object. Right-click and open the properties menu for the object to make any necessary adjustments.
<p align="center"><img src= "Images/arcgis-add-graphics-text-menu.jpg" alt="Adding a Table to the Map" style="width:60%"></p>
<big><b>Question No. 4</b></big>
<blockquote>
_On a map with the primary as large scale and the inset as small scale which map would you select to set the extent indicator?_
</blockquote>
</details>
<hr></hr>
<details><summary><big>View directions in <b> [QGIS]{style="color:#006400"} </b></span></big></summary>
Although the final design of the dining map will be up to you, there are a couple techniques which might be helpful in trying to visually organize the data on the layout screen. In [Exercise 4, Step 3](https://chrismgentry.github.io/GIS1-Exercise-4/#13_Step_Three:_The_Visualization) you learned how to create an inset map that provided a small scale view of the dataset. Insets can also be used to view clustered data in a large scale view. For example, in the sample images above you can see a few distinct dining clusters that could be placed in a larger scale inset to provide additional legibility. Following similar steps to [Exercise 4, Step 3](https://chrismgentry.github.io/GIS1-Exercise-4/#13_Step_Three:_The_Visualization) you can create an inset for the locations along University Ave. In this case, because the inset is at a larger scale than the primary map, you can have [QGIS]{style="color:#006400"} create an **overview** to highlight the inset location.
After creating the large scale inset on your layout, right/CRTL click on the primary map and select _Item Properties_. Scroll down to **Overviews** and click the drop-down arrow.
<p align="center"><div class="zoom"><img src= "Images/qgis-overviews.png" alt="Creating Overviews" style="width:100%"></div></p>
With _Overview_ open, click the green plus button and select your map inset map. With the draw overview box checked you should see a highlighted area on the primary map of where the inset is located.
<p align="center"><div class="zoom"><img src= "Images/qgis-overview-map.png" alt="Overview Map Styling" style="width:100%"></div></p>
If you were to create multiple overviews you could simply add some identifying text like a capital letter A in matching boxes and B in the second boxes or create some other way to identify which inset connects to which area.
Additionally, there are times you may want to add a table to your map. Suppose you would want to add the attribute table information to the inset you just created to use the IDs as the location indicators and allow the users to scan the table for specific information. This can be accomplished by clicking the **Add attribute table** button <img src= "Images/qgis-add-attribute-table-button.jpg" alt="Add attribute table" width="20" height="20"> in the layout and drawing a square on the map. Once loaded the entire attribute table will overwhelm the map. However, this can be adjusted by selecting the attribute table and opening the item properties.
With the Source set as "Layer Features" and the Layer set as the merged dataset you created above you should be able to click the **Attributes...** to open a _Select Attributes_ window. Using the up, down, add, and remove boxes you can select the data you would like to remove from the map table or add additional rows. Next you need to click the box for "Show only features visible within a map" and select your inset in the linked map options.
<p align="center"><div class="zoom"><img src= "Images/qgis-add-table-options.png" alt="Add Table" style="width:100%"></div></p>
Once you have the data linked, you can scroll down and adjust all of the options to format the table to fit your design before closing the item properties.
<p align="center"><div class="zoom"><img src= "Images/qgis-table-added.png" alt="Table Styling" style="width:100%"></div></p>
While tables are not required and should be used sparingly, they can be used to help provide additional information regarding the data that cannot be displayed through labels. However, there are always ways to create symbology that can hold multiple attributes simultaneously as discussed in lecture.
Finally, to add the APSU logo to your layout, click the **Add Picture** button <img src= "Images/qgis-add-image-button.png" alt="Add picture" width="20" height="20"> and draw a square on the map to place the object. Open the item properties to make any necessary adjustments.
<big><b>Question No. 4</b></big>
<blockquote>
_On a map with the primary as large scale and the inset as small scale which map would you select to set the overview?_
</blockquote>
</details>
<hr></hr>
<details><summary><big>View directions in <b> [R]{style="color:#6495ED"} </b></span></big></summary>
Blah...blah...blah...
<big><b>Question No. 4</b></big>
<blockquote>
_Insert Text Here_
</blockquote>
</details>
# The Write-Up
In the presentation of the map you provide to the APSU Dining Services Director please provide the following information:
- Discuss the challenges you encountered mapping the data.
- Describe what information that was not immediately available (if any) that could have helped you create a better product.
When complete, send a link to your _Colab Notebook_ or word document with answers to Questions 1-4, the write-up, and your completed map via email.