We have SQL data that shows how a person rates a video by seconds time in the FLV. There can be 1000-5000 entries for the same video, the task is the following: Make a script that will turn the data into a line graph, similar to the YouTube Hotspots link below [login to view URL] X axis = time in the video, starting from 0.00 to the length of the video (length specified in database, "movielength", in minutes:seconds format. See database structure below) Y axis = Cold - Average - Hot, where Average = 5, and Cold goes from 5->0 and Hot from 5->10 The program will take an average of all the users in the database's results, and create the graph that shows the info. Not all people are voting at the same time, so the program must calculate an average score at each time measured. [login to view URL] and it would calculate from all of the [login to view URL] entries in the database. The format for "ratings" is secs-rating, for example 17-6 in the example below means 17 seconds, rating of 6/10 Here's the database structure and sample output: CREATE TABLE `videoratings` ( `id` int(11) NOT NULL auto_increment, `video` varchar(255) NOT NULL default '', `ip` varchar(255) NOT NULL default '', `ratings` text NOT NULL, `cdate` datetime NOT NULL default '0000-00-00 00:00:00', `movielength` tinytext NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=3 ; INSERT INTO `videoratings` VALUES (2, '[login to view URL]', '[login to view URL]', '17-6,20-7,25-8,36-7,44-6,63-5,70-4,77-3,86-2,95-1,105-0', '2008-10-27 11:48:23'); INSERT INTO `videoratings` VALUES (3, '[login to view URL]', '5.12.20.50', '15-6,25-8,27-7,39-6,46-7,64-6,72-5,75-4,86-3,95-2,105-1', '2008-10-27 11:48:23'); The video length is specified in a new table, "videolength" by the filename: CREATE TABLE `videolength` ( `filename` tinytext NOT NULL, `videolength` tinytext NOT NULL ) TYPE=MyISAM; INSERT INTO `videolength` VALUES ('shh3', '2:05');
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows? (depending on the nature? of the deliverables):
a)? For web sites or? other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software? installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
SQL/GRAPHS