Skip to content

Commit

Permalink
cleanuo
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Apr 4, 2024
1 parent ae5d99d commit 79aaa2e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions notebooks/wp5/glacier_distribution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,9 @@
" date = date.where(~date.str.startswith(\"-\"))\n",
" columns.append(pd.to_datetime(date))\n",
"dates = pd.DataFrame(columns).mean()\n",
"gdf[\"decimal_year\"] = dates.dtyear + (dates.dt.dayofyear - 1) / (\n",
" 364 + dates.dt.is_leap_year\n",
")\n",
"gdf[\"year\"] = dates.dt.year.astype(\"Int64\")"
"year = dates.dt.year.astype(\"Int64\")\n",
"gdf[\"decimal_year\"] = year + (dates.dt.dayofyear - 1) / (364 + dates.dt.is_leap_year)\n",
"gdf[\"year\"] = year"
]
},
{
Expand Down

0 comments on commit 79aaa2e

Please sign in to comment.