Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

data to graph

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
ilias



Joined: Mon Jun 06, 2005 11:38 am
Posts: 69

PostPosted: Mon Sep 25, 2006 12:26 pm    Post subject: data to graph Reply with quote

Hi,
There is a site which has usefull info that I want to display on a graph
This is the site:
http://rredc.nrel.gov/solar/calculators/PVWATTS/version1/International/pvwattsv1_hr_intl.cgi

and because it won't us see it, because it requires a series of steps to calculate the final result, here is a sample of the output.

1987, 12, 16, 08:00, 0
1987, 12, 16, 09:00, 1104
1987, 12, 16, 10:00, 1853
1987, 12, 16, 11:00, 1997
1987, 12, 16, 12:00, 1863
1987, 12, 16, 13:00, 1322
1987, 12, 16, 14:00, 571
1987, 12, 16, 15:00, 452
1987, 12, 16, 16:00, 72
1987, 12, 16, 17:00, 0

The format is as follows
"Year", "Month", "Day", "Hour", "AC Power (W)"

I know basic C and C++ programming.
of course I'm using GNU/Linux

Here's the case; I need a program that will automatically read the data displayed on the site and it will be able to print the data on a graph.
Any help?
Thanks
Elias
Back to top
View user's profile Send private message
Steogede
LXF regular


Joined: Thu May 04, 2006 6:39 pm
Posts: 146

PostPosted: Mon Sep 25, 2006 4:30 pm    Post subject: RE: data to graph Reply with quote

If you know some C and C++, you should probably be able to pickup enough PHP to do it in PHP. Using say curl to download the page and explode on each line to convert each comma separated into an array (there are problably more steps involved). It really depends how automated you want it to be. The simple option is to save them all into a text file, load it into into OpenOffice.org Calc as a CSV (comma separated values) file and then create your graph.

BTW what is your project, it seems quite interesting.
Back to top
View user's profile Send private message
ilias



Joined: Mon Jun 06, 2005 11:38 am
Posts: 69

PostPosted: Mon Sep 25, 2006 5:28 pm    Post subject: RE: data to graph Reply with quote

Depending on the number of Solar Modules installed and based on several other factors (inverter effeciency, sun positioning, solar tracking system, effeciency of the solar modules, etc) the daily power production is displayed. I will perform such an installation and I'm investigating the steps required to get a preffered amount of power.
Probably the steps involved in the process is as you point them out to be. I'm interested in the final result and also due to the vast ammount of data (daily production of power from solar modules for about a 20-years period) I simply can't enter the data to whatever program will generate the graph by hand.
So I would greatly appreciate it if you could be more detailed.
By the way what "cgi" stands for?
It's the web page pointed on the first message. I usually see html pages. Is there anything special about cgi?
Back to top
View user's profile Send private message
ollie
Moderator


Joined: Mon Jul 25, 2005 12:26 pm
Posts: 2749
Location: Bathurst NSW Australia

PostPosted: Tue Sep 26, 2006 1:31 am    Post subject: RE: data to graph Reply with quote

CGI - Common Gateway Interface. This is server side scripting, usually in Perl, that is processed by the server before sending the HTML output to the client (web browser). The idea was to develop a common interface regardless of the type of web server - but someone decided they didn't like the idea and developed ASP.

PHP (PHP Hypertext Preprocessor) and even JavaScript can also be used for CGI scripting. PHP was designed for the Internet and is probably the most common server side scripting language used over the Internet - although Python is becoming very popular.
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast