-
Notifications
You must be signed in to change notification settings - Fork 952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Real-time data for Ecuador #1558
Comments
It would be great to ask them for figures per hour (and if possible in text format), if someone can. If no other options come up, I don't mind setting up a proxy service that would save previous hours' values and calculate the most recent figure. |
With some resizing I can get OCR to work. chris@ThinkPad:~/Downloads$ convert image019.png -resize 100% ec_resized.png
chris@ThinkPad:~/Downloads$ tesseract ec_resized.png ec_read It would be fun to use a proxy to make this a real time source, but trying to get a better format from them is probably the first step. |
Hello |
Hi @zonepilot, thank you very much for offering to help with this. Contact details are at http://www.cenace.org.ec/index.php?option=com_contact&view=contact&id=1:name&catid=12:contacts What we would like is for the data in those images to be made available in a text format (json, csv, xml for example). We would also like it in an hourly format rather than cumulative for the entire day. Simply put the map uses a number of parsers to read/scrape data from many different sources. That data is transformed into carbon intensities for every country which then colours the map in real time. There are some parsers (e.g. Chile (SIC)) that get data retrospectively which does not show on the live map. I hope that makes sense but please ask any questions you need to. |
OK, I have sent an inquiry asking for hourly data in text format, while referring to this project with links to website etc, let's see what comes out of it!, BR |
Hey guys, I had emailed them before in Spanish as well and finally got a response. Looks like @zonepilot's follow up email got the ball rolling. Thanks! My translation of the response is below: "The CENACE maintains information on its portal that has the approval of the Dirección Ejecutiva. It looks like they are happy to provide an area on the webpage where one can download the numbers in the image. I think the second paragraph wants to say they don't get the hourly values but they could estimate them by continuously comparing the totals they receive (as @jarek previously suggested we could do to work out hourly values). How long this will all take remains to be seen. |
Hey everyone! Any updates on this (at least from the CENACE side)? I'm currently living in Quito (where CENACE is located) and I'm willing to help. |
Hey @po5i nothing yet, maybe you'd like to send a follow up email to the contact details in #1558 (comment) |
Any news here? |
By the way, I think this could be tagged "parser buildable". Even if doing the math with the combined generation to figure out the hourly generation isn't an option, it is still possible to measure the height of the various categories in the Curva de Generatción graph. (The downside being that otra generación isn't further broken down there, and it'll probably be less exact.) Edit: also note that there are a few more screens on that web page (links at the bottom). One of them is as real-time demand ("DEMANDA TIEMPO REAL"), and this one has data for the current hour. Edit 2: As an aside, when implementing the parser be careful: the "otra generación" at the left of the screen does not include renewables, but the stacked "otra generacion" to the right of the center does. |
Any idea how we could parse the data from link (2) mentioned above? The current production value is the number on top of each bar, as far as I have understood the interface.
|
https://potencia.celec.gob.ec/reportepotencia.html uses code and API that seems pretty hacky, but it works, and it should be easy enough to replicate. The main chart ("potencia") seems to have MW data columns coming from a POST request to https://potencia.celec.gob.ec/GeneradorConsultas3.php with form data If the data seems reliable, we should be able to parse it fairly easily. |
According to (1) https://www.celec.gob.ec/index.php/115-informacion-general/1770-generacion, the installed capacity of Ecuador is about 70% hydro, 30% oil and <1% wind. However, (2) https://potencia.celec.gob.ec/reportepotencia.html only reports thermal, i.e. oil, production - with the exception of Lumbaqui, which accounts for roughly 0.2% of current production. Given that 70% of the installed capacity is hydro, it seems suspicious that only 0.2% of the reported production comes from hydro. We should probably try to find other sources which also include more hydro production. Also found the new URL of the comprehensive dashboard which @alixunderplatz already mentioned back in 2018 but was moved: http://www.cenace.gob.ec/info-operativa/InformacionOperativa.htm. |
Building a consumption-style parser for Ecuador 🇪🇨 is still possible from the available data! This image shows the hourly demand as of 2 hours ago (and as of 3 hours ago just below): The demand-image is located at: Only downside: the need to use OCR / tesseract, but the content to read is simple and we managed worse image quality before 😄 |
Wouldn't a production parser also be possible with the data from http://www.cenace.gob.ec/info-operativa/InformacionOperativa.htm? |
@VIKTORVAV99 the datetime is specified by the little blue bar just under curva de generacion on produccion tiempo real. new level of OCR skills required :D as the graph is updated hourly, likely at a fixed minute-range, datetime should be easy to determine. |
This is going to be one complicated parser if we manage to do it 😅 |
I tried to find a "Curva de generación" with export on it, if someone ever tries to build a parser based on that graph. Here's a graph that has it: https://web.archive.org/web/20230517214209/http://www.cenace.gob.ec/info-operativa/InformacionOperativa.htm |
Also worth noting: the tabs "INFORMACIÓN OPERATIVA DIARIA", "ACUMULADA MENSUAL" and "ACUMULADA ANUAL" also have a generation graph of yesterday or the day before (updated 13:00 local time). It uses less color gradients than the graph for the current day and therefore might be easier to work with. |
I did a bit of research into the VML tags I found in the web page source. As VML is a vector language (like SVG) I figured it might have the underlying data for the graphs in an easier to parse format, but unfortunately it seems most or all VML is the equivalent of an SVG with As an aside, I wrote this little piece of JavaScript to link all the images like <script>addEventListener('DOMContentLoaded',e=>{var element = document.createElement('div');for(var i=1;i<270;i++){
element.innerHTML+=`<img src="https://www.cenace.gob.ec/info-operativa/InformacionOperativa_archivos/image${i.toString().padStart(3,0)}.png" alt=#${i} title=#${i}>`
};document.body.appendChild(element)})</script> The images often contain sub-sections of the larger images also found with these URLs. |
I wrote a simple parser to get the data out for hydro, gas (taken from a stacked "OTRA GENERACION" bar chart), and unknown. This comment states that the demand chart is |
There is generation data per type for Ecuador, which is updated hourly (around minutes :30 to :40).
http://www.cenace.org.ec/docs/InformacionOperativa.htm
Two issues:
1.) OCR is required to read the images with generation figures (actually not really a problem)
2.) The data represents the cumulative generation per type and day. The generation of each hour is added to the previous generation for that day. After 24 hours, it is set to 0 again.
This means, a difference has to be calculated to obtain the hourly generation in MW.
I assume, this is impossible to use for the real-time map, but it could be possible to calculate the hourly generation in your database.
For 04:00:
For 05:00:
For 06:00
So the difference between these for hour 4-5 will be
hydro: 1695 MW
other: 340 MW (mix of oil and gas)
renewable (non-conventional): 68 MW
A breakdown of the "other" fraction could be possible by using the figures of the "otra generacion" bar.
gas: 85 MW ("gas natural")
oil: 255 MW (I assumed that "calidad de servicio" goes in that category because of the generation shares on the IEA website.)
And for hour 5-6:
hydro: 1720 MW
other: 344 MW (of which gas: 100 MW and oil: 242 MW (minor mismatch of 2 MW))
renewable: 74 MW
Is it worth a try to read-out the values using OCR?
Here are the image-URLs:
hydro:
http://www.cenace.org.ec/docs/InformacionOperativa_archivos/image036.png
renewable:
http://www.cenace.org.ec/docs/InformacionOperativa_archivos/image038.png
other:
http://www.cenace.org.ec/docs/InformacionOperativa_archivos/image037.png
breakdown of other:
http://www.cenace.org.ec/docs/InformacionOperativa_archivos/image015.png
I assume the "other" breakdown for oil/gas seperation will be hard to use OCR on, due to varying heights of the lower two categories. But I guess just having "other" will be enough.
Maybe someone with decent Spanish skills could ask them for the non-cumulative hourly values?
That would make things easier :-)
Kind regards,
Alex
The text was updated successfully, but these errors were encountered: