import ahlive as ah
df = ah.open_dataset("tc_tracks").query("name == 'IDA'")
note = (
"Marker size is proportionate to the radius of "
"maximum winds (RMW), but is not shown to scale."
)
caption = (
"Hurricane Ida was a deadly and destructive Category 4 "
"Atlantic hurricane that became the second-most damaging and "
"intense hurricane to make landfall in the U.S. state of "
"Louisiana on record, behind Hurricane Katrina in 2005."
)
ah.DataFrame(
df,
"lon",
"lat",
s="usa_rmw",
cs="usa_wind",
preset="trail",
# add geographic features
crs="PlateCarree",
coastline=True,
states=True,
ocean=True,
land=True,
# add labels
inline_labels="usa_pres",
state_labels="iso_time",
title="Track of Hurricane Ida (2021)",
subtitle="Source: IBTrACS v04",
caption=caption,
note=note,
# set limits
ylims="fixed_5",
xlims="fixed_7",
# adjust animation speed
frames=3,
durations=1 / 10,
figsize=(13, 9),
).remark(
"Category 1 Intensity",
cs=64,
atol=6,
first=True,
).remark(
"Category 4 Intensity",
cs=113,
atol=5,
first=True,
).config(**{
"inline": dict(suffix=" mb"),
"note": dict(width=33, y=0.1),
"caption": dict(y=-0.18),
"watermark": dict(y=0.05),
"durations": dict(transition_frames=1 / 10)
}).render()