Joins and Relates - Geogrphic informations system ARCGIS - ESRI - GIS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] welcome back everyone in this lesson I'm going to show you how to use joints and relates to attach external information to your feature classes in arcmap so you can use it to analyze and symbolize your data you'll notice that in this lesson we're back to our trusty rivers and watersheds data again so remember when we work with spatial joins and I mentioned how spatial joins are a specific type of join where we attach data based upon their relationship in space in this case we're doing a table join where we attach data from one table to another when they share the same value in an attribute in each table and we specify the field in each table that we use for the matching in this lecture we're going to focus on how to actually do the attaching of the data in arcmap here but in a lecture in the next class i'll show you how to structure your own data tables so that you can prepare them to be able to be joined in with ArcGIS the first question many of you will probably have is why would I want to join in data in what case will I need data that's not already in my attribute table I'm just gonna go collect data on my GPS and I'll enter the information I need right there or something like that well there are lots of cases where you might want to be able to join in data so for example joining in data allows us to separate our data in appropriate ways that makes each component more reusable the simplest data separation is when you might have hundreds or thousands of attributes for each feature you might instead want to group it by themes into different tables and attach that data in only when you need it so the attribute table is easier to work with this would be in a use case like what we work with with the census data with that population data I showed in a previous lesson there's just tons and tons of data to attach at the county level and at the census tract level and it would be really unwieldy and huge to try to download all of it at once another example would be if you have a data set that you downloaded from one party and then a third party created some attributes to attach to add value to your analysis an example of this is these rivers right here which is what I'm going to show you these rivers are from a data set called NHD the National hydrography data set but that upstream area attribute that I've been using so much in our demonstrations that's an attribute from a third party it's part of the nhdplus where they ran a bunch of different analyses on rivers all across the US and produced many different attribute tables that you can attach in to add additional value in your analysis so let's do that joint you could see here I have the cumulative area table that's the table from nhdplus in my map document and then I have my rivers layer here you'll also maybe notice that the table of contents doesn't look like it usually does that's over here and this is because this is the drawing order version of the table of contents here we have the list by source version of the table of contents and it kicks in when we add tables in because tables don't have a drawing order so it wants to show them to us by default you can switch back to drawing order but for now we'd like to view the list name of my source doing that join in arcgis is relatively easy all i need to do is right-click on the features i want to attach attributes to and go to joins and relates and then join and I get a dialog here and I can join attributes from table and I can also do a spatial join right here in practice I almost always use that the geoprocessing tool to do it instead but just enough one thing I want to point out is that arcmap tries to be I think a little too helpful here and a lot of students of mine tend to get into trouble because ark suggests tables and values for you so if you're rushing through it you may end up with a bad join because you didn't select one of these parameters correctly so take it slow and pay attention to what you're doing when you're joining data so the first thing I do want to do is select the table to join to this layer so it is the cumulative area table and so I'll leave that selected and then I need to select the common field that's present in my feature data to initiate the joint so that's comm ID in this case they both will have the information that's in that field if it helps to conceptualize it comm ID stands for common identifier and it's across the NHD data set they use this comm ID to identify at buttes and features that match each other so here's one of those cases of arcmap being a little too helpful it selects a field in my table now that matches the same data type as column IDs com ID is an integer so it gives me integer valid Garg integer attributes in the cumulative area table that I can join but it selects one by default for me so students I have when they're rushing through just leave o ID selected and click OK and then they don't get any matching records in this case it's really easy calm ID is the field that we actually want to join to in practice they don't have to have the same name and they often won't as I'll tell you in the next class but in this case it's really easy because we're matching com ID to calm ID and then the last thing is some joint options we can either keep all the records regardless of whether they successfully join or only keep the records that actually receive a joint sometimes it's really useful if you have a table coming in maybe that's the only information you want to pay attention to is the information in the table that actually matches features in your data set so if I click people only matching records that would tell me one thing that helps if you do think you might get yourself into trouble rushing through is to click validate' joint and it's gonna check everything to make sure that the number of records match and a couple of other checks in the data sets and they'll tell me if I might have messed up and this is a good example it did mostly validate but it's warning me that I don't have the same number of Records matching in each one that's ok in this in this instance we don't necessarily have attributes for all of these but we're going to continue anyway so I'll click OK it's going to make the join and I see no outward facing difference in my data set right now but if I right click on my attribute table and go to open after we table it looks pretty typical in this case but if I go to the right I'll see those two attributes there and if I right click on one of them go to properties I'll see its full name which is prefixed by the table name cumulative area thought total drainage area square kilometers here so I can click OK and close it out and just to prove that it was a joining that that information wasn't there we're gonna now remove the join and then we'll come take a look at the attribute table again so if you're done with the join and you want to remove it you can right click on it go to joins and relates remove joins and click on the join you want to remove and if I go back and look at the attribute table I'll see it's not there anymore I'm going to just really quickly add that same join back though because I want to show you something else so comm ID matching to column ID on the cumulative area table keeping all records ok so we have our join on this table we can see those records here but then if I close that out here's another copy of the same data here this is the rivers layer that I didn't initiate the join on and the join is just in this map document the join is not actually attaching information to the underlying feature data on my hard drive right now it's not it's not editing the data in the geo database instead it's just making that connection in this map document for this map a new map document what that data would not have the join and in fact this rivers layer will not have to join even though it's the same data because I didn't join it to this copy of the rivers so we saw it the other rivers layer have the join this one will not switch on a selection mode and if I go to the end of the table no join so that just shows that it's specific the layer in the map document and not going all the way down to the actual underlying data now let's just do one more join here I'm gonna remove this join one more time and we're gonna go try to add it back but this time we're gonna do it wrong because I want to show you how you know when you mess up a joint so if I go to comm ID here and then leave it as oh I D in this case because that'll be incorrect and keep all records I'll click OK and it still looks like it did before right all that features show up but if I go to the attribute table and go the end all of these end up being null values I mean occasionally you might get an accidental match or something but in this case they're all no values so if you find yourself joining data and ending up with no values you probably mismatched your fields you do get the common identifiers right and that's a really common problem that people new to joins and relate to have to fix it remove the joint and then go look up in whatever data you're working with documentation what the common identifiers field is if that documentation is available so the last thing I'm going to do is show you how to deal with it when you have multiple records you want to attach to a single feature record that's not just a straight join in ArcGIS so let's turn off the rivers layers here but we'll leave the watershed boundary layer visible and I'm going to make it fully opaque now and right here this main dot observations table I have a bunch of records of fish species occurrence in each watershed and so a watershed may have thousands of records of a fish species in it or it may have zero and what we want to do is we want to attach that information so it's usable in ArcGIS and browsable here so what I need to do instead in arc is I do relate and a relate does what we call a one-to-many joint we have one feature joining two many records in the foreign table the main double observations table and the setup is really similar though I still need to select the table that we're joining to it and I need to select the fields that they have in common in this case they have the hook twelve information in common and this first feature data has a hook twelve field but the main dot observations table doesn't have a twelve field and so I have to know in this case that the zone ID field is what has the hook twelve information it has the common information that we can relate to the hook twelve field in the WBD sub-watershed table so now I need to give it a name and all give it a species occurrence I'll click OK and if I open up the attribute table what'll be immediately alarming is I don't have any additional information at this point that I didn't have before and that always gets me for a moment with relates and then I remember that it doesn't append the records for a relate to the end because it would have to duplicate all these right instead when we want to see related information what we should do is we'll do a selection of Huk 12 so I'll just select one right now and then I'll come back over here and I'll look at the that one record and then when I want to see related information I'll go up here to the related tables option and I'll click on the related table and it will then show me all of the related information to that to that slot did Huck 12th at selected watershed and I can see in that table that is connected through the relate and they all indeed have the same zone ID here at the same up 12 IP okay that's all we're going to talk about in this lecture if you want to learn more about joins and relates and managing your data you should take the next class because we'll go into much more detail about it that may initially sound a little boring but it's going to allow you to do much more powerful things with your GIS data because you can incorporate so much additional third-party data and you can develop your own complex data sets with it in this lesson I showed you how to join data to your existing feature data from a third party table either using a join or a relate in arcmap and this allows you to bring in third party data or lots of additional attributes or separate your own data using best practices in the next lecture I'll show you how to troubleshoot the kinds of problems you might encounter when doing geo processing operations or working in arcmap as a technical profession you will encounter problems working with GIS but if you know how to deal with them if you know how to search out and find solutions to your problems you're going to be able to work just fine with it so that's what we're going to cover in the next lecture see you there
Info
Channel: Amanda white
Views: 9,877
Rating: 4.9365077 out of 5
Keywords: Cartographie, thématiques, carte, Cours de Cartographie thématiques SIG, SIG, GIS, cartograpghy, arcgis, esri, geospatial
Id: AurZE02O4NM
Channel Id: undefined
Length: 13min 2sec (782 seconds)
Published: Thu Dec 21 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.