LastGraph - Generate an SVG Graph of your listening habits

Post and comment on recent Inkscape news.
User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

LastGraph - Generate an SVG Graph of your listening habits

Postby microUgly » Mon Dec 03, 2007 2:54 pm

This isn't Inkscape related, but I thought it was worth promoting a website that makes good use of the SVG standard.

LastGraph will graph the listening habits of Last.fm users and provide it in either PDF or SVGZ format. Here's a graph of my listening habits for a period last year where I listened to a lot of random music - you're going to have to zoom :) (note that graph will expire in a few days).

User avatar
aho
Posts: 180
Joined: Sun Nov 04, 2007 9:51 am
Contact:

Re: LastGraph - Generate an SVG Graph of your listening habits

Postby aho » Tue Dec 04, 2007 2:34 am

The SVGZ lacks a "Content-Encoding: gzip" header. So, right now it can be only viewed directly with Opera (because it does non-standard encode-probing).

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: LastGraph - Generate an SVG Graph of your listening habits

Postby microUgly » Tue Dec 04, 2007 8:34 am

aho wrote:So, right now it can be only viewed directly with Opera

Do you mean as opposed to viewing it in FireFox? I am using Opera, so as you suggest, I didn't see any problem. But I was also able to open it in Inkscape.

User avatar
aho
Posts: 180
Joined: Sun Nov 04, 2007 9:51 am
Contact:

Re: LastGraph - Generate an SVG Graph of your listening habits

Postby aho » Tue Dec 04, 2007 10:07 am

Firefox displays an XML error, because it tries to read the gzipped stream directly... and that obviously isn't well-formed XML.

Code: Select all

XML Parsing Error: not well-formed
Location: http://lastgraph.s3.amazonaws.com/graph_6129.svgz
Line Number 1, Column 1:

��KJG
^


It works with Opera, because Opera always checks the encoding on its own. That is... it always tries to gunzip it - even if no encoding header is set.

This behavior is intentional and off-spec. It's sorta nice, because it improves compatibility. But it's also bad, because webmasters may not notice this under the hood error correction. It's a two-edged sword, really. Generally it's a bad thing, because it leads to sites/web apps, which rely on incorrect behavior. Additionally all those "nice" helper routines add up for all eternity. Once you support something off-spec, you'll need to support it till the end of days.

Using the correct header is pretty easy:

.htaccess

Code: Select all

AddType image/svg+xml svg svgz
AddEncoding gzip svgz

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: LastGraph - Generate an SVG Graph of your listening habits

Postby microUgly » Tue Dec 04, 2007 10:58 am

I've sent an e-mail to the author to let him know.


Return to “News, Events & Developments”