This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from osgeo import gdal | |
in_file = f"./modis.hdf" # raw MODIS HDF in sinusoid projection | |
out_file = f"./modis.tif" | |
# open dataset | |
dataset = gdal.Open(in_file,gdal.GA_ReadOnly) | |
subdataset = gdal.Open(dataset.GetSubDatasets()[0][0], gdal.GA_ReadOnly) | |
# gdalwarp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Example function to convert DataFrame object to Plotly Sankey diagram data dictionary. | |
Example notebook: https://github.com/bpostance/dsc.learn/blob/main/Graph/00-misc/finCEN.ipynb | |
""" | |
def df_2_sankey(df,cols,values,hover_value=None): | |
""" Helper function to convert a dataframe of relationships to | |
Plotly Sankey format. | |
""" |