Hi everyone,
I need to do something tricky (for me): I want to have a graph in which I can observe the average consumption of households with a solar panel installed before and after the date of installation.
For this, I have the following information. I have:
Could anyone please help me for this? I don't know how to proceed, and if this is possible.
Thank you very much for your help, in advance.
Best,
Michael
I need to do something tricky (for me): I want to have a graph in which I can observe the average consumption of households with a solar panel installed before and after the date of installation.
For this, I have the following information. I have:
- the start and end dates of the contracts for each household,
- the date of adoption of a solar panel,
- the consumption in kW for periods 1 and 2.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long id double(date_contract_start date_contract_end date_pv_install) float(kW_power_p1 kW_power_p2) 407519 21620 22005 21875 9.2 . 407519 22006 22400 21875 9.2 . 407519 22401 22431 21875 9.2 . 407519 22432 22645 21875 9.2 9.2 407519 22646 22735 21875 9.2 9.2 407519 22736 22796 21875 9.2 9.2 407519 22797 22859 21875 9.2 9.2 407519 22860 22888 21875 9.2 9.2 407519 22889 23010 21875 9.2 9.2 407519 23011 23283 21875 9.2 9.2 407519 23284 . 21875 9.2 9.2 407521 21640 22431 . 2.3 . 407521 22432 22523 . 2.3 2.3 407521 22524 22645 . 2.3 2.3 407521 22646 22676 . 2.3 2.3 407521 22677 22735 . 2.3 2.3 407521 22736 23010 . 2.3 2.3 407521 23011 . . 2.3 2.3 407523 21710 22426 . 3.45 . 407523 22923 23010 . 3.45 3.45 407523 23011 23100 . 3.45 3.45 end format %td date_contract_start format %td date_contract_end format %td date_pv_install
Thank you very much for your help, in advance.
Best,
Michael