Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Calculating weighted centroid location of the census pop blocks

vibhore276
5 - Atom

Hi Everyone,

 

I am having trouble with implementing this idea. I am using Census Pop block data for my analysis. I have couple of stores around which I drew 3 miles of buffer and calculated the population density for that area. Now I also wanted to calculate the centroid location (lat/long) of the population in that region. For reference below is the conceptualized diagram.

 

Here the blue boxes are the population blocks which vary in sizes. Each size corresponds to amount of people live there. The dashed square box location is what I need to find out.

 

clipboard_image_0.png

 

Please let me know in case anyone of you would need any clarifying questions. I'll be quick to provide my response

 

Thanks in advance

4 REPLIES 4
DiganP
Alteryx Alumni (Retired)

@vibhore276 Do you have a list or number of people who live in that dotted square box? 

 

Are you able to attach a sample dataset that shows this?  

Digan
Alteryx
LukeG
Alteryx Alumni (Retired)

@vibhore276 Here is an article from way back in the day (2012).

 

http://www.chaosreignswithin.com/2012/01/how-to-generate-weighted-centroids-in.html

 

The customer used a weighted average of the latitude and longitude to reach the goal you are describing.

 

If you have X,Y coordinates, I'm sure you can do the same. The weighted average of the lat/long should represent the centroid location of the population.

 

 

vibhore276
5 - Atom

Hi @DiganP 

 

Since I are restricted to share the original data, I just created a dummy version of the similar structure which I have with me.

 

The Store Information:

Store ID

Lat

Long

Store1

Store2

Store3

-75.51178

-75.564823

-75.532379

39.156687

39.153958

39.114079

 

The Population Block information:

Census Block ID

Pops

Lat

Long

Block 1

Block 2

Block 3

Block 4

Block 5

Block 6

Block 7

Block 8

Block 9

Block 10

Block 11

Block 12

Block 13

Block 14

Block 15

Block 16

Block 17

Block 18

Block 19

Block 20

Block 21

Block 22

Block 23

1002

30

93

209

1029

4567

92

12

5

6

98

345

782

99

56

2

1

400

8000

23

2

1

9

-75.546799

-75.546455 

-75.527916-75.514526 

-75.535469 

-75.508003 

-75.525513 

-75.533066 

-75.51796 

-75.51178 

-75.525856 

-75.535812 

-75.561905 

-75.549202 

-75.509033 

-75.49633 

-75.508347 

-75.554695 

-75.573921 

-75.532722 

-75.477791 

-75.618896 

-75.549545

39.160947

39.143641

39.136452

39.160947

39.165206

39.148966

39.155889

39.151895

39.146304

39.141245

39.170263

39.148434

39.154824

39.13512

39.128995

39.157752

39.174788

39.171062

39.17532

39.188893

39.136185

39.251929

39.294985

 

Let me know if this is helpful

vibhore276
5 - Atom

Thanks a lot @LukeG 

Labels