ArcGIS Pro - Law of Crime Concentration

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
good day everyone for this video i'm going to get into how to resegment your streets this is often done within crime analysis to get our number of crimes per street calculated oftentimes with law of crime concentration with that this is probably the fourth or fifth time i've actually recorded this one encountered issues along the way and to make it easier and try to streamline it i've recorded with that you might wonder well we have a street layer what's the purpose of essentially dissolving it then breaking it or separating it based on the intersections again so with that if we open up an attribute table forestry layer in your geocoding data the key part is to have address level information from the left and right side this allows you to address match and geo code and get the points on the map if your data don't have that or layer does not have that your crime or whatever outcome you're trying to geocode based on an address can't be matched so you end up having more streets or segments than crime can actually occur on so with that if you're thinking about the distribution of crime across streets you're going to have more streets and it's going to be inflated even though crime can't necessarily occur on those so you can see here we have over 18 000 streets within this file but not everyone has information on it so you can't actually match your data to it which is problematic if you're going down this route in terms of analysis i would highly recommend removing data that don't have identifiable address features that allow you to geo code information another example is when we scroll down is our unnamed streets obviously they're within little rock and i can highlight you can see some generate behind you but they don't have a name they don't have address low information so this can throw off your average block distance calculation which we'll get into here in a bit but also it misrepresents again the opportunity or potential for crime to be addressed or geocoded to a street segment in little rock for example with that we don't actually have 18 819 segments that crime can occur on so we need to take care of that in this video i'm not going to go through and clean the file i'm going to show you if you don't some of the issues that you can find on the back end another example and let me clear out of this is if we hop down to where our eyes at our inner states as well so keep in mind a couple are highlighted behind us there's interstates that go through some of our larger cities and this is problematic because many interstates have underpasses and overpasses so in our 2d feature here it looks like there's an intersection in reality the street is going above or below the actual interstate if you're looking at crime data most of the time you're not going to have interstate based addresses on it especially depending on crime type if you're doing street level analysis i'd recommend getting rid of interstates because that as well i'll show you why this is problematic in the long run if you were to leave them in but for now let's go ahead and leave them in and move forward but ideally the first step is we need to get rid of all of our boundaries our intersections really we're going to go from 18 819 down to one so extending from some of the other geoprocessing videos we can do this through a dissolve so you can use your analysis tools up here i still have it up here from a prior video and again i'm making this as a standalone video versus adding these two some of the other tutorials with the tools because i think this one deserves a bit more attention when it comes to crime analysis and how people use this really need to understand your street layer before going further in terms of attaching crime to it because you could misrepresent the data and with that when you're running an analysis on the distribution or clustering of you could be misrepresenting the base denominator of potential of crimes by street segment itself so with that if we just click dissolve here we want to input our streets so we're going to specify this as our street layer output it's already gone to my geodatabase [Music] funny wise it has the four after because this is actually the fourth time fifth time i've done this but with that i don't want to dissolve anything at this point a cool part is and the textbook gets into some of these options up you can actually calculate statistics when you're doing dissolves which is super super handy for now i'm going to show you just one example and it's going to be shape length so it's going to give me the sum of the straight lengths once they're all dissolved it's going to be in feet given the coordinate system projected coordinate system it's already in for the state plane of south in arkansas so with that i can go ahead and hit run and it's now going to take all of these 18 000 segments and turn it into just one line so if i turn that one off open the attribute table for our newly dissolved file you can see that here cool so even if i select this one you can see that it's going to highlight the entire line because it's connected as one layer itself now or one row with that and we haven't gotten into this in other videos yet we want to modify our feature our layer here so if we go to the edit tab this is where you have options to modify and it's pretty handy depending on what you want to do and similar to our analysis you have a lot of options in here that are different points you'll likely use but for now we're interested in the plannerize options so if you hover over it it tells you what it does and it's truly doing what we want we want to take our line feature and break it based on the intersections so if we click that as you can see it wants you to select what you want to have the breakpoint as i only have this dissolve file shown in my table of contents i already pre-selected it so if i did not select it and i had to say clear it doesn't show anything here and it gives you a drop down option of how you want to select it but since this one only has one it generates force and i know this is going to work so we're good to go there and i can go ahead and run this now the key part is and i forgot to do this in a prior video and another reason why i led to re-recording this one is keep in mind it's going to generate the same attribute table so you're adding to your editing this attribute table so key part at this point is you want to save and save often so you already have the option up here you're in the same toolbar go ahead and click save it's going to make your life a lot easier you want to save all edits all you did was add rows here and you can see we just have over 19 000 now and you might wonder while the original street file had eighteen thousand eight hundred nineteen and this one's just over nineteen thousand now so where did the extra 200 non number come from so i'm gonna this is our new street link so if i sort these and i just zoom in on one of these and let me grab my explorer hand so if i zoom out a little you can actually see this segment here is that split or separated because it intersects the interstate so that's why i say it's problematic because the actual street segment extends beyond so the street itself goes past the interstate but it's being separated based on this intersection here and that's one example of why i would recommend removing interstates if you're trying to do a crime to street segment analysis is it's going to give you false breaks so with that keep that in mind we're going to keep going forward for now because i'm just showing you how to do it but keep in mind you want to spend time on your layer file to clean up and i will say i learned how to do this primarily through some instructions that at least footage up at temple provided me made life a lot easier going through this i took them from the desktop version into pro for years i didn't know how it was done that wasn't too descriptive in any of the studies she helped me out and now i've done it a few times so with that now you might wonder well we have a street layer now that's dissolved at intersections or breaks so how do i get my crime data attached to that now there's a few different ways now if you think about our robbery data that we have it's offset let me just zoom out a little little so we can see it it was offset by 20 feet so if we zoom in it's not specifically on the street center line again if i knew i was going to be using this for a spatial join of points to lines i would geocode it with the street center line but for the project i was using the crime data for it had an offset so i could specify the neighborhood or block group that it was part of so with that in our analysis tools we actually have some options in here that are pretty handy ideally what we want to do is generate a near table or just identify what it's near so we're going to take our robberies and identify the ones that are near it so we want to snap essentially these points to the nearest xy coordinates of the street itself with that i have to admit i've done this before so i have experimented i found the near option to work better than the near table yes the table's giving us the same information as the near part but when i went to re-display the x-y coordinates it was giving me a lot of issues and that's where i ended up running into a lot of hurdles and re-recording because even troubleshooting on the fly wouldn't was not generating anything worthwhile i had more luck with the near part to it and the near part adds it to the layer already the table does it separately from it on your own feel free to experiment with both of those explore which one works better for you with that i've already run it on this layer here so i'm just going to show you the process of going through and then how it generates within the attribute table for us so if i were to click near all i want to specify here is i want to put my input features my robbery and the near feature is the dissolve street layer that we just created so if i go ahead and do our street layers that are dissolved i want the location if you hover over the information it gives you an idea of what it's doing so i would click location here and you can see down here what it's generating for us you can turn some of these on and off if you don't want them but we're good it gives us what it needs the distance to our nearest xy based on the street layer itself so with it i've imagine i clicked run here and i'm going to open our attribute table here and you can see oops just exit that one if i scroll to the end the nearest xy coordinates for us so you can see the information we have again like i specified i had issues in the past with doing the near table keep in mind for this i generated it through the near part of the analysis versus using the generate near table the way to get around that and how i did it was i then exported this table because i actually want to display these xy's here so i did an export table and i save it to and i can i'll do it again so example near robbery x y and it's just taking this attribute table and it's going to save out a table for us click ok and it generates down here for us so if i exit out of here i'm going to open this up and i'm going to show you it's the same thing we just had open but now i want to actually display not based on the latitude and longitude here but our x y at the end so if i right click display x y this is where you need to change for me it's the near x and near y and i'm just going to save this as a another one itself even though i haven't saved one like this i just add a number in just to make it easier for this example our coordinate system since this one is projected i'm going to go ahead and change this down here to our current map so it puts us in the state plane arkansas projected south one so we're good to go there and i'm gonna hit okay and let that run and now you can see that it's generated some points for us and keep in mind since we generated this we actually need to export this layer out so it's a separate point layer at this point so i'm going to do robbery street center example hit ok there and now it's generating a point layer for us i can turn off the one that we just removed from the table i can remove that table just to clean up and if i zoom back out keep in mind those are ones that have the negative one attached to them so that's why they're getting thrown out but here we have some really cool analysis if we zoom in of it not being offset anymore so if i turn these off and now i can go ahead and i'll show you how to do another join option so again if we're in our analysis toolbox here i want to do a spatial join that's probably at the top spatial join i don't want to join the robbery counts to the streets itself to the line file so i want to do my street lines i want to join based on the dissolve file here output feature it's going to our geo database i'm going to do robbery to streets and i only want one to one so it can't go to separate streets itself and i'm going to do an intersect you could do like before i could have since i knew it was a 20-foot offset based on the geocoding i could have done this with just grab the ones that are within 20 21 feet and it would give that count to the nearest street itself there's a couple different ways but this is just one of them with that i'm going to keep it as intersex you could put a distance here of just two feet in case it's off by a little but since we did nearest to it i'm going to keep intersex and we're good to go there i'll hit run and it's going to generate a new street for us actually i did it backwards so if you notice there when i did robbery to street it actually joined it backwards i wanted to put up my target feature here as our street layer keep in mind i make these mistakes all the time when i'm trying to just get through it quickly so take your time go through it i want to change this one to the robbery so my target feature that i want to add the data to is actually the street layer itself i'm joining the count of robberies to it with that i'm going to put correctly at the end and i want to keep one to one i still want to keep it in intersection one so we're good to go there hit run and we'll get a new street layer at the top once it's done or here we go and if i open the attribute table it will have a join count and if i go descending order you can see how those robberies are distributed across our streets so if you open statistics it will show you how many were actually matching the 247 that's what we're hoping so the other 12 that were kicked out didn't have coordinates so we know where those went so we're good to go there but you can see in terms of law of crime concentration if you want to i consider it more like a risky block if you pull in some risky facility literature as well we have 247 and we have oh i was hoping that would do the math for me there oops let me open the calculator real quick i was used to excel doing an auto generate for us so if we did a nine plus five plus four plus four plus three plus three plus three plus three plus three plus three that's about right forty divided by two forty seven we see that ten streets account for 16 percent of crime and the 10 percent or 10 streets is well below 1 percent of all streets so we already see some concentration of robbery in little rock based on that keep in mind since we only had 247 robberies an easy way to think about this is so we have 16 of robberies occurring in 10 streets what i would also do is take our 10 divided by 247 so if we think about equality it's a bit different we only have potentially 240 247 streets that crime could occur on so if we think about it that way the 10 streets out of 247 equates to 4 of our streets accounts for 16 of our crime or robbery in this case still clustering still concentration so we do have concentration of robberies in little rock we have four streets pretty cool to see that and another part that i wanted to bring up before turning off this lecture is in the same file so if you keep in mind we do have the street length the key part that i wanted to highlight that we haven't touched on is typically when we make buffers or other types of distance analysis that people use the average block length average distance you can go one two three four blocks out if you're leaving in streets or street segments that don't have a name don't have geocodable information such as address to and from on the left and right those distances are still part of that average calculation so ideally you would remove those to get your average block length in terms of how crime or other data are being geocoded through your address locator and that information so keep in mind that is important to calculate when you're trying to find your average straight lengths spend some time really focusing on cleaning up a street layer yes it's time intensive but it pays off in the long run with that if there's questions please let me know i know i did some troubleshooting on the fly at the end but we're all bound to have some of those issues pop up when we're going through it so again if there's any questions comments concerns please reach out to me but this is a quick way to understand our data within arc pro take it from streets attach crime to the streets and then look at the potential concentration of crime per street with that take care bye
Info
Channel: Crime & Security Data Analytics Lab - CASDAL
Views: 58
Rating: 3 out of 5
Keywords: ArcGIS Pro, Crime Analysis, Law of Crime Concentration, Street Segment Crime Counts
Id: 4MeC6Ks5OXY
Channel Id: undefined
Length: 19min 17sec (1157 seconds)
Published: Wed Mar 03 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.