import plotly.figure_factory as ff



df = [
    dict(Task="Viirs base processor", Start='2024-08-01', Finish='2024-09-30', Resource='Complete'),
    dict(Task="Add pytests for already created functions (3-9)", Start='2024-08-01', Finish='2024-12-31', Resource='Complete'),
    dict(Task="Tropomi base processor", Start='2024-08-01', Finish='2025-02-03', Resource='Incomplete'),
    dict(Task="Tropomi to_plumes functionality (11)", Start='2025-02-03', Finish='2025-03-31', Resource='Not Started'),
    dict(Task="Time evaluation statistics (18)", Start='2024-11-01', Finish='2024-11-28', Resource='Complete'),
    dict(Task="Test DA implementation for VIIRS", Start='2025-02-03', Finish='2025-02-28', Resource='Not Started'),
    dict(Task="Convert Grid representation to numpy from geopandas", Start='2024-12-01', Finish='2024-12-31', Resource="Complete"),
    dict(Task="Creating Grid Config for rotated and regular global grids (14)", Start='2024-11-18', Finish='2025-02-03', Resource='Incomplete'),
    dict(Task="Add original indices of the data to the outputted netcdf (13)", Start='2025-02-03', Finish='2025-01-14', Resource='Not Started'),
    dict(Task="Add history of processes to the netcdf (10)", Start='2025-01-01', Finish='2025-02-03', Resource='Not Started'),
    dict(Task="Update grid representations to include Vertical profiling (20)", Start='2025-03-01', Finish='2025-03-31', Resource='Not Started'),
    dict(Task="Test Viirs data with Providentia Interpolation", Start="2025-03-01", Finish="2025-03-31", Resource="Not Started"),
    dict(Task="Produce Number of counts plots (29)", Start="2025-01-13", Finish="2025-01-20", Resource="Complete"),
    dict(Task="QA flags (23)", Start="2025-01-13", Finish="2025-02-03", Resource="Incomplete"),
    dict(Task="Finalise netcdf storage output (30)", Start="2025-01-20", Finish="2025-02-03", Resource="Not Started"),
    dict(Task="Create conda environment", Start="2025-01-01", Finish="2025-01-14", Resource="Complete"),
    dict(Task="Create Logging file output", Start="2025-01-01", Finish="2025-02-03", Resource="Incomplete"),
]



colors = {'Not Started': 'rgb(220, 0, 0)',
          'Incomplete': (1, 0.9, 0.16),
          'Complete': 'rgb(0, 255, 100)'}



fig = ff.create_gantt(df, colors=colors, index_col='Resource', show_colorbar=True,
                      group_tasks=True)



fig.show()