Closed kordianbruck closed 8 years ago
I really have no idea how to calculate the age across the characters. Ideas welcome!
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
@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.
@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)
@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.
how about setting a rule
abs(birthDate)>abs(deathDate) ? birthDate = -birthDate
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
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
@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")
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...
More stats:
Apologies for the formatting issues I'm posting it all from my phone while on the plane back to NY :p
where does that stand? Have you communicated with F so they would show all your wonderful stats?
@kordianbruck feel free to reassign to one of the many devs you have at your disposal.
@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
Status? @togiberlin we need your feedback here.
@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.
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?
@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?
@togiberlin sounds good. glad to hear you're on board and good luck on those exams!
@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. :)
Status? Is this really feature freeze?
changed to delivery
Here is the main thread: https://github.com/Rostlab/JS16_ProjectF/issues/169
Let's follow up on the main thread
Main issue here: https://github.com/Rostlab/JS16_ProjectF/issues/169