-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindustry_templates.py
More file actions
247 lines (232 loc) · 10.2 KB
/
industry_templates.py
File metadata and controls
247 lines (232 loc) · 10.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
"""
Custom industry templates for ESG assessments.
"""
from typing import Dict, List, Any
import json
class IndustryTemplateService:
"""Service for managing industry-specific ESG templates."""
def __init__(self):
self.templates = self._load_default_templates()
def _load_default_templates(self) -> Dict[str, Dict[str, Any]]:
"""Load default industry templates."""
return {
"retail": {
"name": "Retail & Consumer Goods",
"description": "ESG framework for retail and consumer goods companies",
"questions": [
{
"category": "Environmental",
"question": "How do you manage packaging waste and promote circular economy principles?",
"weight": 0.25,
"industry_specific": True
},
{
"category": "Environmental",
"question": "What sustainable sourcing practices do you implement for your products?",
"weight": 0.20,
"industry_specific": True
},
{
"category": "Social",
"question": "How do you ensure fair labor practices across your supply chain?",
"weight": 0.20,
"industry_specific": True
},
{
"category": "Social",
"question": "What community engagement programs do you support?",
"weight": 0.15,
"industry_specific": False
},
{
"category": "Governance",
"question": "How do you ensure transparency in your sustainability reporting?",
"weight": 0.20,
"industry_specific": False
}
],
"compliance_requirements": [
"EU Taxonomy Regulation",
"CSRD (Corporate Sustainability Reporting Directive)",
"California Transparency in Supply Chains Act",
"UK Modern Slavery Act"
],
"key_metrics": [
"Carbon footprint per product unit",
"Percentage of sustainable materials",
"Supply chain transparency score",
"Employee satisfaction index"
]
},
"technology": {
"name": "Technology & Software",
"description": "ESG framework for technology companies",
"questions": [
{
"category": "Environmental",
"question": "How do you measure and reduce the carbon footprint of your digital services?",
"weight": 0.25,
"industry_specific": True
},
{
"category": "Environmental",
"question": "What data center sustainability practices do you implement?",
"weight": 0.20,
"industry_specific": True
},
{
"category": "Social",
"question": "How do you ensure digital accessibility and inclusion?",
"weight": 0.20,
"industry_specific": True
},
{
"category": "Social",
"question": "What data privacy and security measures do you have in place?",
"weight": 0.15,
"industry_specific": True
},
{
"category": "Governance",
"question": "How do you govern AI ethics and algorithmic fairness?",
"weight": 0.20,
"industry_specific": True
}
],
"compliance_requirements": [
"GDPR (General Data Protection Regulation)",
"CCPA (California Consumer Privacy Act)",
"EU AI Act",
"ISO 27001 (Information Security)"
],
"key_metrics": [
"Energy efficiency (PUE) of data centers",
"Percentage of renewable energy use",
"Diversity in tech roles",
"Data breach incident rate"
]
},
"manufacturing": {
"name": "Manufacturing & Industrial",
"description": "ESG framework for manufacturing companies",
"questions": [
{
"category": "Environmental",
"question": "How do you manage industrial waste and implement circular economy practices?",
"weight": 0.30,
"industry_specific": True
},
{
"category": "Environmental",
"question": "What energy efficiency measures have you implemented in your facilities?",
"weight": 0.20,
"industry_specific": True
},
{
"category": "Social",
"question": "How do you ensure workplace safety and health standards?",
"weight": 0.25,
"industry_specific": True
},
{
"category": "Social",
"question": "What training and development programs do you offer employees?",
"weight": 0.10,
"industry_specific": False
},
{
"category": "Governance",
"question": "How do you manage environmental compliance and reporting?",
"weight": 0.15,
"industry_specific": True
}
],
"compliance_requirements": [
"ISO 14001 (Environmental Management)",
"OSHA Safety Standards",
"REACH Regulation (EU)",
"RoHS Directive"
],
"key_metrics": [
"Water usage per unit produced",
"Waste reduction percentage",
"Lost time injury frequency rate",
"Energy intensity ratio"
]
}
}
def get_template(self, industry: str) -> Dict[str, Any]:
"""Get template for specific industry."""
return self.templates.get(industry.lower(), self._get_generic_template())
def get_available_industries(self) -> List[str]:
"""Get list of available industry templates."""
return list(self.templates.keys())
def _get_generic_template(self) -> Dict[str, Any]:
"""Get generic ESG template for industries not specifically covered."""
return {
"name": "Generic ESG Assessment",
"description": "Standard ESG framework for all industries",
"questions": [
{
"category": "Environmental",
"question": "How do you measure and reduce your environmental impact?",
"weight": 0.2,
"industry_specific": False
},
{
"category": "Environmental",
"question": "What climate change mitigation strategies do you implement?",
"weight": 0.2,
"industry_specific": False
},
{
"category": "Social",
"question": "How do you promote diversity, equity, and inclusion?",
"weight": 0.2,
"industry_specific": False
},
{
"category": "Social",
"question": "What employee wellbeing programs do you offer?",
"weight": 0.2,
"industry_specific": False
},
{
"category": "Governance",
"question": "How do you ensure ethical business practices and transparency?",
"weight": 0.2,
"industry_specific": False
}
],
"compliance_requirements": [
"Local environmental regulations",
"Labor law compliance",
"Corporate governance standards"
],
"key_metrics": [
"Carbon emissions (Scope 1, 2, 3)",
"Employee satisfaction score",
"Board diversity percentage",
"Ethics training completion rate"
]
}
def create_custom_template(self, industry: str, template_data: Dict[str, Any]) -> bool:
"""Create a new custom industry template."""
try:
# Validate template structure
required_keys = ["name", "description", "questions"]
if not all(key in template_data for key in required_keys):
return False
# Validate questions structure
for question in template_data["questions"]:
required_question_keys = ["category", "question", "weight"]
if not all(key in question for key in required_question_keys):
return False
# Add template
self.templates[industry.lower()] = template_data
return True
except Exception as e:
print(f"Error creating custom template: {e}")
return False
# Global template service instance
template_service = IndustryTemplateService()