Find maximum theoretical join count (spatial statistics) Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Using ArcGIS spatial statistics tools on average values?Spatial statistics software for GIS?Learning Spatial Statistics?Interpolating Maps - Statistical Learning Techniques vs Spatial Statistics TechniquesSpatial Join to count points in polygons in lat/lon in PostGIS?Spatial Statistics in mapinfo 15 64 bitSpatial statistics using ArcGISSummary Statistics after Spatial Joining in ModelbuilderGeoPandas spatial join and count
Is "Reachable Object" really an NP-complete problem?
2001: A Space Odyssey's use of the song "Daisy Bell" (Bicycle Built for Two); life imitates art or vice-versa?
Chinese Seal on silk painting - what does it mean?
If a VARCHAR(MAX) column is included in an index, is the entire value always stored in the index page(s)?
An adverb for when you're not exaggerating
How does the math work when buying airline miles?
How to Make a Beautiful Stacked 3D Plot
If a contract sometimes uses the wrong name, is it still valid?
Fantasy story; one type of magic grows in power with use, but the more powerful they are, they more they are drawn to travel to their source
Is there a kind of relay only consumes power when switching?
How to convince students of the implication truth values?
Is CEO the profession with the most psychopaths?
When a candle burns, why does the top of wick glow if bottom of flame is hottest?
Closed form of recurrent arithmetic series summation
What font is "z" in "z-score"?
How to compare two different files line by line in unix?
Why are the trig functions versine, haversine, exsecant, etc, rarely used in modern mathematics?
Where are Serre’s lectures at Collège de France to be found?
How to find all the available tools in mac terminal?
Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?
Do I really need recursive chmod to restrict access to a folder?
How can I use the Python library networkx from Mathematica?
What is the longest distance a player character can jump in one leap?
Extracting terms with certain heads in a function
Find maximum theoretical join count (spatial statistics)
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Using ArcGIS spatial statistics tools on average values?Spatial statistics software for GIS?Learning Spatial Statistics?Interpolating Maps - Statistical Learning Techniques vs Spatial Statistics TechniquesSpatial Join to count points in polygons in lat/lon in PostGIS?Spatial Statistics in mapinfo 15 64 bitSpatial statistics using ArcGISSummary Statistics after Spatial Joining in ModelbuilderGeoPandas spatial join and count
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
In addition to calculating the joint count statistic, I would like to compare the actual count of joins to the theoretical maximum count of joins. I know how to compute the statistic and find the actual count of joins for a given group (under conditions of two group), but how can I find the theoretical maximum given the known count of members in each group? I would preferably solve this using Python or PostGIS. I am currently using the Pysal module to calculate the joint count statistics. The input data are census tract polygon shapefiles with arbitrary boundaries, making it impossible to simply agglomerate from east to west or north to south, etc.
EDIT: I am asking about the maximum possible count of within-group joins.
python postgis spatial-statistics pysal
add a comment |
In addition to calculating the joint count statistic, I would like to compare the actual count of joins to the theoretical maximum count of joins. I know how to compute the statistic and find the actual count of joins for a given group (under conditions of two group), but how can I find the theoretical maximum given the known count of members in each group? I would preferably solve this using Python or PostGIS. I am currently using the Pysal module to calculate the joint count statistics. The input data are census tract polygon shapefiles with arbitrary boundaries, making it impossible to simply agglomerate from east to west or north to south, etc.
EDIT: I am asking about the maximum possible count of within-group joins.
python postgis spatial-statistics pysal
add a comment |
In addition to calculating the joint count statistic, I would like to compare the actual count of joins to the theoretical maximum count of joins. I know how to compute the statistic and find the actual count of joins for a given group (under conditions of two group), but how can I find the theoretical maximum given the known count of members in each group? I would preferably solve this using Python or PostGIS. I am currently using the Pysal module to calculate the joint count statistics. The input data are census tract polygon shapefiles with arbitrary boundaries, making it impossible to simply agglomerate from east to west or north to south, etc.
EDIT: I am asking about the maximum possible count of within-group joins.
python postgis spatial-statistics pysal
In addition to calculating the joint count statistic, I would like to compare the actual count of joins to the theoretical maximum count of joins. I know how to compute the statistic and find the actual count of joins for a given group (under conditions of two group), but how can I find the theoretical maximum given the known count of members in each group? I would preferably solve this using Python or PostGIS. I am currently using the Pysal module to calculate the joint count statistics. The input data are census tract polygon shapefiles with arbitrary boundaries, making it impossible to simply agglomerate from east to west or north to south, etc.
EDIT: I am asking about the maximum possible count of within-group joins.
python postgis spatial-statistics pysal
python postgis spatial-statistics pysal
edited Sep 12 '17 at 19:13
eric s
asked Sep 12 '17 at 17:42
eric seric s
1258
1258
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
the theoretical maximum of a join is given by the Cartesian product of the sets. That's literally what CROSS JOIN
does it gives you the maximum-join which you reduce later.
SELECT *
FROM generate_series(1,3) AS gs1(x)
CROSS JOIN generate_series(17,23) AS gs2(y);
x | y
---+----
1 | 17
1 | 18
1 | 19
1 | 20
1 | 21
1 | 22
1 | 23
2 | 17
2 | 18
2 | 19
2 | 20
2 | 21
2 | 22
2 | 23
3 | 17
3 | 18
3 | 19
3 | 20
3 | 21
3 | 22
3 | 23
(21 rows)
Thank you. I am asking about joins based on spatial relationships. Each item can only be joined to spatial neighbors, not to each element in the set. Elements with value '1' in col 'x' in your example would be restricted to joining elements based on spatial adjacency. Perhaps I misunderstand the application of your example to solving this problem.
– eric s
Sep 12 '17 at 18:31
1
So you reduce the set byWHERE ST_Touches(x,y)
or the like. The theoretical maximum is every element touches every other element. If the real world/spacetime or whatever prohibits that you just have to reduce from that set. The cross join is the theoretical maximum. The second things have real world constraints you're outside of that.
– Evan Carroll
Sep 12 '17 at 18:34
I don't think this will get the result I am after. The theoretical maximum is indeed limited by real-world spatial relationships. If I have a county with n ZIP codes and k of them are in group j, I want to know what the maximum possible number of joins possible would if k number of ZIP codes were reassigned to group j so as to maximize the join count. This likely requires an iterative solving algorithm, not a simple table query.
– eric s
Sep 13 '17 at 19:45
What do you think the word "theoretical" means vs "real world." I have no idea how you're assigning your variables therek
is being used in two contexts.
– Evan Carroll
Sep 13 '17 at 21:31
"Hypothetical maximum" would perhaps be more accurate. I used "theoretical" to contrast with "actual." I asked in the context of applying a particular spatial statistic where I thought the meaning of "theoretical maximum" would be reasonably clear.
– eric s
Sep 13 '17 at 22:00
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "79"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f255131%2ffind-maximum-theoretical-join-count-spatial-statistics%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
the theoretical maximum of a join is given by the Cartesian product of the sets. That's literally what CROSS JOIN
does it gives you the maximum-join which you reduce later.
SELECT *
FROM generate_series(1,3) AS gs1(x)
CROSS JOIN generate_series(17,23) AS gs2(y);
x | y
---+----
1 | 17
1 | 18
1 | 19
1 | 20
1 | 21
1 | 22
1 | 23
2 | 17
2 | 18
2 | 19
2 | 20
2 | 21
2 | 22
2 | 23
3 | 17
3 | 18
3 | 19
3 | 20
3 | 21
3 | 22
3 | 23
(21 rows)
Thank you. I am asking about joins based on spatial relationships. Each item can only be joined to spatial neighbors, not to each element in the set. Elements with value '1' in col 'x' in your example would be restricted to joining elements based on spatial adjacency. Perhaps I misunderstand the application of your example to solving this problem.
– eric s
Sep 12 '17 at 18:31
1
So you reduce the set byWHERE ST_Touches(x,y)
or the like. The theoretical maximum is every element touches every other element. If the real world/spacetime or whatever prohibits that you just have to reduce from that set. The cross join is the theoretical maximum. The second things have real world constraints you're outside of that.
– Evan Carroll
Sep 12 '17 at 18:34
I don't think this will get the result I am after. The theoretical maximum is indeed limited by real-world spatial relationships. If I have a county with n ZIP codes and k of them are in group j, I want to know what the maximum possible number of joins possible would if k number of ZIP codes were reassigned to group j so as to maximize the join count. This likely requires an iterative solving algorithm, not a simple table query.
– eric s
Sep 13 '17 at 19:45
What do you think the word "theoretical" means vs "real world." I have no idea how you're assigning your variables therek
is being used in two contexts.
– Evan Carroll
Sep 13 '17 at 21:31
"Hypothetical maximum" would perhaps be more accurate. I used "theoretical" to contrast with "actual." I asked in the context of applying a particular spatial statistic where I thought the meaning of "theoretical maximum" would be reasonably clear.
– eric s
Sep 13 '17 at 22:00
add a comment |
the theoretical maximum of a join is given by the Cartesian product of the sets. That's literally what CROSS JOIN
does it gives you the maximum-join which you reduce later.
SELECT *
FROM generate_series(1,3) AS gs1(x)
CROSS JOIN generate_series(17,23) AS gs2(y);
x | y
---+----
1 | 17
1 | 18
1 | 19
1 | 20
1 | 21
1 | 22
1 | 23
2 | 17
2 | 18
2 | 19
2 | 20
2 | 21
2 | 22
2 | 23
3 | 17
3 | 18
3 | 19
3 | 20
3 | 21
3 | 22
3 | 23
(21 rows)
Thank you. I am asking about joins based on spatial relationships. Each item can only be joined to spatial neighbors, not to each element in the set. Elements with value '1' in col 'x' in your example would be restricted to joining elements based on spatial adjacency. Perhaps I misunderstand the application of your example to solving this problem.
– eric s
Sep 12 '17 at 18:31
1
So you reduce the set byWHERE ST_Touches(x,y)
or the like. The theoretical maximum is every element touches every other element. If the real world/spacetime or whatever prohibits that you just have to reduce from that set. The cross join is the theoretical maximum. The second things have real world constraints you're outside of that.
– Evan Carroll
Sep 12 '17 at 18:34
I don't think this will get the result I am after. The theoretical maximum is indeed limited by real-world spatial relationships. If I have a county with n ZIP codes and k of them are in group j, I want to know what the maximum possible number of joins possible would if k number of ZIP codes were reassigned to group j so as to maximize the join count. This likely requires an iterative solving algorithm, not a simple table query.
– eric s
Sep 13 '17 at 19:45
What do you think the word "theoretical" means vs "real world." I have no idea how you're assigning your variables therek
is being used in two contexts.
– Evan Carroll
Sep 13 '17 at 21:31
"Hypothetical maximum" would perhaps be more accurate. I used "theoretical" to contrast with "actual." I asked in the context of applying a particular spatial statistic where I thought the meaning of "theoretical maximum" would be reasonably clear.
– eric s
Sep 13 '17 at 22:00
add a comment |
the theoretical maximum of a join is given by the Cartesian product of the sets. That's literally what CROSS JOIN
does it gives you the maximum-join which you reduce later.
SELECT *
FROM generate_series(1,3) AS gs1(x)
CROSS JOIN generate_series(17,23) AS gs2(y);
x | y
---+----
1 | 17
1 | 18
1 | 19
1 | 20
1 | 21
1 | 22
1 | 23
2 | 17
2 | 18
2 | 19
2 | 20
2 | 21
2 | 22
2 | 23
3 | 17
3 | 18
3 | 19
3 | 20
3 | 21
3 | 22
3 | 23
(21 rows)
the theoretical maximum of a join is given by the Cartesian product of the sets. That's literally what CROSS JOIN
does it gives you the maximum-join which you reduce later.
SELECT *
FROM generate_series(1,3) AS gs1(x)
CROSS JOIN generate_series(17,23) AS gs2(y);
x | y
---+----
1 | 17
1 | 18
1 | 19
1 | 20
1 | 21
1 | 22
1 | 23
2 | 17
2 | 18
2 | 19
2 | 20
2 | 21
2 | 22
2 | 23
3 | 17
3 | 18
3 | 19
3 | 20
3 | 21
3 | 22
3 | 23
(21 rows)
answered Sep 12 '17 at 18:22
Evan CarrollEvan Carroll
4,9821341
4,9821341
Thank you. I am asking about joins based on spatial relationships. Each item can only be joined to spatial neighbors, not to each element in the set. Elements with value '1' in col 'x' in your example would be restricted to joining elements based on spatial adjacency. Perhaps I misunderstand the application of your example to solving this problem.
– eric s
Sep 12 '17 at 18:31
1
So you reduce the set byWHERE ST_Touches(x,y)
or the like. The theoretical maximum is every element touches every other element. If the real world/spacetime or whatever prohibits that you just have to reduce from that set. The cross join is the theoretical maximum. The second things have real world constraints you're outside of that.
– Evan Carroll
Sep 12 '17 at 18:34
I don't think this will get the result I am after. The theoretical maximum is indeed limited by real-world spatial relationships. If I have a county with n ZIP codes and k of them are in group j, I want to know what the maximum possible number of joins possible would if k number of ZIP codes were reassigned to group j so as to maximize the join count. This likely requires an iterative solving algorithm, not a simple table query.
– eric s
Sep 13 '17 at 19:45
What do you think the word "theoretical" means vs "real world." I have no idea how you're assigning your variables therek
is being used in two contexts.
– Evan Carroll
Sep 13 '17 at 21:31
"Hypothetical maximum" would perhaps be more accurate. I used "theoretical" to contrast with "actual." I asked in the context of applying a particular spatial statistic where I thought the meaning of "theoretical maximum" would be reasonably clear.
– eric s
Sep 13 '17 at 22:00
add a comment |
Thank you. I am asking about joins based on spatial relationships. Each item can only be joined to spatial neighbors, not to each element in the set. Elements with value '1' in col 'x' in your example would be restricted to joining elements based on spatial adjacency. Perhaps I misunderstand the application of your example to solving this problem.
– eric s
Sep 12 '17 at 18:31
1
So you reduce the set byWHERE ST_Touches(x,y)
or the like. The theoretical maximum is every element touches every other element. If the real world/spacetime or whatever prohibits that you just have to reduce from that set. The cross join is the theoretical maximum. The second things have real world constraints you're outside of that.
– Evan Carroll
Sep 12 '17 at 18:34
I don't think this will get the result I am after. The theoretical maximum is indeed limited by real-world spatial relationships. If I have a county with n ZIP codes and k of them are in group j, I want to know what the maximum possible number of joins possible would if k number of ZIP codes were reassigned to group j so as to maximize the join count. This likely requires an iterative solving algorithm, not a simple table query.
– eric s
Sep 13 '17 at 19:45
What do you think the word "theoretical" means vs "real world." I have no idea how you're assigning your variables therek
is being used in two contexts.
– Evan Carroll
Sep 13 '17 at 21:31
"Hypothetical maximum" would perhaps be more accurate. I used "theoretical" to contrast with "actual." I asked in the context of applying a particular spatial statistic where I thought the meaning of "theoretical maximum" would be reasonably clear.
– eric s
Sep 13 '17 at 22:00
Thank you. I am asking about joins based on spatial relationships. Each item can only be joined to spatial neighbors, not to each element in the set. Elements with value '1' in col 'x' in your example would be restricted to joining elements based on spatial adjacency. Perhaps I misunderstand the application of your example to solving this problem.
– eric s
Sep 12 '17 at 18:31
Thank you. I am asking about joins based on spatial relationships. Each item can only be joined to spatial neighbors, not to each element in the set. Elements with value '1' in col 'x' in your example would be restricted to joining elements based on spatial adjacency. Perhaps I misunderstand the application of your example to solving this problem.
– eric s
Sep 12 '17 at 18:31
1
1
So you reduce the set by
WHERE ST_Touches(x,y)
or the like. The theoretical maximum is every element touches every other element. If the real world/spacetime or whatever prohibits that you just have to reduce from that set. The cross join is the theoretical maximum. The second things have real world constraints you're outside of that.– Evan Carroll
Sep 12 '17 at 18:34
So you reduce the set by
WHERE ST_Touches(x,y)
or the like. The theoretical maximum is every element touches every other element. If the real world/spacetime or whatever prohibits that you just have to reduce from that set. The cross join is the theoretical maximum. The second things have real world constraints you're outside of that.– Evan Carroll
Sep 12 '17 at 18:34
I don't think this will get the result I am after. The theoretical maximum is indeed limited by real-world spatial relationships. If I have a county with n ZIP codes and k of them are in group j, I want to know what the maximum possible number of joins possible would if k number of ZIP codes were reassigned to group j so as to maximize the join count. This likely requires an iterative solving algorithm, not a simple table query.
– eric s
Sep 13 '17 at 19:45
I don't think this will get the result I am after. The theoretical maximum is indeed limited by real-world spatial relationships. If I have a county with n ZIP codes and k of them are in group j, I want to know what the maximum possible number of joins possible would if k number of ZIP codes were reassigned to group j so as to maximize the join count. This likely requires an iterative solving algorithm, not a simple table query.
– eric s
Sep 13 '17 at 19:45
What do you think the word "theoretical" means vs "real world." I have no idea how you're assigning your variables there
k
is being used in two contexts.– Evan Carroll
Sep 13 '17 at 21:31
What do you think the word "theoretical" means vs "real world." I have no idea how you're assigning your variables there
k
is being used in two contexts.– Evan Carroll
Sep 13 '17 at 21:31
"Hypothetical maximum" would perhaps be more accurate. I used "theoretical" to contrast with "actual." I asked in the context of applying a particular spatial statistic where I thought the meaning of "theoretical maximum" would be reasonably clear.
– eric s
Sep 13 '17 at 22:00
"Hypothetical maximum" would perhaps be more accurate. I used "theoretical" to contrast with "actual." I asked in the context of applying a particular spatial statistic where I thought the meaning of "theoretical maximum" would be reasonably clear.
– eric s
Sep 13 '17 at 22:00
add a comment |
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f255131%2ffind-maximum-theoretical-join-count-spatial-statistics%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown