Would like to append records that have been sum within'd in a drivetime result poly to original source points

150
0
01-06-2025 01:12 PM
Labels (2)
LKW1
by
New Contributor

I am newer to Python coding but I have a workflow that requires me to

1. run 30/60 min drive times,

2. use Split function to separate the identifiers from the Name field in the results poly

3. perform a summarize within using various demographic point features 

4. and then join that 30/60 poly with the new 'sum within' data fields (2 sets of 4 summed age fields: FY23_LT40, FY23_40-44, FY23_45-54, FY23_55Over and FY24_LT40, FY24_40-44, FY_2445-54, FY24_55Over) BACK to the original Point locations used to get the drive times.

Ideally it would be the following fields in the source location Point FC (example 'MammographyFacilities' would be the point FC vs. MammographyFacilities_ServiceArea30_60_SumWithin would be the poly FC we're taking the summarized data from):

'MammographyFacilities Columns....' , +  FY23_LT40_0-30, FY23_40-44_0-30, FY23_45-54_0-30, FY23_55Over_0-30, FY24_LT40_0-30, FY24_40-44_0-30, FY_2445-54_0-30, FY24_55Over_0-30, FY23_LT40_0-60, FY23_40-44_0-60, FY23_45-54_0-60, FY23_55Over_0-60, FY24_LT40_0-60, FY24_40-44_0-60, FY_2445-54_0-60, FY24_55Over_0-60

Step 4 is what i need help with...I don't need all the fields in the drivetimes, just those summarized age fields, but there are duplicate records in the DriveTime Poly: 0-30 and 0-60 (disks). I need to append both drivetime records' summary columns for each site to the single location point feature without duplicating the sites in the resulting point fc (as what would a occur in a join).

Is this even possible or should i just break the drivetime poly into two features and run two joins?

Ultimately I'd really like to have the entire workflow set up in Python since i run it about twice a year and these are huge (1M+) datasets in some cases but I'm not asking for the whole thing here. That's just why I'm asking about the potential for a python solution opposed to using manual solution.

0 Kudos
0 Replies