File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -1352,3 +1352,28 @@ def report():
1352
1352
get_projects_treemap (df )
1353
1353
1354
1354
return report
1355
+
1356
+ def create_tree_map (frequency_dict , width , height ):
1357
+ """
1358
+ Get a treemap of projects
1359
+
1360
+ Input parameter: dictionary
1361
+ Output: treemap image
1362
+ """
1363
+ labels = list (frequency_dict .keys ())
1364
+ values = list (frequency_dict .values ())
1365
+
1366
+ fig = go .Figure (go .Treemap (
1367
+ labels = labels ,
1368
+ parents = ['' ] * len (labels ),
1369
+ values = values ,
1370
+ textinfo = 'label+value'
1371
+ ))
1372
+
1373
+ fig .update_layout (title = 'Projects' , width = width , height = height )
1374
+
1375
+ today = date .today ()
1376
+ output_path = f'treemap-{ today .strftime ("%Y%m%d" )} .png'
1377
+ fig .write_image (output_path )
1378
+ fig .show ()
1379
+
You can’t perform that action at this time.
0 commit comments