|
34 | 34 | "metadata": {},
|
35 | 35 | "outputs": [],
|
36 | 36 | "source": [
|
37 |
| - "import numpy as np\n", |
38 | 37 | "import pandas as pd\n",
|
39 |
| - "import intake\n", |
40 |
| - "\n", |
41 |
| - "from carbonplan_styles.mpl import set_theme\n", |
42 | 38 | "from carbonplan_styles.colors import colors\n",
|
| 39 | + "from carbonplan_styles.mpl import set_theme\n", |
43 | 40 | "\n",
|
44 | 41 | "# set options\n",
|
45 | 42 | "set_theme(style=\"carbonplan_light\")\n",
|
|
100 | 97 | "metadata": {},
|
101 | 98 | "outputs": [],
|
102 | 99 | "source": [
|
103 |
| - "df = df[\n", |
104 |
| - " ~df[\"Forest Buffer Account Contribution\"].apply(\n", |
105 |
| - " lambda x: isinstance(x, str)\n", |
106 |
| - " )\n", |
107 |
| - "]\n", |
| 100 | + "df = df[~df[\"Forest Buffer Account Contribution\"].apply(lambda x: isinstance(x, str))]\n", |
108 | 101 | "df = df[df[\"ARB Offset Credits Issued\"] > 0]\n",
|
109 | 102 | "forest_df = df[df[\"Project Type\"] == \"Forest\"]\n",
|
110 | 103 | "\n",
|
|
254 | 247 | "perc_credits[\"state\"] = perc_credits.index.map(proj_state_map)\n",
|
255 | 248 | "perc_credits = perc_credits.rename(\n",
|
256 | 249 | " # clean up column title\n",
|
257 |
| - " columns={\n", |
258 |
| - " \"ARB Offset Credits Issued\": \"Percent Forest ARB Offset Credits Issued\"\n", |
259 |
| - " }\n", |
| 250 | + " columns={\"ARB Offset Credits Issued\": \"Percent Forest ARB Offset Credits Issued\"}\n", |
260 | 251 | ")\n",
|
261 | 252 | "\n",
|
262 | 253 | "proj_loc = perc_credits.index.get_loc(proj_id)\n",
|
263 |
| - "display(\n", |
264 |
| - " perc_credits[: proj_loc + 1]\n", |
265 |
| - ") # +1 to include ACR260, otherwise off by one" |
| 254 | + "display(perc_credits[: proj_loc + 1]) # +1 to include ACR260, otherwise off by one" |
266 | 255 | ]
|
267 | 256 | },
|
268 | 257 | {
|
|
298 | 287 | "sorted_credits[\"state\"] = sorted_credits.index.map(proj_state_map)\n",
|
299 | 288 | "sorted_credits = sorted_credits.rename(\n",
|
300 | 289 | " # clean up column title\n",
|
301 |
| - " columns={\n", |
302 |
| - " \"ARB Offset Credits Issued\": \"Percent Forest ARB Offset Credits Issued\"\n", |
303 |
| - " }\n", |
| 290 | + " columns={\"ARB Offset Credits Issued\": \"Percent Forest ARB Offset Credits Issued\"}\n", |
304 | 291 | ")\n",
|
305 | 292 | "\n",
|
306 | 293 | "proj_loc = sorted_credits.index.get_loc(proj_id)\n",
|
307 |
| - "display(\n", |
308 |
| - " sorted_credits[: proj_loc + 1]\n", |
309 |
| - ") # +1 to include ACR260, otherwise off by one" |
| 294 | + "display(sorted_credits[: proj_loc + 1]) # +1 to include ACR260, otherwise off by one" |
310 | 295 | ]
|
311 | 296 | },
|
312 | 297 | {
|
|
0 commit comments