Commit
·
8623b28
1
Parent(s):
4464cba
updated
Browse files- README.md +2 -0
- chart-generators/4.py +85 -0
- charts/series-2/4.png +0 -0
README.md
CHANGED
@@ -12,6 +12,8 @@ I was drawn to this work as a result of my employment. Nevertheless, at least in
|
|
12 |
|
13 |
## The Social Cost ... But Of What, Exactly!?
|
14 |
|
|
|
|
|
15 |
The idea of trying to integrate environmental data into financial reporting is anything but straightforward.
|
16 |
|
17 |
This is unfortunate, because the idea of doing this has important ramifications for public policy, financial policy, and the question of how our economic systems should be structured. It should be added: the idea of investigating what effect monetized emissions may have on companies profitability is not an attempt to be punitive. But rather to open the door to what this type of policy might look like in practice. If the purview of the analysis were widened to considering both companies environmental and social impacts, positive impacts could be added to move the analysis away from a framework that only estimates degrees of harm.
|
|
|
12 |
|
13 |
## The Social Cost ... But Of What, Exactly!?
|
14 |
|
15 |
+

|
16 |
+
|
17 |
The idea of trying to integrate environmental data into financial reporting is anything but straightforward.
|
18 |
|
19 |
This is unfortunate, because the idea of doing this has important ramifications for public policy, financial policy, and the question of how our economic systems should be structured. It should be added: the idea of investigating what effect monetized emissions may have on companies profitability is not an attempt to be punitive. But rather to open the door to what this type of policy might look like in practice. If the purview of the analysis were widened to considering both companies environmental and social impacts, positive impacts could be added to move the analysis away from a framework that only estimates degrees of harm.
|
chart-generators/4.py
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
+
import matplotlib.pyplot as plt
|
3 |
+
import seaborn as sns
|
4 |
+
import matplotlib.dates as mdates
|
5 |
+
|
6 |
+
# Load the data from the CSV file
|
7 |
+
file_path = '/home/daniel/Git/Emissions-Monetisation-Calculator/proposals/versions/latest/scc-proposals.csv'
|
8 |
+
df = pd.read_csv(file_path)
|
9 |
+
|
10 |
+
# Convert 'date' to datetime objects
|
11 |
+
df['date'] = pd.to_datetime(df['date'], errors='coerce')
|
12 |
+
|
13 |
+
# Convert 'usd_proposed_value' to numeric, handling errors
|
14 |
+
df['usd_proposed_value'] = pd.to_numeric(df['usd_proposed_value'], errors='coerce')
|
15 |
+
|
16 |
+
# Filter out invalid rows.
|
17 |
+
df_filtered = df.dropna(subset=['date', 'usd_proposed_value']).copy()
|
18 |
+
|
19 |
+
# Sort by date
|
20 |
+
df_filtered = df_filtered.sort_values('date')
|
21 |
+
|
22 |
+
# Create a dictionary for shortened organization names
|
23 |
+
org_name_map = {
|
24 |
+
"International Foundation for Valuing Impacts": "IFVI",
|
25 |
+
"Environmental Protection Agency": "EPA",
|
26 |
+
"University of California, Davis": "UC Davis",
|
27 |
+
"International Monetary Fund": "IMF",
|
28 |
+
"New York State Agencies": "NY State",
|
29 |
+
"Biden Administration Interagency Working Group": "Biden Admin",
|
30 |
+
"Trump Administration": "Trump Admin",
|
31 |
+
"Climate Leadership Council": "CLC",
|
32 |
+
"Obama Administration Interagency Working Group": "Obama Admin",
|
33 |
+
"UK Government Economic Service": "UK Gov",
|
34 |
+
"Stern Review": "Stern",
|
35 |
+
"Government of Canada": "Canada Gov",
|
36 |
+
"Yale University": "Yale",
|
37 |
+
"Resources for the Future": "RFF",
|
38 |
+
"University College London": "UCL",
|
39 |
+
"Cambridge University": "Cambridge"
|
40 |
+
}
|
41 |
+
|
42 |
+
# Apply shortened names to the DataFrame
|
43 |
+
df_filtered['short_org'] = df_filtered['organization_name'].map(org_name_map)
|
44 |
+
|
45 |
+
|
46 |
+
# Create the line plot
|
47 |
+
plt.figure(figsize=(14, 8))
|
48 |
+
|
49 |
+
# Plot with the short names.
|
50 |
+
sns.lineplot(x='date',
|
51 |
+
y='usd_proposed_value',
|
52 |
+
hue='short_org',
|
53 |
+
data=df_filtered,
|
54 |
+
marker="o", # Add markers
|
55 |
+
markersize=8, # Enlarge markers
|
56 |
+
linewidth=1
|
57 |
+
)
|
58 |
+
|
59 |
+
plt.xlabel('Date')
|
60 |
+
plt.ylabel('Proposed Social Cost of Carbon (USD/ton)')
|
61 |
+
plt.title('Social Cost of Carbon Proposals Over Time by Organization')
|
62 |
+
plt.legend(title='Organization', loc='upper left', bbox_to_anchor=(1, 1))
|
63 |
+
|
64 |
+
# Format x-axis date display
|
65 |
+
date_fmt = mdates.DateFormatter('%Y-%b')
|
66 |
+
plt.gca().xaxis.set_major_formatter(date_fmt)
|
67 |
+
plt.gca().xaxis.set_major_locator(mdates.YearLocator())
|
68 |
+
plt.xticks(rotation=45, ha='right')
|
69 |
+
|
70 |
+
plt.tight_layout(rect=[0, 0, .9, 1])
|
71 |
+
|
72 |
+
# Annotate each data point with name, hyphen, dollar symbol, number.
|
73 |
+
for index, row in df_filtered.iterrows():
|
74 |
+
plt.annotate(f"{row['short_org']} - ${int(row['usd_proposed_value'])}",
|
75 |
+
xy=(row['date'], row['usd_proposed_value']),
|
76 |
+
xytext=(0, 8), # Adjust text position above the marker
|
77 |
+
textcoords='offset points',
|
78 |
+
ha='center', # Center text horizontally
|
79 |
+
fontsize=8, # Set text size to be readable
|
80 |
+
color='black'
|
81 |
+
)
|
82 |
+
|
83 |
+
|
84 |
+
plt.grid(True, axis='y', linestyle='--', alpha=0.7)
|
85 |
+
plt.show()
|
charts/series-2/4.png
ADDED
![]() |