Science Forums
Advanced search
User Name
Password

Science Social Network
home    members    help/rules    who is online    contact   

Go Back   Science Forums > Community Forums > Watercooler
Become a science forums sponsor today
Reply
 
LinkBack Thread Tools
Old 03-30-2007   #11 (permalink)
Turtle's Avatar
Dibbler

Platinum Subscription
Sponsor

Latest blog entry:
dodged the bullet!
 
Turtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond repute
 



Arrow Re: Simple graphs using html tables

Quote:
Originally Posted by CraigD View Post
Borrowing a trick from imdb.com's ratings graphs, I've attached Turtle's data imbedded within table tags in a small html file. Anyone with patience and a text editor can edit it to add/remove rows, change values, or fiddle with its format.

What a unique view! It keeps the general line of the rise & fall without obscuring the exact values, and the Moon phase tags are clear without confusing the graph. I likey!!!

So I can add the rest of my data right to that html somehow?

Many thanks.
Reply With Quote
Old 03-30-2007   #12 (permalink)
CraigD's Avatar
Creating

Hypography Staff Member
Administrator
Editor

 



Post Re: Simple graphs using html tables

Quote:
Originally Posted by Turtle View Post
So I can add the rest of my data right to that html somehow?
Yes.

Just save a copy of TEMP.html somewhere convenient, then open the file in your favorite text editor (notepad.exe works for me).

Each pair of rows is represented by a couple of lines of html like this
Code:
 <tr><td>5/29/2006<td nowrap=1><img src=http://i.imdb.com/blue.gif width=199 height=5>&nbsp;199
 <tr><td><td nowrap=1><img src=http://i.imdb.com/neutral.gif width=547 height=5>&nbsp;547
To add a couple of lines, just copy these 2 lines to wherever in the table you want the new lines, then edit the “5/29/2006” to the new date, change both “199”s to the new US number, both “547”s to the new world number.

To get rid of lines, just delete them.

You can play around with the table, changing things to see the effect. And, of course, you can insert the “<table> … </table>” into another html document, allowing it to be preceded or followed by text, graphics, have a background graphic, or anything else that can be done in html, which is purtnear anything.

It’s handy to open the file in a browser window, and after making an edit, hit “reload” to redisplay it. Not quite like a fancy WYSIWYG html editor, but pretty close.

What makes an html table word are basically these 3 tags (formally called elements): <table>; <tr> (table row); and <td> (table data, or cell). What makes this table a graph is the <img> tag. Its width attribute specifies how many pixels wide its displayed. Its src attribs just refer to a couple of 1-pixel graphics – the width and height attribs stretch the graphic to the specified size. The <td> tag’s nowrap attrib prevents the browser from allowing the number following it to be wrapped to a new line, which would ruin the graphs appearance, and the &nbsp; (non-breakable space) character inserts a space that the browser will always honor. I should probably have but one after each date, to keep the bar from crowding them.

There are a lot of other things that can be done with tables. W3C HTML has links to the latest specification, tutorials, and other stuff related to html.

You may notice that I didn’t use </td> or </tr> end tags. These tags have been optional since the early days of html – if you don’t use them, the browser assumes that the next <td>, <tr>, or </table> ends the previous <tr> or <td>.


----------------
Moderator: Computers and Technology; Medical Science; Science Projects and Homework; Philosophy of Science; Physics and Mathematics; Environmental Studies
Reply With Quote
Old 03-31-2007   #13 (permalink)
Turtle's Avatar
Dibbler

Platinum Subscription
Sponsor

Latest blog entry:
dodged the bullet!
 
Turtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond repute
 



Arrow Re: Simple graphs using html tables

Quote:
Originally Posted by CraigD View Post
Quote:
Originally Posted by Turtle
So I can add the rest of my data right to that html somehow?
Yes.

Just save a copy of TEMP.html somewhere convenient, then open the file in your favorite text editor (notepad.exe works for me).

Each pair of rows is represented by a couple of lines of html like this
Code:
 <tr><td>5/29/2006<td nowrap=1><img src=http://i.imdb.com/blue.gif width=199 height=5>&nbsp;199
 <tr><td><td nowrap=1><img src=http://i.imdb.com/neutral.gif width=547 height=5>&nbsp;547
To add a couple of lines, just copy these 2 lines to wherever in the table you want the new lines, then edit the “5/29/2006” to the new date, change both “199”s to the new US number, both “547”s to the new world number.

To get rid of lines, just delete them.
Shweet! I followed directions & I have this much working so far. A deep genuflection in your direction Craig! Of to work on data entry, and here's my first few edits. I changed the file name in case I made an irrecoverable error.

PS Rats! It looked good a minute ago & now the lines are gone! I'm on it like a boil on a butt!
Attached Files To view attachments in this forum your post count must be 1 or greater. You currently have 0 posts.
Reply With Quote
Old 04-01-2007   #14 (permalink)
Turtle's Avatar
Dibbler

Platinum Subscription
Sponsor

Latest blog entry:
dodged the bullet!
 
Turtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond repute
 



Arrow Re: Have Rep, will trade for graph construction

Quote:
Originally Posted by C1ay View Post
Have you checked the National Earthquake Information Center for your missing data? I think you'll find a wealth of information there to support your endeavor
Acknowledged. It is a stub of that page that I collected the data from. I'll poke around to see if they have an archive, but the maps are updated at least every hour & I only took data once a day and generally between 10am & Noon.

Here's the exact links:
World Map >>> USGS Earthquake Hazards Program » Latest Earthquakes in the World - Past 7 days

US Map >>> USGS Earthquake Hazards Program » Latest Earthquakes in the USA - Past 7 days

As soon as I get all my data in I (we) can compare current status with our plot(s).

Speaking of the graphing, when I double-click on my edited html file in its folder on disk, it opens as a web-page and everything is correct; however, when I attached it above and open the attached version, the bars have disappeared from the graph!
Reply With Quote
Old 04-01-2007   #15 (permalink)
Turtle's Avatar
Dibbler

Platinum Subscription
Sponsor

Latest blog entry:
dodged the bullet!
 
Turtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond reputeTurtle has a reputation beyond repute
 



Arrow Re: Have Rep, will trade for graph construction

Quote:
Originally Posted by Turtle View Post
...I'll poke around to see if they have an archive, but the maps are updated at least every hour & I only took data once a day and generally between 10am & Noon.

Here's the exact links:
World Map >>> USGS Earthquake Hazards Program » Latest Earthquakes in the World - Past 7 days

US Map >>> USGS Earthquake Hazards Program » Latest Earthquakes in the USA - Past 7 days
First, I am trying to match the Moon phase to the quake activity as a correlation because of geologist Jim Berkland's claim it is a strong predictive aid.

Second, in posting the above I realized the map counts are for the last 7 days, so this may account for the graph peaks at the Quarters rather than Full/New where I expected peaks. I'll have a better picture when I get all 8 months of my data input.

Thanks again all you contributing graphers.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Common and Trade Names of Chemicals Michaelangelica Chemistry 10 11-25-2006 05:53 AM
The spamsite Marketplace is your resource for magnesium trade elito Introductions 4 08-19-2006 11:08 AM
U.S. trade deficit sets another record Solve et Coagula Philosophy and Humanities 5 02-12-2006 09:56 AM
Trade Secrets Robust Science Projects and Homework 2 05-06-2005 09:15 PM


All times are GMT -8. The time now is 11:22 PM.

Hypography?

Hypography [n.]: A combination of "hyperlink" and "bibliography" - ie, a list of links to electronic documents. Comparable to discography and bibliography, but not cartography.

We have been online since May 2000, and aim to be the best place to find and share science-related content of all kinds.

Share the love!

Please add more science to your life. Use our RSS feeds on your blog, your portal, or your favorite feedreader!

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. Copyright © 2000-2008 Hypography
Part of the Hypography - Science for Everyone Network