Exemplo n.º 1
0
 def __init__(self, type, color, weight, wheel_size, brake_type, price,
              bike_subtype, has_suspension, gear_count):
     Bikes.__init__(self, type, color, weight, wheel_size, brake_type,
                    price)
     self.bike_subtype = bike_subtype
     self.has_suspension = has_suspension
     self.gear_count = gear_count
 def __init__(self, type, color, weight, wheel_size, brake_type, price,
              max_speed, frame_material, safety_score):
     Bikes.__init__(self, type, color, weight, wheel_size, brake_type,
                    price)
     self.max_speed = max_speed
     self.frame_material = frame_material
     self.safety_score = safety_score
Exemplo n.º 3
0
import numpy as np
import os

from os import listdir
from os.path import isfile, join, dirname
from bokeh.plotting import figure
from bokeh.layouts import layout, widgetbox
from bokeh.models import ColumnDataSource, Div, HoverTool
from bokeh.models.widgets import Slider, Select, TextInput, DateRangeSlider
from bokeh.io import curdoc
from bokeh.models.annotations import Title
from bokeh.models.callbacks import CustomJS

from bikes import Bikes

df, stations, min_date, max_date = Bikes.retrieve_data()
stations_names = stations.name.tolist()

path = os.getcwd()
filename = "bike_meter.html"

desc = Div(text=open(join(path, filename)).read(), width=800)

axis_map = {
    "empty_slots": "empty_slots",
    "free_bikes": "free_bikes",
    "total_slots": "total_slots",
    "usage_ratio": "usage_ratio"
}

# Create Column Data Source that will be used by the plot
Exemplo n.º 4
0
 def total_worth(self, current_discount, total_use):
     msrp = Bikes.calc_msrp(self, current_discount)
     total_worth = msrp * total_use
     print(total_worth)
 def __init__(self, type, color, weight, wheel_size, brake_type, price,
              has_pegs, has_gyro):
     Bikes.__init__(self, type, color, weight, wheel_size, brake_type,
                    price)
     self.has_pegs = has_pegs
     self.has_gyro = has_gyro