<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: exporting x&amp;amp;y values (coordinates) from graph builder once jmp automatically finds centroid points for a polygon in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193452#M41399</link>
    <description>&lt;P&gt;Using the crosshair tool manually on all the points and recording these isn't practical for me. Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 18 Apr 2019 14:31:00 GMT</pubDate>
    <dc:creator>fever</dc:creator>
    <dc:date>2019-04-18T14:31:00Z</dc:date>
    <item>
      <title>exporting x&amp;y values (coordinates) from graph builder once jmp automatically finds centroid points for a polygon</title>
      <link>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193440#M41398</link>
      <description>&lt;P&gt;How can I export x&amp;amp;y coordinates for the centroid points jmp automatically finds within my polygons (n=2455) on a graph builder map? I would like to make lat/long columns for these points in order to make contour and heat maps, but all I have currently are the many vertices coordinates for the mapshape polygons. These are municipalities in Mexico, so there is no determined point location (city) for the ad on to find (if it could), but the centroid points jmp finds is perfect for me. I don't know how to write script.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 14:22:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193440#M41398</guid>
      <dc:creator>fever</dc:creator>
      <dc:date>2019-04-18T14:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: exporting x&amp;y values (coordinates) from graph builder once jmp automatically finds centroid points for a polygon</title>
      <link>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193452#M41399</link>
      <description>&lt;P&gt;Using the crosshair tool manually on all the points and recording these isn't practical for me. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 14:31:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193452#M41399</guid>
      <dc:creator>fever</dc:creator>
      <dc:date>2019-04-18T14:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: exporting x&amp;y values (coordinates) from graph builder once jmp automatically finds centroid points for a polygon</title>
      <link>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193656#M41403</link>
      <description>&lt;P&gt;Fever,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I did was take the mean X and Y values (using table&amp;gt;summary) for each of my shapes in the XY polygon file.&amp;nbsp; This is not really a centriod, but it worked well enough for my purposes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14563"&gt;@fever&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Using the crosshair tool manually on all the points and recording these isn't practical for me. Thanks&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 16:08:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193656#M41403</guid>
      <dc:creator>johnmoore</dc:creator>
      <dc:date>2019-04-18T16:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: exporting x</title>
      <link>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193658#M41405</link>
      <description>Thanks, yes that works w most of the shapes. Good enough from a distance. Thought maybe there were a simple way to access the automatically generated centroid data&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Apr 2019 16:45:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193658#M41405</guid>
      <dc:creator>fever</dc:creator>
      <dc:date>2019-04-18T16:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: exporting x&amp;y values (coordinates) from graph builder once jmp automatically finds centroid points for a polygon</title>
      <link>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193660#M41407</link>
      <description>&lt;P&gt;Fever,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a quick script I wrote to find the centroids based on the XY shape file.&amp;nbsp; Please try and let me know how it works for you.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
shapeList = Associative Array( Column( dt, "Shape ID" ) &amp;lt;&amp;lt; get values ) &amp;lt;&amp;lt; get keys;
dtCentroids = New Table("Centroids", New Column( "Shape ID", numeric, continuous ),
	New Column( "X", numeric continuous ),
	New Column( "Y", numeric, continuous )
);
For( i = 1, i &amp;lt;= N Items( shapeList ), i++,
	targetRows = dt &amp;lt;&amp;lt; get rows where( Column( dt, "Shape ID" )[Row()] == shapeList[i] );
	centroid = Polygon Centroid( Column( dt, "X" )[targetRows], Column( dt, "Y" )[targetRows] );
	dtCentroids &amp;lt;&amp;lt; add rows( 1, "at end" );
	Column( dtCentroids, "Shape ID" )[i] = i;
	Column( dtCentroids, "X" )[i] = centroid[1];
	Column( dtCentroids, "Y" )[i] = centroid[2];
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Apr 2019 17:26:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193660#M41407</guid>
      <dc:creator>johnmoore</dc:creator>
      <dc:date>2019-04-18T17:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: exporting x&amp;y values (coordinates) from graph builder once jmp automatically finds centroid points for a polygon</title>
      <link>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193697#M41419</link>
      <description>&lt;P&gt;That worked after chopping up the file 5 ways (was 87k rows). Program kept freezing...But it looks good. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 20:55:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193697#M41419</guid>
      <dc:creator>fever</dc:creator>
      <dc:date>2019-04-18T20:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: exporting x&amp;y values (coordinates) from graph builder once jmp automatically finds centroid points for a polygon</title>
      <link>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193698#M41420</link>
      <description>&lt;P&gt;Glad to hear it worked.&amp;nbsp; Happy JMPing!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 21:38:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/193698#M41420</guid>
      <dc:creator>johnmoore</dc:creator>
      <dc:date>2019-04-18T21:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: exporting x&amp;y values (coordinates) from graph builder once jmp automatically finds centroid points for a polygon</title>
      <link>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/194265#M41522</link>
      <description>&lt;P&gt;FWIW, here is an alternative that uses plotted data directly:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

// Table
dt = New Table( "Some States",
					New Column(
						"State",
						Character,
						Nominal,
						Set Values(
							{"Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado",
							"Connecticut", "Delaware", "Florida", "Georgia", "Hawaii"}
						)
					)
				);

// Map
gb = dt &amp;lt;&amp;lt; Graph Builder(
						Show Control Panel( 0 ),
						Variables( Shape( :State ) ),
						Elements( Points( Legend( 5 ) ) )
					);

// Get x and y values from marker seg
gbRep = Report(gb);
frame = gbRep[FrameBox(1)];
mySeg = (frame &amp;lt;&amp;lt; Find Seg( Marker Seg( 1 ) ));
xVals = mySeg &amp;lt;&amp;lt; Get X Values;
yVals = mySeg &amp;lt;&amp;lt; Get Y Values;
dt2 = asTable(xVals||yVals, &amp;lt;&amp;lt; columnNames({"X", "Y"}));
dt2 &amp;lt;&amp;lt; setName("Map Shape Centroids");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Apr 2019 10:47:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/m-p/194265#M41522</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2019-04-24T10:47:38Z</dc:date>
    </item>
  </channel>
</rss>

