Rostlab / JS16_ProjectA

In this project we will lay the foundations for our system by integrating data from multiple sources into a central database. The database will serve the apps and the visualization tool that will be developed in other projects.
GNU General Public License v3.0
28 stars 14 forks source link

Add more statistics #77

Closed kordianbruck closed 8 years ago

kordianbruck commented 8 years ago

Main issue here: https://github.com/Rostlab/JS16_ProjectF/issues/169

kordianbruck commented 8 years ago

I really have no idea how to calculate the age across the characters. Ideas welcome!

gyachdav commented 8 years ago

Just use the date you /do/ have.

On Mar 15, 2016, at 9:17 PM, Kordian Bruck notifications@github.com wrote:

I really have no idea how to calculate the age across the characters. Ideas welcome!

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub

kordianbruck commented 8 years ago

@gyachdav yea, the problem is that we have negative dates and calculating that in a aggregation function is kinda complex. So I'm currently thinking of doing a cron job that calculates the age once and then simply have the data pulled from the DB when the stats endpoint is called.

togiberlin commented 8 years ago

@kordianbruck As of beginning of the new season 6, we are at this date: 305 AC With that information, we could calculate the actual age of characters BAC (Before Aegons Conquest of Westeros) AC (After Aegons Conquest of Westeros)

kordianbruck commented 8 years ago

@togiberlin well yes, but we have the birthDate and deathDate both of which are simple year numbers. Negative numbers are BAC and positive AC - Now I can't simply subtract the birthDate from the deathDate because of the negatives. That's the actual problem I don't know how to solve with a mongoose $aggregate query.

gyachdav commented 8 years ago

how about setting a rule

abs(birthDate)>abs(deathDate) ? birthDate = -birthDate

kordianbruck commented 8 years ago
Birthdate       Deathdate                abs(birthDate)>abs(deathDate)         age = deathDate - birthDate
      -                     -                   => true                                      = -deathDate + birthDate
      -                     +                  => depends                               => depends
      +                    -                   => no possible                          not possible
      +                    +                  => false                                     = deathDate - birthDate

Case 2 will still have to be handled individually. E.g.: born -30, death in 10. That would evaluate to true with the above rule but thus will calculate age -20

sacdallago commented 8 years ago

You guys never cease to amaze me :D We are gonna get so much traffic :P btw, you will never guess the coolest domain name ever we got for this project ! :D :D :D :D

togiberlin commented 8 years ago

@kordianbruck nice overview. We should also keep in mind, that there is no year 0 in the real-world before christ/BC and anno domini/AD system. What about the GoT world? As I can see from here, they have a year 0 The Targaryen Conquest - Timeline (search for keyword "0 AL")

kordianbruck commented 8 years ago

Yea, thats another good point. It is just too complex to do in one go in a aggregation function I think. I will have to experiment more...

togiberlin commented 8 years ago

@kordianbruck How to store negative Dates (BC) in JavaScript by using .toISOString() parsing method

gyachdav commented 8 years ago

More stats:

gyachdav commented 8 years ago

Apologies for the formatting issues I'm posting it all from my phone while on the plane back to NY :p

gyachdav commented 8 years ago

where does that stand? Have you communicated with F so they would show all your wonderful stats?

gyachdav commented 8 years ago

@kordianbruck feel free to reassign to one of the many devs you have at your disposal.

gyachdav commented 8 years ago

@togiberlin beautiful work https://github.com/Rostlab/JS16_ProjectA/blob/master/wikiData/statistics/CharacterStats.pdf shame i found it by wandering around and that you haven't brought it out.

Anyways this is exactly what i am looking for to be shown on the site. It would be best if we can show this in sections instead of showing a long page with all the stats. Think about a way that we can incorporate this material in a weekly blog following airing of each episode.

Moving forward, can you please take the lead on that and coordinate with @jorjo1 @mammuth the move of this data to be presented using google charts or some other quick way to visualize the stats you collected?

@kordianbruck i'm reassigning this to @togiberlin

gyachdav commented 8 years ago

Status? @togiberlin we need your feedback here.

togiberlin commented 8 years ago

@gyachdav Actually what I did there was done manually with Numbers (Apple's Excel equivalent). I used a very early version of our scraped data. If you want an updated version, what are the requirements?

I would prefer static. For static, there are many Photoshop dashboard templates Infographic template example Another example here, very hipster but takes a lot of time

Also: when is this needed? I'm writing exams on 31st / 1st and 6th.

gyachdav commented 8 years ago

We'll go with what you're most comfortable with. Just remember that the color scheme needs to be adapted to the color scheme and style used on the website. Please coordinate with @marcusnovotny about generating those info graphics. He will work on creating landing pages next week and will need your support. Would you be able to help next week?

togiberlin commented 8 years ago

@gyachdav I have 3 upcoming exams, I need to prepare for it. But I can dedicate an hour per day for the infographic. I would orientate the UI/UX on Project D. Supporting him...well, what I can do is give some advice here and there. @marcusnovotny How is the progress on the landing page? Have you started with a wireframe or UI design?

gyachdav commented 8 years ago

@togiberlin sounds good. glad to hear you're on board and good luck on those exams!

marcusnovotny commented 8 years ago

@togiberlin Hey there! We'll decide on number & topics of landing pages tomorrow. Then I'll write & collect the content, put it into .html files and send it to Group F, maybe along with a simple wireframe. The design will be handled by them. Some relevant statistics would make nice filler elements next to our actual tools on those pages. I'll get back to you tomorrow with more info, just to give an overview already. :)

Legenzoo commented 8 years ago

Status? Is this really feature freeze?

gyachdav commented 8 years ago

changed to delivery

togiberlin commented 8 years ago

Here is the main thread: https://github.com/Rostlab/JS16_ProjectF/issues/169

sacdallago commented 8 years ago

Let's follow up on the main thread