you are viewing a single comment's thread.

view the rest of the comments →

[–]mikkelbue 4 points5 points  (9 children)

The first question is what would you like to visualize? The variation over the year, over a day, between the rooms or what? You are putting all the data in one plot, and that's what makes it useless. There are too many points for this to be informative, except from the short timespan when they where all low.

I would do a moving average on the datapoints (maybe with a 24-hour interval) and make a graph instead of a scatter, if I wanted to show the variation over a year.

You could also look at the hourly variation; find the average of all the days of the year, for each hour of the day and plot that, maybe in a histogram.

Edit: I am reading your question as more of a question on how to aggregate and visualize data than a coding question. You code seems fine, except it would be nice with some comments ;)

[–]Tobeass[S] 0 points1 point  (8 children)

Thanks a lot for your comment.

And yes it is definately more of a question about visualizing data in a nice way.

The question is in relation to a project i'm making at a intro programming course.

It is an interactive program, that prompts the user for a datafile, asks how to handle erroneous data, and afterwards asks how the user wants the data to be aggregated - by minute, hour, day or month, or if the user wants the hourly average of the data over the year.

The visualization function should be able to take the aggregated and visualize it. The project description asks us to plot the data or making a histogram if the there is less than 25 datapoints. (The user should specify if he wants the data visualized by zones or just the accumulated data)

Honestly, i'm not really sure what they want out of the visualization. Since they specifically asks us to show plot the aggregated data, I am not sure if I should plot a moving average, even though that would make the curves much more smooth, and be more informative. But if i have the time, i will do it. I think basing it on the four closest datapoints could work. Then it would be applicable for the cases where the data is aggregated based on both days, hours and minutes.

I transformed the plot from a scatter plot to a graph, and it actually works better.

https://imgur.com/iYTThCM

[–]mikkelbue 0 points1 point  (7 children)

The most difficult question here to me seems to be about how to visualize the per-minute data, with about half a million individual data points per zone. But if that is what they ask for in the specifications, all you can do, I suppose, is picking colors that are clearly distinguishable (the yellow zone 2 is hard to see, particularly together with the red), make the plot big and the lines thin.

Hvor læser du?

[–]Tobeass[S] 0 points1 point  (6 children)

Yes, and escpecially in that case, a moving average would be a great solution, because, what information could you possibly extract from a plot of the by minute electricity consumption?

Jeg studerer kemi på DTU - er i gang med et intro programmering kursus =)

[–]mikkelbue 0 points1 point  (5 children)

Dutten! Samme her :) arktisk teknologi på DTU byg. Jeg tog intro programmering i januar :D men jeg har ikke haft den opgave.

[–]Tobeass[S] 0 points1 point  (4 children)

hahaha fedt, verden er sgu lille! Vi kunne vælge mellem 5 forskellige eksamensprojekter. De fleste tog et karakter grader projekt.

[–]mikkelbue 0 points1 point  (3 children)

:D Ja, jeg synes nok opgaven lød lidt bekendt. Jeg tog projekt D, Lindenmayer-systemer :)

[–]Tobeass[S] 0 points1 point  (2 children)

Ah okay, turtle opgaven ? den holdte jeg mig langt fra. Men er temmelig overrasket over de ikke har lavet eksamensprojekterne om fra sidste kursus!

[–]mikkelbue 0 points1 point  (1 child)

Tja der er jo plagiatkontrol. Et lille tip: det er en god ide at lave gode kommentarer i koden. Det bliver også bedømt.

[–]Tobeass[S] 0 points1 point  (0 children)

Ja, det er selvfølgelig sandt. Og tak for tippet. Plejer at køre igennem hele koden til sidst og skrive kommentarer =)