GMT20260523-014139_Recording.transcript.vtt

WEBVTT 1 00:00:02.620 --> 00:00:13.029 Hao Zhang: Okay, hello guys, welcome to the last class, and for today, I'm going to introduce you to some basic 2 00:00:13.140 --> 00:00:23.239 Hao Zhang: functions of QGIS. So, what is GIS? GIS, the full name, is Geographic Information System. 3 00:00:23.550 --> 00:00:27.899 Hao Zhang: It's used when we have to present, 4 00:00:28.480 --> 00:00:41.389 Hao Zhang: data through the map, because from Tableau or from Excel, you can only make the data into pie charts or different types of charts, but… 5 00:00:41.430 --> 00:00:50.050 Hao Zhang: Some variables, they are correlated or distributed spatially, and we need to identify those patterns from the map. 6 00:00:51.210 --> 00:00:52.060 Hao Zhang: So… 7 00:00:52.250 --> 00:01:01.889 Hao Zhang: that's the reason why we need GIS. And to use GIS, I believe all of you have installed QGIS on your computer. 8 00:01:04.050 --> 00:01:17.169 Hao Zhang: And to use GIS, a spreadsheet is not enough. We need one more thing called shapefiles. A shapefile is a 9 00:01:19.960 --> 00:01:39.920 Hao Zhang: type of file that contains geographic information. It can include points, latitude and longitude. It can consist of lines, like a road network, and it can also contain polygons, like to reflect cities or 10 00:01:40.000 --> 00:01:41.910 Hao Zhang: state boundaries. 11 00:01:42.070 --> 00:01:57.940 Hao Zhang: In Census, we have many different types and levels of boundaries, and for today, the first thing I will introduce to you is the shapefile, which is… 12 00:01:58.060 --> 00:02:01.060 Hao Zhang: where to find the source of shapefiles. 13 00:02:01.520 --> 00:02:05.659 Hao Zhang: And as you can see, I already opened our website here. 14 00:02:06.270 --> 00:02:18.359 Hao Zhang: You can just Google Census shapefiles and go to the TIGER/Line website. I already attached this link in Canvas, so you can access it through Canvas; it is okay. 15 00:02:18.480 --> 00:02:23.269 Hao Zhang: And open it, and go to the web interface. 16 00:02:23.730 --> 00:02:33.469 Hao Zhang: And here, since the geographic information at different levels in the United States changes every year, 17 00:02:34.660 --> 00:02:38.060 Hao Zhang: we want to use the latest 18 00:02:38.940 --> 00:02:42.759 Hao Zhang: latest geographic information. 19 00:02:42.950 --> 00:02:49.030 Hao Zhang: And here, we select 2025. And to select the layer type. 20 00:02:50.860 --> 00:02:58.300 Hao Zhang: As you can see, we have different levels. We get ZIP Code level, state level. 21 00:02:58.350 --> 00:03:17.470 Hao Zhang: Note here that, from the Census, the city level is called place. So, if you want to download city-level shapefiles, you click place, and in our course, or in our assignment, 22 00:03:17.680 --> 00:03:20.269 Hao Zhang: I want you guys to download the block 23 00:03:20.430 --> 00:03:28.409 Hao Zhang: blocks. It is the smallest geographic unit in the United States, and click Submit. 24 00:03:29.160 --> 00:03:37.059 Hao Zhang: Since our sample data are coming from Texas, we really need to 25 00:03:40.440 --> 00:03:42.259 Hao Zhang: select Texas. 26 00:03:42.610 --> 00:03:44.840 Hao Zhang: And then, click Download. 27 00:03:46.200 --> 00:03:57.810 Hao Zhang: So, okay. Since I already have that on my computer, I will just show you that after downloading it, you will see 28 00:04:00.620 --> 00:04:09.620 Hao Zhang: See, A file with 7 different types of… Different… 29 00:04:10.350 --> 00:04:15.879 Hao Zhang: seven different types of files, and here is the key, but… 30 00:04:16.110 --> 00:04:19.579 Hao Zhang: Note here, you cannot change the name 31 00:04:19.690 --> 00:04:25.070 Hao Zhang: Like, you need to make sure the names of those seven files are synced. 32 00:04:25.520 --> 00:04:28.220 Hao Zhang: The only difference is their… 33 00:04:28.240 --> 00:04:42.079 Hao Zhang: The only difference is their last three letters: .shp file, .prj file. Those seven files are kind of connected with each other; they just contain different information. 34 00:04:42.080 --> 00:04:51.210 Hao Zhang: when we use ArcGIS or QGIS to process the shapefile, this is what we need, but 35 00:04:51.440 --> 00:04:56.270 Hao Zhang: All others, provide some level of support, so… 36 00:04:57.580 --> 00:05:04.570 Hao Zhang: Here, I'll just, go from the beginning. 37 00:05:09.420 --> 00:05:11.060 Hao Zhang: So, here's the… 38 00:05:12.000 --> 00:05:19.630 Hao Zhang: you can see a blank QGIS project, which is the same as what all of you have, and you can simply drag 39 00:05:20.690 --> 00:05:28.720 Hao Zhang: drag the shapefile into here, and you can see all Census blocks in Texas. 40 00:05:29.560 --> 00:05:35.560 Hao Zhang: But we do not need them, because our sim… Because our… 41 00:05:36.780 --> 00:05:43.440 Hao Zhang: data only contains information within the city of Fort Worth, so… 42 00:05:43.690 --> 00:05:45.500 Hao Zhang: We don't need all of them. 43 00:05:47.340 --> 00:05:54.890 Hao Zhang: what I'm gonna do. What I'm gonna do is go to the… I need another layer. 44 00:05:55.670 --> 00:05:59.060 Hao Zhang: And merge, and overlay with… 45 00:05:59.280 --> 00:06:03.600 Hao Zhang: And I need another layer contains the information of 46 00:06:03.910 --> 00:06:10.670 Hao Zhang: the City of Fort Worth, and overlay it with all the Census blocks in Texas. 47 00:06:11.480 --> 00:06:16.369 Hao Zhang: And then I can extract overlaid census blocks. 48 00:06:17.450 --> 00:06:20.669 Hao Zhang: and then proceed next step, right? So… 49 00:06:22.420 --> 00:06:29.089 Hao Zhang: I'll… I already processed a file that only contains the… 50 00:06:30.060 --> 00:06:37.619 Hao Zhang: Fort Worth city boundary, and similarly, drag the shapefile here, and you can see here. 51 00:06:39.860 --> 00:06:50.029 Hao Zhang: The orange color represents the boundary of the city of Fort Worth, and right now, we need to overlap them and extract the 52 00:06:50.160 --> 00:07:00.710 Hao Zhang: intersecting part. So we go to Vector, Geoprocessing Tools, and click Intersection. 53 00:07:00.890 --> 00:07:08.349 Hao Zhang: And at input layer, we select the blocks… And, as, 54 00:07:09.290 --> 00:07:14.200 Hao Zhang: Overlay layer, we select the city boundaries, and then we click Run. 55 00:07:17.430 --> 00:07:21.970 Hao Zhang: It takes some time, because the underlying layer have 56 00:07:22.590 --> 00:07:27.449 Hao Zhang: millions of records, and Texas is a very big state. 57 00:07:31.400 --> 00:07:39.469 Hao Zhang: Okay, I will not wait, since this is our class time. I already have a processed file. 58 00:07:39.660 --> 00:07:47.840 Hao Zhang: in my computer, and I will upload it to you guys, later, but… Hmm. 59 00:07:49.440 --> 00:07:57.609 Hao Zhang: But, what I've… Trying to show here is the process to do, to do the… 60 00:07:58.370 --> 00:08:04.529 Hao Zhang: overlap… overlay analysis. And, let me… 61 00:08:07.610 --> 00:08:15.149 Hao Zhang: Oh, that seems the file… I didn't see the file, so it seems I have to do it again. 62 00:08:18.380 --> 00:08:21.829 Hao Zhang: Blocks overlay with city boundary and run. 63 00:08:38.940 --> 00:08:46.769 Hao Zhang: Okay, guys, the geoprocessing has already been done, and you can see here. 64 00:08:47.700 --> 00:08:56.959 Hao Zhang: If we uncheck those layers and leave only one layer, it contains all the Census blocks within the boundary of 65 00:08:57.980 --> 00:09:07.290 Hao Zhang: Fort Worth City. So, right now, we only get the city boundaries, but what we want to do is 66 00:09:08.310 --> 00:09:09.980 Hao Zhang: generate a map 67 00:09:10.300 --> 00:09:21.450 Hao Zhang: to link it to our sample data to reflect those patterns on the map, right? So what we're gonna do is go to Layer. 68 00:09:22.500 --> 00:09:23.260 Hao Zhang: Okay. 69 00:09:24.550 --> 00:09:38.120 Hao Zhang: Add layer, and since our sample data is a CSV file, go to Delimited Text Layer. 70 00:09:39.580 --> 00:09:44.670 Hao Zhang: And here, find our data. 71 00:09:45.640 --> 00:09:52.180 Hao Zhang: Since our data contains latitude and longitude, it can be considered as points. 72 00:09:52.810 --> 00:09:57.230 Hao Zhang: like points on the Earth, so we can add them as such. 73 00:09:57.570 --> 00:10:16.640 Hao Zhang: The geometry definition we select is point coordinates, and we get longitude and latitude. Here, you need to carefully click Use Spatial Index; otherwise, your processing time can be significantly long, and then click Add. 74 00:10:19.140 --> 00:10:35.489 Hao Zhang: Okay, so you can see here we get numerous points on our map, right? But those two layers are still kind of isolated. What we want to do is know how many points 75 00:10:36.750 --> 00:10:40.089 Hao Zhang: are there in each Census block. 76 00:10:40.310 --> 00:10:49.799 Hao Zhang: So, we go to the geoprocessing toolbox, Vector Analysis Tools, and we choose Count Points in Polygon. 77 00:10:51.590 --> 00:10:56.630 Hao Zhang: And as polygons, we select, intersection. 78 00:10:56.940 --> 00:11:02.139 Hao Zhang: layer we just created, and points is the data source. 79 00:11:02.290 --> 00:11:04.430 Hao Zhang: And then we click Run. 80 00:11:17.730 --> 00:11:25.220 Hao Zhang: Okay, guys, the… Geoprocessing is already done, and then we can… 81 00:11:25.580 --> 00:11:37.599 Hao Zhang: Click Close, and we can see here we got a new layer called Count, just generated by our function of Count Points Within Polygons, so… 82 00:11:38.150 --> 00:11:39.670 Hao Zhang: This is Count. 83 00:11:40.950 --> 00:11:44.079 Hao Zhang: We can see here, like. 84 00:11:44.190 --> 00:11:54.080 Hao Zhang: Open the attribute table, and go to the number of points. It reflects how many points are within each polygon. 85 00:11:54.840 --> 00:11:55.610 Hao Zhang: So… 86 00:11:56.050 --> 00:12:08.929 Hao Zhang: We want this column to be shown on the map by different colors, right? Because that is the whole point of making the map, but right now it is just the same color. 87 00:12:09.080 --> 00:12:11.910 Hao Zhang: So how are we, how can we do that? 88 00:12:12.330 --> 00:12:14.730 Hao Zhang: We go to the… 89 00:12:19.660 --> 00:12:30.070 Hao Zhang: We go to Properties and Symbology. And here, click the graduated 90 00:12:30.760 --> 00:12:37.430 Hao Zhang: graduated symbology, and as the value, we select the number of points. 91 00:12:37.870 --> 00:12:41.199 Hao Zhang: And we can select the color, maybe red. 92 00:12:42.060 --> 00:12:47.589 Hao Zhang: And here, we have different methods to classify 93 00:12:47.960 --> 00:12:52.350 Hao Zhang: to categorize the colors, and 94 00:12:52.540 --> 00:12:57.670 Hao Zhang: It's really up to you. You can select, maybe, fixed intervals. 95 00:12:58.010 --> 00:13:07.200 Hao Zhang: or pretty breaks. I can set the classes at 4 for convenience, so… 96 00:13:08.170 --> 00:13:16.429 Hao Zhang: You can see we get, the colors from very light red to very deep red represent the 97 00:13:16.580 --> 00:13:21.169 Hao Zhang: number of violations increasing, and then we click OK. 98 00:13:21.780 --> 00:13:24.840 Hao Zhang: Right, as you can see, we get, 99 00:13:27.010 --> 00:13:34.070 Hao Zhang: a layer that can reflect where the greatest number of violations happened. 100 00:13:34.410 --> 00:13:37.990 Hao Zhang: in the city of Fort Worth, but… 101 00:13:39.360 --> 00:13:47.269 Hao Zhang: But here, you might see that only one or two very tiny places have a very high number of violations. 102 00:13:47.620 --> 00:13:56.829 Hao Zhang: red, it can lower our readability. So here, maybe we can choose Natural Breaks, and 103 00:13:58.530 --> 00:14:07.020 Hao Zhang: Choose 4… And then click OK to see, oh, maybe… 104 00:14:07.570 --> 00:14:11.570 Hao Zhang: is much more better for the audience, so… 105 00:14:12.480 --> 00:14:22.319 Hao Zhang: For the method, how you set your value range is important for your map's readability, and it matters for you. 106 00:14:22.480 --> 00:14:25.989 Hao Zhang: For you to interpret it and observe the pattern. 107 00:14:27.960 --> 00:14:45.389 Hao Zhang: And, that's all for today as to your assignment. I'll just show you the simplest way to do that. For your assignment, maybe you can count it, the number of violations in different time period, or in, like, the 108 00:14:46.040 --> 00:15:02.549 Hao Zhang: compare the number of violations and the status of the violations by separating your Excel file into different sections and importing them into QGIS. 109 00:15:03.470 --> 00:15:08.600 Hao Zhang: And as to how to export the map with a legend. 110 00:15:08.760 --> 00:15:21.619 Hao Zhang: I will attach a video from YouTube to give you an overview of how to do that. For all the shapefiles, I will upload them 111 00:15:21.740 --> 00:15:30.719 Hao Zhang: into Canvas, so you do not need, need to go somewhere else. Just download the shapefile from the… 112 00:15:30.990 --> 00:15:35.590 Hao Zhang: Canvas, and you will be fine. Okay.