Skip to content

Commit

Permalink
Resolve "Plants overview now - columna Potencia instantia vs potencia…
Browse files Browse the repository at this point in the history
… pic" (et/somenergia-jardiner!113)

Closes #171 and #172

Merge branch '171-plants-overview-now-columna-potencia-instantia-vs-potencia-pic' into 'main'
  • Loading branch information
polmonso committed Feb 20, 2024
2 parents b15aacb + 06f1732 commit c81757c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{{ config(materialized="view") }}

select
overview.plant_name as nom_planta,
overview.province as provincia,
overview.technology as tecnologia,
overview.peak_power_kw as potencia_pic_kw,
overview.nominal_power_kw as potencia_nominal_kw,
overview.irradiance_w_m2_last_registered_at as irradiancia_ts,
round(overview.irradiance_w_m2, 2) as irradiancia_w_m2,
overview.instant_power_plant_kw_registered_at as potencia_inst_ts,
round(overview.instant_power_plant_kw, 2) as potencia_inst_kw,
round(overview.instant_power_plant_kw / overview.peak_power_kw, 2) as potencia_inst_vs_pic,
overview.day as dia,
round((overview.meter_exported_energy_kwh - overview.solargis_meter_expected_energy_kwh) / 1000, 2) as energia_perduda_mwh
overview.plant_name as nom_planta,
overview.province as provincia,
overview.technology as tecnologia,
overview.peak_power_kw as potencia_pic_kw,
overview.nominal_power_kw as potencia_nominal_kw,
overview.irradiance_w_m2_last_registered_at as irradiancia_ts,
round(overview.irradiance_w_m2, 2) as irradiancia_w_m2,
overview.instant_power_plant_kw_registered_at as potencia_inst_ts,
round(overview.instant_power_plant_kw, 2) as potencia_inst_kw,
round(overview.instant_power_plant_kw / overview.nominal_power_kw, 2) as potencia_inst_vs_nominal,
overview.day as dia,
round((overview.meter_exported_energy_kwh - overview.solargis_meter_expected_energy_kwh) / 1000, 2) as energia_perduda_mwh
from {{ ref("int_plants_overview_instant") }} as overview
18 changes: 9 additions & 9 deletions superset/produccio_davui.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
html:
html: >
<table class="styled-table">
<thead>
<tr>
<th> Nom planta</th>
<th> Provincia</th>
<th> Tecnologia</th>
<th> Potència nominal [kW] </th>
<th> Potència pic [kWp]</th>
<th> Irradiància ts</th>
<th> Potència nominal [kW] </th>
<th> Irradiància temps de lectura</th>
<th> Irradiància [W/m2] </th>
<th> Potència instantània ts</th>
<th> Potència instantània temps de lectura</th>
<th> Potència instantània [kW]</th>
<th>Potència instantània vs pic [%]</th>
<th> Potència instantània vs nominal [%]</th>
<th> Dia </th>
<th> Energia Perduda [MWh] </th>
<th> Energia Perduda [MWh] <br> dia anterior </th>
</tr>
</thead>
<tbody>
Expand All @@ -24,11 +24,11 @@ html:
<td>{{ tecnologia }}</td>
<td>{{ potencia_pic_kw }}</td>
<td>{{ potencia_nominal_kw }}</td>
<td>{{ irradiancia_w_m2_ts }}</td>
<td>{{ irradiancia_ts }}</td>
<td>{{ irradiancia_w_m2 }}</td>
<td>{{ potencia_inst_kw_ts }}</td>
<td>{{ potencia_inst_ts }}</td>
<td>{{ potencia_inst_kw }}</td>
<td>{{#if potencia_instant_vs_pic}}<span> {{ potencia_instant_vs_pic }}% </span><progress value="{{ potencia_instant_vs_pic}}" max="100"> </progress>{{/if}}</td>
<td>{{#if potencia_inst_vs_nominal}}<span> {{ potencia_inst_vs_nominal }}% </span><progress value="{{ potencia_inst_vs_nominal}}" max="100"> </progress>{{/if}}</td>
<td>{{ dateFormat dia }}</td>
<td>{{ energia_perduda_mwh }}</td>
</tr>
Expand Down

0 comments on commit c81757c

Please sign in to comment.