Entrance demos for those who know SQL
First Demo
Step 1. Install Entrance and get it connected to a MySQL server. Here are the instructions for doing this.
Step 2. Point your web browser at http://todlandis.com/create_country.sql, select all the lines and copy them to the clipboard. Open Entrance, click the "New" button, then click in the edit area. Paste.
Step 3. Click the green "Run" button on the tool bar to create a table "Country". (This query fails if you already have a table named Country. You can rename or delete an existing Country table from the Entrance explorer tree popup)
Step 4. Next point your web browser at
then copy and paste it into Entrance as in step 2.
Step 5. Run the query, and you will see this correlation chart:
In this chart, the population, area, and gdp columns have been plotted two-at-a-time in scatter charts. For example, the scatter chart to the right of the "population" label plots countries by population and area, with population along the y axis, and area along the x axis. No particular pattern is evident in the data, yet.
Now click on the "SQL" tab and modify the plot query, adding "where region like Europe" to make it look like this:
plot correlation
triangle, triangle, triangle, color override
with
frame 20 20 400 400
select population, area, gdp, color from country
where region like 'Europe';
Click run again, and you will see a rather striking pattern in the relationship between GDP and population in Europe:
Step 6. Now you can paint color, on data points that interest you by pressing and holding down the mouse button, as you drag out a rectangle over one of the charts. Try it. When you paint color this way, you are actually updating the "color override" column in the Country table. This means that you can paint points with color in the chart, then use to SQL to select them, calculate their statistics as a cluster and so on from other SQL queries. (Data painting in Entrance is based on a "brushing" technique developed by William Cleveland and described in his book The Elements of Graphing Data).
Step 7. You cannot select data items directly from a correlation chart yet (that's coming), but you can from a scatter chart. Try it out data selection with this script: http://todlandis.com/demo/scatter_with_painting.sql
Second Demo
(By now you have Entrance connected, so let's skip the setup)
Step 1. Point your web browser at: http://todlandis.com/demo/histogram1.sql and copy the script into an Entrance query pane. (Use the "New" button again)
Step 2. This query creates a table of test scores and then draws a frequency bar chart:
Step 3. Again, drag out a rectangle over one or two of the bar tops. Control-click or right-click on the chart to bring up a popup that will let you save the image as a PNG or JPEG file.
Step 4. Although, "Select these" isn't implemented yet for queries containing "group by"yet, you will be able to "Zoom in". Try that, then control-click or right-click again to zoom out or pan the result.
Please note: This web page and other Entrance documentation web pages are copyrighted material and have not been released under the terms of the GPL.
Copyright (c) Tod Landis 2006,2007 All Rights Reserved Modified: April 25, 2007
Java and the Java Coffee Cup Logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. Solaris is a trademark of Sun Microsystems, Inc. MySQL is a registered trademark of MySQL AB in the United States, the European Union and other countries. Windows is a trademark of Microsoft Corporation. Macintosh is a trademark of Apple Computer, Inc.