Subscribe Bookmark RSS Feed

## Periodic Table Map

Community Trekker

Joined:

Sep 29, 2015

I'm working with our AP Chemistry teacher to analyze student choices for an elements research project that students did a couple weeks ago. I told her about JMP and the Map Shape function. I thought surely that the Periodic Table of Elements would be pre-programmed in. No, it's not a map, but the locations in the table provide a lot of visual info.  Does the map shape already exist somewhere? I searched a bit today and came up with nothing already made. I'm going to start creating a one unless somebody can point me in the right direction. Thanks for any help.

1 ACCEPTED SOLUTION

Accepted Solutions

Staff

Joined:

Jun 17, 2013

Solution

Hi Andy,

I just created the Shape files for the Periodic Table of Elements.They can be found in the sample data section of the File Exchange. The files are called PeriodicTable-Name.jmp and PeriodicTable-XY.jmp. I also uploaded a sample data table, Periodic Table of Elements Example, that uses the shape files and graph builder to display the periodic table, coloring the elements by "description". I hope you find this useful. By the way, I generated the shape files by writing some JSL. Since the table is very "gridded" it was easy to write some JSL to generate the box for each element. In fact, I created the sample data table first, which includes the group and period for each element. I used this in the JSL code to tell me where to locate the rectangle for each element.

Enjoy,

John Ponte

3 REPLIES

Staff

Joined:

Jun 23, 2011

I'm not aware of anything, and agree that it would be nice to have. I've attached some old code below that lays out square shape files on a regular grid. Looking at:

it seems like an 18 by 10 grid would suffice. You than just have to remove the squares that are not required (either programmatically, or by hand).

Anyway, it may give you a head start.

NamesDefaultToHere(1);

makeSquare = Function({centre, size}, {Default Local},

TL = centre + Matrix({-size/2, size/2}); // Top Left

TR = centre + Matrix({size/2, size/2}); // Top Right

BR = centre + Matrix({size/2, -size/2}); // Bottom Right

BL = centre + Matrix({-size/2, -size/2}); // Bottom Left

EvalList({TL, TR, BR, BL});

);

// Make data for Shape table

s = 0.9; // Size of each squaare (pitch is unity)

xMaX = 18;

yMax = 10;

xCoord = [];

yCoord = [];

idNum =  [];

id = 0;

for (x=1, x<=xMax, x++,

for (y=1, y<=yMax, y++,

id++;

pts = makeSquare(Matrix({x,y}), s);

xCoord = VConcat(xCoord, Matrix({pts[1][1], pts[2][1], pts[3][1], pts[4][1]}) );

yCoord = VConcat(yCoord, Matrix({pts[1][2], pts[2][2], pts[3][2], pts[4][2]}) );

idNum = VConcat(idNum, J(4, 1, id));

);

);

// Add the Part ID - All shapes only have one part

partNum = J(NRow(idNum), 1, 1);

// Make Shape table

dt1 = AsTable(idNum||partNum||xCoord||yCoord);

dt1n = "PeriodicTable-XY";

dt1 << SetName(dt1n);

Column(dt1, "Col1") << SetName("Shape ID");

Column(dt1, "Col2") << SetName("Part ID");

Column(dt1, "Col3") << SetName("X");

Column(dt1, "Col4") << SetName("Y");

dt1 << Save("\$DESKTOP/"||dt1n||".jmp");

// Make Name table

dt2n = "PeriodicTable-Name";

dt2 = New Table( dt2n,

New Column( "Shape ID",

Numeric,

Continuous,

Format( "Best", 12 ),

Set Values( (1::id)` )

),

New Column( "Name",

Character,

Nominal,

Formula( "Element " || Char( :Shape ID ) ),

Set Property( "Map Role", Map Role( Shape Name Definition ) )

)

);

dt2 << Save("\$DESKTOP/"||dt2n||".jmp");

// Try it out

New Table( "Superset of Periodic Table",

Add Rows( 180 ),

New Script(

"Graph Builder",

Graph Builder(

Size( 507, 440 ),

Show Control Panel( 0 ),

Variables( Color( :Property ), Shape( :Name ) ),

Elements( Map Shapes( Legend( 7 ) ) ),

SendToReport(

Dispatch(

{},

"",

ScaleBox,

{Label Row(

{Show Major Labels( 0 ), Show Minor Ticks( 0 ),

Show Major Ticks( 0 ), Automatic Tick Marks( 0 )}

)}

),

Dispatch(

{},

"",

ScaleBox( 2 ),

{Label Row(

{Show Major Labels( 0 ), Show Minor Ticks( 0 ),

Show Major Ticks( 0 ), Automatic Tick Marks( 0 )}

)}

)

)

)

),

New Column( "Name",

Character,

"Nominal",

Set Property(

"Map Role",

Map Role( Shape Name Use( "\$Desktop/PeriodicTable-Name.jmp", "Name" ) )

),

Set Values(

{"Element 1", "Element 2", "Element 3", "Element 4", "Element 5",

"Element 6", "Element 7", "Element 8", "Element 9", "Element 10",

"Element 11", "Element 12", "Element 13", "Element 14", "Element 15",

"Element 16", "Element 17", "Element 18", "Element 19", "Element 20",

"Element 21", "Element 22", "Element 23", "Element 24", "Element 25",

"Element 26", "Element 27", "Element 28", "Element 29", "Element 30",

"Element 31", "Element 32", "Element 33", "Element 34", "Element 35",

"Element 36", "Element 37", "Element 38", "Element 39", "Element 40",

"Element 41", "Element 42", "Element 43", "Element 44", "Element 45",

"Element 46", "Element 47", "Element 48", "Element 49", "Element 50",

"Element 51", "Element 52", "Element 53", "Element 54", "Element 55",

"Element 56", "Element 57", "Element 58", "Element 59", "Element 60",

"Element 61", "Element 62", "Element 63", "Element 64", "Element 65",

"Element 66", "Element 67", "Element 68", "Element 69", "Element 70",

"Element 71", "Element 72", "Element 73", "Element 74", "Element 75",

"Element 76", "Element 77", "Element 78", "Element 79", "Element 80",

"Element 81", "Element 82", "Element 83", "Element 84", "Element 85",

"Element 86", "Element 87", "Element 88", "Element 89", "Element 90",

"Element 91", "Element 92", "Element 93", "Element 94", "Element 95",

"Element 96", "Element 97", "Element 98", "Element 99", "Element 100",

"Element 101", "Element 102", "Element 103", "Element 104",

"Element 105", "Element 106", "Element 107", "Element 108",

"Element 109", "Element 110", "Element 111", "Element 112",

"Element 113", "Element 114", "Element 115", "Element 116",

"Element 117", "Element 118", "Element 119", "Element 120",

"Element 121", "Element 122", "Element 123", "Element 124",

"Element 125", "Element 126", "Element 127", "Element 128",

"Element 129", "Element 130", "Element 131", "Element 132",

"Element 133", "Element 134", "Element 135", "Element 136",

"Element 137", "Element 138", "Element 139", "Element 140",

"Element 141", "Element 142", "Element 143", "Element 144",

"Element 145", "Element 146", "Element 147", "Element 148",

"Element 149", "Element 150", "Element 151", "Element 152",

"Element 153", "Element 154", "Element 155", "Element 156",

"Element 157", "Element 158", "Element 159", "Element 160",

"Element 161", "Element 162", "Element 163", "Element 164",

"Element 165", "Element 166", "Element 167", "Element 168",

"Element 169", "Element 170", "Element 171", "Element 172",

"Element 173", "Element 174", "Element 175", "Element 176",

"Element 177", "Element 178", "Element 179", "Element 180"}

)

),

New Column( "Property",

Numeric,

"Continuous",

Format( "Fixed Dec", 12, 3 ),

Formula( Random Normal() )

)

);

Staff

Joined:

Jun 17, 2013

Solution

Hi Andy,

I just created the Shape files for the Periodic Table of Elements.They can be found in the sample data section of the File Exchange. The files are called PeriodicTable-Name.jmp and PeriodicTable-XY.jmp. I also uploaded a sample data table, Periodic Table of Elements Example, that uses the shape files and graph builder to display the periodic table, coloring the elements by "description". I hope you find this useful. By the way, I generated the shape files by writing some JSL. Since the table is very "gridded" it was easy to write some JSL to generate the box for each element. In fact, I created the sample data table first, which includes the group and period for each element. I used this in the JSL code to tell me where to locate the rectangle for each element.

Enjoy,

John Ponte

Community Trekker

Joined:

Sep 29, 2015

This is great, John. I've tinkered a bit with it using our results, so maybe I can get it to do exactly what we need. Thank you for your work on this.