Book 1: Tutorial 4-3 Modify an Attribute Table

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this is tutorial 4-3 continues right after 4-2 we're going to be working in arcmap rather than our catalog this time so open up your arcmap and put add all your files from your newly made maricopa county files geodatabase this is what it should look like after the year turn doesn't have to look exactly like this we're just going to be working with attribute tables in this tutorial and that's exactly what this tutorial is about is modifying attribute tables the first thing they're going to have us do is delete columns that aren't necessary be warned once you delete an attribute table column it's gone for good so if you're ever working with a a crowded attribute table and there's a lot of things you don't need but you're not sure if you should delete them or not but you want to get rid of them just open up the properties go go to fields and you can turn them off and they won't show up in the attribute table this is always a safe way to do things because if you delete it there's no way of getting it back you have to download or find the shape file again which can be quite difficult for some things especially if it's a uniquely made one from like a GPS or something so with that said we're going to go up to the attribute tables or tracks and what they want us to do is a first look at STF ID look at the number that's associated with it if you look at these two columns it's the if you just combined these two numbers this is what you get so they want us to get rid of ID this column this column in this column so just right-click on the field and just delete you can also turn fields off in here there'll be a warning that'll pop up saying are you sure just click yes do this slowly because if you work too fast you might delete a field you didn't intend to okay there's a your turn where they want you to do something similar in the cities feel free to go ahead and do that when you're done just come back to this table and once again look at the STF ID number we're going to open up the census tract data field attribute table now and in previous versions of arcmap you used to be able to have two tables open at the same time you put them either next to each other above each other and compare them you can't do that anymore in ten but both of them are still open there's these little tabs on the bottom that you can switch back and forth and you can also you yeah so what they want you to do is compare this field with the Geo ID if you start with the eighth number or the eighth character and go over it's the same number as the stf ID there's just seven characters in front of it so what we're going to do is we're going to create a field that gets rid of those seven characters and the reason we're doing that is later on we're going to learn how to join tables to a shape file and that's how we're going to do it so we're going to click on the options we're going to add a field they want us to call it a SPF ID all caps is good and change it to a text and change the length to 11 the reason we're doing this is sometimes if the number is longer they'll fill it in with zeros we don't want that to happen so we're just going to click OK and all new fields are sent to the end of the attribute table so that's where you're going to find it as you can see there's all these nulls that's because we haven't assigned what this fields supposed to show to do that we right click and go to field calculator now in here we're going to change the type from number to string and we're going to use the mid function now the mid function means that we're going to use a field but we're going to start somewhere in the middle of it and the field we're interested is geo ID so we're just going to double click that we're going to put a comma and we want to start at the 8th character so we're going to put an 8 there and we want this number that's going into SPF ID to be 11 characters long so we're just going to type in 11 there so it's starting at the 8th little number which is about in the middle 2 and then going 11 characters long once that's done we're just going to click OK now it went pretty quick because we only have a few things in here only 663 if you have a attribute table with thousands like 10,000 things in it it can take quite a while to use field calculator so always have that known well now what we're going to do is we're going to create a new column and it's going to show something different we just used it to modify a number what we're going to do now is create a hate a whole new like meaning so what we're going to do is we're going to go to options and add a field and this is the name they want us to give it and what this field is going to do is it's going to show the ratio of Native American income with white income and the type should be float then we're going to click OK now we're going to go select by attribute and then here what we're going to do is go down and we're going to find PC income for whites then we're going to use the greater than get unique values and choose zero you could have typed in zero both would have worked and as you can see it chose 658 out of 668 now I'll explain why we did that when we do the field calculator the first thing you want to do is clear we want everything to be empty and in here what we're going to do is we're going to go up in the fields and we're going to first choose PC income for Native Americans and we're going to divide it by the PC income of whites now the reason we did the Select by attributes and had the income for whites greater than 0 is because you cannot divide a number by 0 so we would have had an error right off the bat so for those columns where white income is 0 there'll be a null rather than an error so that's why we did the select by attribute with that done we're going to click OK and now wherever there's a number greater than 1 in Native Americans make more than whites for income and if you right-click you can do descending order as you can see there there are a few sections where they do but there are probably a lot more where they don't and then there's all these zeros by the then the ones where White's had no income so we could not do that one and when that's done you just go up here and clear selection and unselect everything so we're going to close the tracks they want you to go in and do pretty much the same thing for Hispanics / white income once you're done with that though we're done with this tutorial and that's it
Info
Channel: GISHelper
Views: 37,245
Rating: 4.8461537 out of 5
Keywords: Tutorial, 4, 3, Modify, an, Attribute, Table
Id: 6_3c9zicMXE
Channel Id: undefined
Length: 9min 3sec (543 seconds)
Published: Sun Apr 10 2011
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.