SVG for local dynamic web page app - suggestions needed

Discuss SVG code, accessible via the XML Editor.
jhey
Posts: 2
Joined: Sat May 01, 2010 5:28 am

SVG for local dynamic web page app - suggestions needed

Postby jhey » Sat May 01, 2010 5:31 am

I write and distribute a program that scientists use to conduct a complex statistical analysis. At present the output of a run is a large text file with a great many tables. I want to rewrite the program to give the user easier and more flexible access to individual tables with options for saving tables and for viewing/printing/saving charts from tables.

So I'm looking for a way to have the program write a single file that can be viewed in a browser in such a way as to provide dynamic access (i.e. build on the fly) to tables and charts that the users would like to save/view/print.

In effect I'm looking for a way to have the data be in the same file that also provides the dynamic access to charts and tables of that data.

Is there a way to do this? Maybe with Javascript and SVG?

Obviously I'm new to a lot this.

thanks much for suggestions.

jhey


User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: SVG for local dynamic web page app - suggestions needed

Postby prkos » Sat May 01, 2010 10:00 am

You can definitely do this with SVG and some sort of scripting to transform your text data into SVG, but I think if I had to do it I would use Drupal.

More detailed information would be needed to say something with certainty but it sounds like you have a CSV file, those can be imported as content into Drupal, there are also modules that can display data in charts (I think there's even a SVG module in the making) and print the page content into PDF or just normal print. With a CMS you also have the data history and can do various other things with it, and have fine-grained access control to different data.

No small chunk to chew on either way :)
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

jhey
Posts: 2
Joined: Sat May 01, 2010 5:28 am

Re: SVG for local dynamic web page app - suggestions needed

Postby jhey » Sun May 02, 2010 3:40 am

Thanks for the suggestions. Here is a bit more info. What I am have difficulty with is figuring out what kind of file to have the program produce that, when viewed in a browser, allows the user a lot of flexibility in viewing tables, making charts from tables, and printing charts.

For example the user might run the program (call it X) and produce a result file. call it myresults.svg
When myresults.svg is opened in a browser the user might see a heading like: "Probability densities estimates for model parameters"
Then "Model parameters: A B C D"
Then links for things like: [view table] [view barchart] [print table]
Also the viewer should be able to select those parameters to include in the table or the chart, and to select the charting parameters.

This kind of thing with all these options would be repeated within myresults.svg (and appear in the browser) for a couple of dozen different tables (i.e. all of these tables are in the same SVG file. So there could be hundreds or thousands of possible charts, depending on what columns of what tables the user wants to select.

What I am having difficulty with is envisioning how SVG can accommodate this level of flexibility. There are many examples out there of SVG charts but I still can't really tell what might be a good approach for setting up this level of user interaction. Similarly for Canvas. regarding Drupal - it seems like its for building websites.

None of this involves creating websites - I'm talking about the user viewing a file that contains the results for a single run of the X program. Each user might have many results files, each from a separate run of the program, so it won't help for the application to generate many files. Preferably one file per run of the program.

This also needs to be completely portable across OSs, as is the X program - hence the wish to use SVG and browsers.

Thanks again for any pointers

jhey

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: SVG for local dynamic web page app - suggestions needed

Postby prkos » Sun May 02, 2010 2:15 pm

I understand you don't need a website, I suggested Drupal because it seems it might be the fastest way to get to what you need, because it has a lot of ready-made modules that you can use to handle and display data.

With SVG you have a lot of scripting to do to get what you want, although I might be wrong, maybe someone has an idea how to do it quickly.

With Drupal you'd need your program to output CSV file with your data, importing it to Drupal would be easy and you could have ready-made template that turns each CSV into a long page of tables and charts. You do still need Drupal knowledge to make all this happen, so I don't know in the end what could serve you better.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: SVG for local dynamic web page app - suggestions needed

Postby tomh » Sun May 02, 2010 7:09 pm

Hi, just a quick suggestion. have you had a look at something like this: http://www.liquidx.net/plotkit/ its a JavaScript library for drawing charts in svg. It could probably be used to do what you want.


Return to “SVG / XML Code”