more advance join/merge/append

Discussion created by dkhey on Jun 7, 2012
Latest reply on Jun 8, 2012 by dkhey
Hi y'all,

I need some advice on how to go about analyzing two subsets of the same variable (in this case, types of robbery).

I have addresses in which robbery events have occurred and I was able to aggregate them up to the census block.  I also know if these robberies were perpetrated on local residents or on visitors of a city.  I have aggregated those separately as well.  I want to see whether the spatial patterns of robberies perpetrated on locals differ from those perpetrated on visitors.  My thought - why not run a regression of the total robberies per block as the dependent variable... and the proportion of these that are perpetrated on visitors as an independent variable. I would need to combine my datasets by block in order to be able to compute this proportion and run my regression.

I would think a spatial join would work.  Merge those blocks that have both robbery on visitor and robbery on resident while still keeping the blocks that just have robberies on visitors or just have robberies on residents.  I cannot seem to get this to work no matter what I tweak.  Any thoughts?

Unless there is a fancy spatial join method that I should have run in the first place.  eg, I have my addresses of robberies and I can join by type of robbery from the get go and keep two counts per block: one robbery against locals, one robbery against visitors.  I do not think this can be done, though.