File size: 1,221 Bytes
93a8810
 
982197c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b396979
93a8810
 
 
 
 
 
982197c
 
 
93a8810
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import matplotlib.pyplot as plt

def generate_timeline(cv_type, education_level, score):
    stages = []
    durations = []

    if score < 60:
        stages.append("Skill Development")
        durations.append(3)
    elif score < 80:
        stages.append("Skill Polishing")
        durations.append(2)

    if education_level.lower() in ["high school", "bachelor"]:
        stages.append("Certifications")
        durations.append(2)

    if education_level.lower() in ["high school", "bachelor"]:
        stages.append("Higher Education")
        durations.append(3)

    stages.append("Job Applications")
    durations.append(1)

    if cv_type.lower() in ["technical", "engineering", "it"]:
        stages.append("Interview Prep")
        durations.append(1)

    stages.append("Visa Process")
    durations.append(1)

    fig, ax = plt.subplots(figsize=(10, 2))
    ax.barh(["Roadmap"], [sum(durations)], color="lightgray")
    left = 0
    for stage, duration in zip(stages, durations):
        ax.barh(["Roadmap"], [duration], left=left, label=stage)
        left += duration
    ax.legend(bbox_to_anchor=(1.05, 1), loc='upper left')
    ax.set_title("Career Roadmap Timeline")
    ax.axis('off')
    return fig