@@ -43,9 +43,8 @@ def compute_cevs_for_company(company_name: str, *, company_country: Optional[str
4343 iso_norm = iso_client .get_iso14001_certifications (country = company_country , limit = 100 )
4444 has_iso = any (_normalize_name (r .get ("nama_perusahaan" )) and company_key in _normalize_name (r .get ("nama_perusahaan" )) for r in iso_norm )
4545
46- # EEA: use indicator sample plus new CSV -based datasets (renewables and industrial pollution)
46+ # EEA: use new Parquet -based datasets (renewables and industrial pollution)
4747 eea_client = EEAClient ()
48- eea_norm = eea_client .get_indicator (country = company_country or None , limit = 50 )
4948 # New: country renewables row and EU average row for comparison
5049 renew_row = eea_client .get_country_renewables (company_country ) if company_country else None
5150 renew_all = eea_client .get_countries_renewables ()
@@ -71,7 +70,6 @@ def compute_cevs_for_company(company_name: str, *, company_country: Optional[str
7170 "base" : 50.0 ,
7271 "iso_bonus" : 0.0 ,
7372 "epa_penalty" : 0.0 ,
74- "eea_bonus" : 0.0 ,
7573 "renewables_bonus" : 0.0 ,
7674 "pollution_penalty" : 0.0 ,
7775 "policy_bonus" : 0.0 ,
@@ -86,11 +84,6 @@ def compute_cevs_for_company(company_name: str, *, company_country: Optional[str
8684 components ["epa_penalty" ] = - epa_penalty
8785 score -= epa_penalty
8886
89- # EEA bonus placeholder: presence of any indicator entries yields small boost
90- eea_bonus = 5.0 if eea_norm else 0.0
91- components ["eea_bonus" ] = eea_bonus
92- score += eea_bonus
93-
9487 # Renewables bonus (dynamic): reward exceeding target and EU average
9588 renew_bonus = 0.0
9689 renew_details : Dict [str , Any ] = {}
@@ -204,17 +197,15 @@ def slope_for(key: str) -> Dict[str, Any]:
204197 "sources" : {
205198 "epa_matches" : len (epa_matches ),
206199 "iso_count" : len (iso_norm ),
207- "eea_count" : len (eea_norm ),
208- "renewables_source" : os .getenv ("EEA_RENEWABLES_SOURCE" ) or os .getenv ("EEA_CSV_URL" ) or "local:countries-breakdown-actual-res-progress-13.csv" ,
209- "pollution_source" : os .getenv ("EEA_POLLUTION_SOURCE" ) or "local:industrial-releases-of-pollutants-to.csv" ,
200+ "renewables_source" : os .getenv ("EEA_RENEWABLES_SOURCE" ) or "EEA Parquet API" ,
201+ "pollution_source" : os .getenv ("EEA_POLLUTION_SOURCE" ) or "EEA Parquet API" ,
210202 "edgar_source" : os .getenv ("EDGAR_XLSX_PATH" ) or "local:EDGAR_emiss_on_UCDB_2024.xlsx" ,
211203 "policy_source" : os .getenv ("POLICY_XLSX_PATH" ) or "local:Annex III_Best practices and justifications.xlsx" ,
212204 "pollution_trend_source" : os .getenv ("CEVS_POLLUTION_SOURCE" ) or "auto" ,
213205 },
214206 "details" : {
215207 "epa" : epa_matches ,
216208 "iso" : iso_norm ,
217- "eea" : eea_norm ,
218209 "renewables" : {"country_row" : renew_row , "eu_row" : eu_row , "bonus_calc" : renew_details },
219210 "pollution_trend" : pol_details or pol_trend ,
220211 "policy" : policy_details ,
0 commit comments