Esempio n. 1
0
def jobtype_builder():
    jtypes = ["Half Time", "Full Time", "Hourly", "Temporary"]
    xdr = FactorRange(factors=jtypes)
    ydr = DataRange1d(sources=[source_jobtype.columns("data_range")])
    plot = Plot(title="Job Type",
                data_sources=[source_jobtype],
                x_range=xdr,
                y_range=ydr,
                plot_width=760,
                plot_height=500)
    xaxis = CategoricalAxis(plot=plot,
                            dimension=0,
                            major_label_orientation=pi / 4.0)
    yaxis = LinearAxis(plot=plot, dimension=1)
    yaxis.major_tick_in = 0
    ygrid = Grid(plot=plot, dimension=1, axis=yaxis)
    quad = Rect(x="jobtypes",
                y="jobtype_half",
                height="count",
                width=0.9,
                fill_color="#33A6A4")
    bars = Glyph(data_source=source_jobtype,
                 xdata_range=xdr,
                 ydata_range=ydr,
                 glyph=quad)
    plot.renderers.append(bars)
    plot.background_fill = '#686975'
    return plot
Esempio n. 2
0
def weekday_builder():
    dow = [
        "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday",
        "Sunday"
    ]
    xdr = FactorRange(factors=dow)
    ydr = DataRange1d(sources=[source_dow.columns("data_range")])
    plot = Plot(title="Weekday of Job Posting",
                data_sources=[source_dow],
                x_range=xdr,
                y_range=ydr,
                plot_width=760,
                plot_height=500)
    xaxis = CategoricalAxis(plot=plot,
                            dimension=0,
                            major_label_orientation=pi / 4.0)
    yaxis = LinearAxis(plot=plot, dimension=1)
    yaxis.major_tick_in = 0
    ygrid = Grid(plot=plot, dimension=1, axis=yaxis)
    quad = Rect(x="weekday",
                y="weekday_half",
                height="count",
                width=0.9,
                fill_color="#D9301A")
    bars = Glyph(data_source=source_dow,
                 xdata_range=xdr,
                 ydata_range=ydr,
                 glyph=quad)
    plot.renderers.append(bars)
    plot.background_fill = '#686975'
    return plot
Esempio n. 3
0
def job_loc_plot_builder():
    xdr = FactorRange(factors=countries)
    ydr = DataRange1d(sources=[source_country.columns("data_range")])

    plot = Plot(title="Postings by Job Location (Country)",
                data_sources=[source_country],
                x_range=xdr,
                y_range=ydr,
                plot_width=760,
                plot_height=500)

    xaxis = CategoricalAxis(plot=plot,
                            dimension=0,
                            major_label_orientation=pi / 4.0)
    yaxis = LinearAxis(plot=plot, dimension=1)

    yaxis.major_tick_in = 0

    ygrid = Grid(plot=plot, dimension=1, axis=yaxis)

    quad = Rect(x="country",
                y="count_half",
                height="count",
                width=0.9,
                fill_color="#483D8B")
    bars = Glyph(data_source=source_country,
                 xdata_range=xdr,
                 ydata_range=ydr,
                 glyph=quad)
    plot.renderers.append(bars)
    plot.background_fill = '#333333'
    return plot
Esempio n. 4
0
def jobtype_builder():
    jtypes = ["Half Time", "Full Time", "Hourly", "Temporary"]
    xdr = FactorRange(factors=jtypes)
    ydr = DataRange1d(sources=[source_jobtype.columns("data_range")])
    plot = Plot(title="Job Type", data_sources=[source_jobtype],
                x_range=xdr, y_range=ydr, plot_width=760, plot_height=500)
    xaxis = CategoricalAxis(plot=plot, dimension=0, major_label_orientation=pi/4.0)
    yaxis = LinearAxis(plot=plot, dimension=1)
    yaxis.major_tick_in = 0
    ygrid = Grid(plot=plot, dimension=1, axis=yaxis)
    quad = Rect(x="jobtypes", y="jobtype_half",
                height="count", width=0.9,
                fill_color="#33A6A4")
    bars = Glyph(data_source=source_jobtype, xdata_range=xdr,
                 ydata_range=ydr, glyph=quad)
    plot.renderers.append(bars)
    plot.background_fill = '#686975'
    return plot
Esempio n. 5
0
def weekday_builder():
    dow = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
           "Saturday", "Sunday"]
    xdr = FactorRange(factors=dow)
    ydr = DataRange1d(sources=[source_dow.columns("data_range")])
    plot = Plot(title="Weekday of Job Posting", data_sources=[source_dow],
                x_range=xdr, y_range=ydr, plot_width=760, plot_height=500)
    xaxis = CategoricalAxis(plot=plot, dimension=0, major_label_orientation=pi/4.0)
    yaxis = LinearAxis(plot=plot, dimension=1)
    yaxis.major_tick_in = 0
    ygrid = Grid(plot=plot, dimension=1, axis=yaxis)
    quad = Rect(x="weekday", y="weekday_half",
                height="count", width=0.9,
                fill_color="#D9301A")
    bars = Glyph(data_source=source_dow, xdata_range=xdr,
                 ydata_range=ydr, glyph=quad)
    plot.renderers.append(bars)
    plot.background_fill = '#686975'
    return plot
Esempio n. 6
0
def job_loc_plot_builder():
    xdr = FactorRange(factors=countries)
    ydr = DataRange1d(sources=[source_country.columns("data_range")])

    plot = Plot(title="Postings by Job Location (Country)",
                data_sources=[source_country],
                x_range=xdr, y_range=ydr, plot_width=760, plot_height=500)

    xaxis = CategoricalAxis(plot=plot, dimension=0, major_label_orientation=pi/4.0)
    yaxis = LinearAxis(plot=plot, dimension=1)

    yaxis.major_tick_in = 0

    ygrid = Grid(plot=plot, dimension=1, axis=yaxis)

    quad = Rect(x="country", y="count_half",
                height="count", width=0.9,
                fill_color="#483D8B")
    bars = Glyph(data_source=source_country, xdata_range=xdr,
                 ydata_range=ydr, glyph=quad)
    plot.renderers.append(bars)
    plot.background_fill = '#333333'
    return plot