electricitymaps / electricitymaps-contrib

A real-time visualisation of the CO2 emissions of electricity consumption
https://app.electricitymaps.com
GNU Affero General Public License v3.0
3.56k stars 942 forks source link

Add timeline to explore map at previous times #83

Closed corradio closed 6 years ago

corradio commented 8 years ago
ThierryOllivero commented 8 years ago

Oh, I did not see that one. Fully agree. With ENTSOE and the work from Adam it should be doable.

corradio commented 8 years ago

It's already doable in principle, because we store historical data in a database. Another option is to show sparklines for each country, where we can show a short timeseries of the last X hours

martindaniel4 commented 7 years ago

@corradio, @ThierryOllivero - For that one, I was thinking of a timeline graph that would display the average emissions per kwh produced in Europe. You can click on the graph and the map updates to that date.

Here are few design ideas / inspiration :

screen shot 2016-12-14 at 10 23 28 am

For our case, mouseover might be too subtle, but I like the overview first and details on demand. I understand that 2012 and 1988 where the two worst drought for corn. I can then drill down to understand what's happening at the geographic level.

Brushing might not be the best behavior for us as we are not really interested in aggregating over a long period, but I think the datetime graph is what we are looking for :

screen shot 2016-12-14 at 10 34 29 am

I also like the ability to click on an hyperlink and update the map. Like when you click on what happened on Jan 12 :

screen shot 2016-12-14 at 10 38 15 am

corradio commented 7 years ago

Very good input. I definitely think we should show a timeline / graph of co2 on which you can click to see the situation. A small player would also be nice, to animate through time, but it might be CPU intensive. The first thing to do here is to start designing or coding the timeline with random data. Then I can go ahead and make a time series of EU average of co2, fetch all the relevant data, and plug things together

corradio commented 7 years ago

We could also use something like that: https://bl.ocks.org/mbostock/4063318 image

ThierryOllivero commented 7 years ago

Yeah, this is more useful when you have that strongly vary every day, between "None, A little, A lot".

Veloviewer uses it for sports activities:

image

It shows all the day during which I ran the last 3 years. Very useful to see patterns, but not to navigate from a day to another.

We could have some kind of drill down:

image

First you click on a period, like 3 months, then drill down to 2 weeks, then the exact day, then the exact time. Not sure if everyone likes it though.

corradio commented 7 years ago

In order to show a time series of CO2 data, certain things have to be done on the backend. Firstly, we need to compute the CO2 timeseries, and store it somewhere. As this is not done for now, I suggest that we keep the first version simple. For a first version, what about showing a datetime picker like http://www.malot.fr/bootstrap-datetimepicker/demo.php ? Play around with it and let me know what you think. It's quite a quick win to implement such a picker, and the frontend logic for going back in time is already there. Let's act quickly!

aknvictor commented 7 years ago

I'll work on this simplified version

corradio commented 7 years ago

@Viktour19 any updates?

Also, here's an interesting comment that we got:

corradio commented 7 years ago

I'll start to work on this.

corradio commented 7 years ago

I'm experimenting with something like that:

image

We would of course remove the white input box, and either have a link or an icon next to the current time and date to edit each of them separately.

martindaniel4 commented 7 years ago

@corradio - Love it.

To simplify, would it be possible to make the clickable / expand in the calendar ?

Something like in Google Analytics, with an arrow on the right :

screen shot 2017-01-13 at 10 56 08 am

screen shot 2017-01-13 at 10 56 57 am

corradio commented 7 years ago

The picker is fairly limited: https://chmln.github.io/flatpickr Feel free to look at the doc! However we will have to code our own picker at some point..

corradio commented 7 years ago

Also, because there is not "submit" button, I think I will add an "edit" button next to both time and date, and we will be able to change each separately.

ThierryOllivero commented 7 years ago

I was more thinking about something like that:

image

But with months instead of years, or something like that. Would it be too complicated or too heavy for the server?

martindaniel4 commented 7 years ago

@ThierryOllivero - what's the value of a picker like this ?

If this usage is to pick a specific date, I like oli proposal. Simple enough.

@corradio - sorry did not mean to build the whole GA picker. I just mean that you have one displayed date on the top AND one date to pick your date. I think you can combine both in one date displayed.

This is for instance what Airbnb is doing on the search page :

screen shot 2017-01-13 at 11 57 53 am

Also you can just push it and we will tweak it afterwards

ThierryOllivero commented 7 years ago

The value is to quickly change from a date to another and see directly the change on the map.

A bit like here: https://earthengine.google.com/timelapse/

People find the map fun and entertaining, they want to play with it, to see the color change quickly, they want to find when Germany was Green, when France was orange, when Denmark was black. They want it to be quick.

ThierryOllivero commented 7 years ago

@corradio : What happened to your idea of using this: http://www.malot.fr/bootstrap-datetimepicker/demo.php ?

corradio commented 7 years ago

@martindaniel4 yes indeed this is what I was thinking of!

@ThierryOllivero totally agree, we should be able to go with a timeline and fast switches. I have some ideas about a more advanced picker, but it needs more thinking. Specifically, we need to both be able to navigate to a specific date, and to navigate smoothly between them. At Snips I had developped this kind of UI:

image

It's a timeline with a calendar. You can drag the current "dot" horizontally (to see same time of day across days) or vertically (to slide through a particular day), or you can use the big slider to slide across time without constraints. Background colors represent some kind of state (could be mean CO2 over Europe for example). Something like that could be a good next step. For now I want to do a quick win with a simple picker. More advanced UI can be done later.

About the malot timepicker, it had too many dependencies and was too big in size. Flactpickr is easier and more configurable in that sense.

ThierryOllivero commented 7 years ago

I like your timeline, without the colors.

OK to start with a simple picker, we'll improve later :)

corradio commented 7 years ago

I've played a bit around with it, and the picker is hard to customise. What I did for now, is that I added a flag so you can pick another time: http://electricitymap.tmrow.co/?timeline=true

We need to think harder about this. For now I see two ways:

corradio commented 7 years ago

Do we still need this, now that we are able to see the last 24h as a graph?

ThierryOllivero commented 7 years ago

I believe so. At some point, people might want to see how it is in Winter, in the summer, on their birthday, etc.

corradio commented 7 years ago

I'm closing this because this is an advanced feature for which we don't have the resources to execute on

corradio commented 7 years ago

For inspiration, we could use something like this to explore days: http://echarts.baidu.com/gallery/editor.html?c=calendar-effectscatter and then use the history graph to explore within a day.

corradio commented 6 years ago

Lots of good ideas, but closing due to inactivity. I also think we got it covered :)

nielsle commented 5 years ago

It could be great to have aggregate data for the last month grouped by time of day.

This would reveal that countries like Denmark rely on windy weather to be eco-friendly. And as AFAICS this feature would only require minor changes to the GUI.