2

I am working with geocoded crime event data, and attempting to join that point layer with a census block group layer in order to get a count for each census block group (and ideally sums/averages for a couple other variables, but one thing at a time).

When I run the join in ArcMap using the Spatial Join tool (one to one, using the intersect function, no radius), I'm (understandably) unable to capture points that fall just outside of the outer boundary of my block group layer (equates to 2,705 of 1,346,047 events that are not captured). Since ideally I would like to count these data points, I've played around with changing the radius while still using the intersect function. I'm able to then capture these outer points. However, my total count far exceeds the number of events I have in my data (when I use a 1 m radius, my count captures 1,832,027 points for example), which somehow means I'm over-counting despite still calling for a one-to-one join.

I've also tried using Joins and Relates from my block group layer using both point to polygon options. The "fall inside it" option gives me 1,092,213 points (missing points that fall along the outer AND inner borders) and the point "closest to the polygon" option gives me 1,344,971 points (pretty close to my total number of events, but still not capturing some outer points for some reason).

Any thoughts?

Note: I've verified GCSs and datums are the same for both layers.

3

Interesting question! Making the assumption that you want each point to join to it's nearest census block (assuming it falls outside the block) then one method would be a two-step process:

  1. Use the Near tool from the Analysis toolbox with the points as the input layer and the near features as your census block polygons. This will populate the points with the FID of the nearest polygon (in the NEAR_FID column).
  2. Use a standard join to join the points to the polygon with the nearest FID.

A bonus of this method is that it will also populate a NEAR_DIST field which will give you the distance to the nearest feature. In most cases it will be zero, but you should get an idea of which features are further away from the census block boundaries.

| improve this answer | |
  • thanks so much @om_henners! i appreciate the step-by-step instruction - was exactly what i had in mind! – letsplayhorse Sep 1 at 20:26
  • sorry for the beginner follow-up question. when i try to join the points with Near_FID to their corresponding FID polygons, it looks like if I do a join by attributes from Joins and Relates, it only joins the first point event in the data set rather than all of them. any way to aggregate these data? – letsplayhorse Sep 1 at 21:46
  • @letsplayhorse Yes, the join will only join the first value. If you swap the order and join the polygons to the points you will get their attribute values on the points if that's what you need. The question becomes what information do you need joined across and what aggregation do you need? If you're familiar with Python I'd recommend the pandas library to do your aggregation given the number of points you have. You could also to try the Summary Statistics tool as well – om_henners Sep 1 at 23:56
  • 1
    thanks @om_henners! in my data i have a binary variable that classify my crime events as violent/non-violent. i was hoping the join would produce a sum variable which i could use for this. all good tips you provided, i hadn't thought about doing the join backwards. very new to Python, so for now, i think i may backtrack a little and make some data management changes in R before joining. appreciate your wisdom with this question! – letsplayhorse Sep 2 at 0:38
  • @letsplayhorse no problem - I supspect the Summary Statistics will do the job for you by allowing you to select a Case variable that groups by unique values (e.g. the polygon FID) to calculate statistics. Good luck! – om_henners Sep 2 at 3:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.