Skip to content

Commit

Permalink
Create html dir if doens't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanhhb committed Jun 19, 2024
1 parent aa650cb commit b39d320
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jb/utils/folium_animate_from_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numpy as np
import sys
import argparse
import os

import folium
from folium.plugins import HeatMapWithTime
Expand Down Expand Up @@ -98,6 +99,8 @@ def renorm( value ):
heat_map.add_to(m)

# Save the map as an HTML file
if not os.path.exists( "html" ):
os.mkdir( "html" )
m.save( output_file )

print( f"File written: {output_file}" )
Expand Down

0 comments on commit b39d320

Please sign in to comment.