Statistics View

Tell us about your wildest feature dreams. Or just harmless suggestions for improvement.
Post Reply
adamhh
Addicted to Bruji
Addicted to Bruji
Posts: 58
Joined: Sat Nov 22, 2008 11:09 am
Location: London, England

Statistics View

Post by adamhh »

Dear Bruji

I adore the Statistics View and like to watch how certain values rise and fall as the collection expands. Visualisation of data is getting more and more interesting these days and can increasingly help us comprehend our information. However, the Statistics bar charts in the Pedias are very static and unidimensional at the moment. I suspect it is not easily done, but I was wondering if other ways of visualising data might be entertained such as Tag Clouds. This idea has been floating around the boards for a few years now - what's the current opinion?

Failing this, I wonder if some rows could be dynamically set. Eg. If any Year rows could be arranged chronologically as well as by amount. This would visualise how that variable peaks and troughs over time.

I'd also be interested in other's thoughts about data-visualisation and how it might be useful...
User avatar
Conor
Top Dog
Posts: 5343
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Statistics View

Post by Conor »

The tag cloud idea has indeed been floating around for a while, but requires a lot of technical work to implement. So it's not being actively developed at the moment. There are two open versions that I could work from (Robert Pointon and the improved version by Jerry Krinock) but they are not close enough to what I would be looking for in the Pedias that it would require the same amount of work to incorporate. So hopefully as other features get done will have time to dedicate to enhancing the statistics as they are a definitely a fun part of the Pedias.

The chronological order has been requested before and I can see how it would make sense for the release year. I have updated the betas: DVDpedia, Bookpedia, CDpedia and Gamepedia with the required changes to allow chronological order for stats. In fact the next version will default to chronological order for the years.

Should you want to update some of the other stats or add both you can edit the statistics.xml file that is included inside the program resources. DVDpedia.app (Show Package Contents...)/Contents/Resources/statistics.xml.

To sort by label for any section append the following to the section in the XML:

Code: Select all

<key>sortByLabel</key>
<true/>
Price could be interesting shorted by price. You would find the price section and update it so the final bit would look like this:

Code: Select all

	<dict>
		<key>identifier</key>
		<string>price</string>
		<key>type</key>
		<integer>1</integer>
		<key>sortByLabel</key>
		<true/>
	</dict>
If you wanted to have both chronological and count order for release year you would duplicate the section of release year and change the "title" bit so the program does not see it as a duplicate. E.g.:

Code: Select all

	<dict>
		<key>identifier</key>
		<string>theatrical</string>
		<key>title</key>
		<string>Theatrical Release Years (Chronological)</string>
		<key>type</key>
		<integer>1</integer>
        <key>sortByLabel</key>
		<true/>
	</dict>
    <dict>
		<key>identifier</key>
		<string>theatrical</string>
		<key>title</key>
		<string>Theatrical Release Years</string>
		<key>type</key>
		<integer>1</integer>
	</dict>
If you change the statistics.xml file be sure to copy it over into your data folder so that program updates will not overwrite your changes. The new version will look for the local file by default first. The data folder is in ~/Library/Application Support/DVDpedia/statistics.xml.

Of course this means that should we ever add any new statistics you would need to update that file from the shipping version. But having your own statistics can be very useful especially for the custom fields.

The new setting works on the other labels should you want to sort author alphabetically or directors. This article has info about changing the appearance.
User avatar
FineWine
Site Admin
Posts: 852
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: Statistics View

Post by FineWine »

Conor wrote:If you change the statistics.xml file be sure to copy it over into your data folder so that program updates will not overwrite your changes. The new version will look for the local file by default first. The data folder is in ~/Library/Application Support/DVDpedia/statistics.xml.

This article has info about changing the appearance.
Conor is there a way for you to make the program look for the statistics.html file also as a local file first as well? I like my pretty colours. :D
User avatar
Conor
Top Dog
Posts: 5343
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Statistics View

Post by Conor »

Updated DVDpedia beta to find statistics.html in the data folder as well. Because of the images (stars) it still loads from inside the program, but the CSS will be read from the data folder. I.e. if using images they still need to be in images folder in "InfoTemplates" of the program and not locally.

Also fixed a bug with the stats "options" showing you the options for the built in version instead of the customization in statistics.xml in the data folder.
User avatar
FineWine
Site Admin
Posts: 852
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: Statistics View

Post by FineWine »

Thank you Conor - it was a bit of a pain to keep updating that file within Package Contents after each update. I will wait for the Bookpedia and the others for their update.

Cheers
User avatar
Conor
Top Dog
Posts: 5343
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Statistics View

Post by Conor »

Sorry it took me so long, I had to restructure the whole loading code to be flexible. Drop a copy of your files in the data folder and with the next update you won't even notice that you updated as it should pick it up automatically.
genji2000
Captain
Captain
Posts: 22
Joined: Fri Feb 08, 2013 5:52 am

Re: Statistics View

Post by genji2000 »

Hi Conor

What would I add to statistics.xml to sort Release Years in descending order?

Code: Select all

<dict>
		<key>identifier</key>
		<string>releaseDate</string>
		<key>title</key>
		<string>Release Years</string>
		<key>type</key>
		<integer>1</integer>
        	<key>sortByLabel</key>
		<true/>
	</dict>
Thanks.
User avatar
Conor
Top Dog
Posts: 5343
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Statistics View

Post by Conor »

Not something I had taken into account, download beta 102 and then you can add:

Code: Select all

<key>descending</key>
<true/>
genji2000
Captain
Captain
Posts: 22
Joined: Fri Feb 08, 2013 5:52 am

Re: Statistics View

Post by genji2000 »

Sorry, Conor, I should've mentioned it's for Gamepedia, which I think is still on Beta 98.
User avatar
Conor
Top Dog
Posts: 5343
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Statistics View

Post by Conor »

Sorry, Gamepedia Beta also updated.
genji2000
Captain
Captain
Posts: 22
Joined: Fri Feb 08, 2013 5:52 am

Re: Statistics View

Post by genji2000 »

Brilliant. Thanks, Conor.
Post Reply