class GrupsCSV(CsvModel):
    shortName = CharField()
    name = CharField()
    ss1 = IgnoredField()
    classroom = CharField()
    s0 = IgnoredField()
    s1 = IgnoredField()
    s2 = IgnoredField()
    s3 = IgnoredField()
    s4 = IgnoredField()
    s5 = IgnoredField()
    s6 = IgnoredField()
    s7 = IgnoredField()
    s8 = IgnoredField()
    s9 = IgnoredField()
    a0 = IgnoredField()
    a1 = IgnoredField()
    a2 = IgnoredField()
    a3 = IgnoredField()
    a4 = IgnoredField()
    a5 = IgnoredField()
    a6 = IgnoredField()
    a7 = IgnoredField()
    a8 = IgnoredField()
    a9 = IgnoredField()
    b0 = IgnoredField()
    b1 = IgnoredField()
    b2 = IgnoredField()
    b3 = IgnoredField()
    b4 = IgnoredField()
    b5 = IgnoredField()
    b6 = IgnoredField()

    class Meta:
        delimiter = ","
class MateriesCSV(CsvModel):
    shortName = CharField()
    name = CharField()
    b1 = IgnoredField()
    defaultClassroom = CharField()
    s0 = IgnoredField()
    s1 = IgnoredField()
    s2 = IgnoredField()
    s3 = IgnoredField()
    s4 = IgnoredField()
    s5 = IgnoredField()
    s6 = IgnoredField()
    s7 = IgnoredField()
    s8 = IgnoredField()
    s9 = IgnoredField()
    a0 = IgnoredField()
    a1 = IgnoredField()
    a2 = IgnoredField()
    a3 = IgnoredField()
    a4 = IgnoredField()
    a5 = IgnoredField()
    a6 = IgnoredField()

    class Meta:
        delimiter = ","
Esempio n. 3
0
class MovieCsvModel(CsvModel):
    movieId = IntegerField(match="id")
    title = CharField()
    genres = CharField()

    class Meta:
        dbModel = Movies
        delimiter = ","
class RodesCSV(CsvModel):
    s1 = CharField()
    s2 = CharField()
    n = CharField()
    roda = CharField()

    class Meta:
        delimiter = ';'
class ModalitatsCSV(CsvModel):
    name = CharField()
    BLOC1 = CharField()
    BLOC2 = CharField()
    BLOC3 = CharField()
    BLOC4 = CharField()

    class Meta:
        delimiter = ';'
Esempio n. 6
0
class ImportedPlacetype(CsvModel):
    name = CharField(prepare=lambda x: x or '')
    clean_name = CharField(prepare=lambda x: x or '')
    color = CharField(prepare=lambda x: x or '')
    intersection_density = FloatField(prepare=lambda x: x or 0)

    class Meta:
        delimiter = ","
        has_header = True
Esempio n. 7
0
class ImportPlacetypeComponent(CsvModel):
    #    BTID,Building_Type,
    # Urban Mixed Use,Urban Residential,Urban Commercial,City Mixed Use,City Residential,City Commercial,
    # Town Mixed Use,Town Residential,Town Commercial,Village Mixed Use,Village Residential,Village Commercial,
    # Neighborhood Residential,Neighborhood Low,Office Focus,Mixed Office and R&D,Office/Industrial,Industrial Focus,
    # Low-Density Employment Park,High Intensity Activity Center,Mid Intensity Activity Center,
    # Low Intensity Retail-Centered N'Hood,Retail: Strip Mall/ Big Box,Industrial/Office/Res Mixed High,
    # Industrial/Office/Res Mixed Low,Suburban Multifamily,Suburban Mixed Residential,Residential Subdivision,
    # Large Lot Residential Area,Rural Residential,Rural Ranchettes,Rural Employment,Campus/ University,
    # Institutional,Parks & Open Space,BuildingType Name,Gross_Net_Flag
    category = CharField(prepare=lambda x: x or '')
    btid = IntegerField(prepare=lambda x: x or 0)
    color = CharField(prepare=lambda x: x or '')
    name = CharField(prepare=lambda x: x or '')
    urban_mixed_use = FloatField(prepare=lambda x: x or 0)
    urban_residential = FloatField(prepare=lambda x: x or 0)
    urban_commercial = FloatField(prepare=lambda x: x or 0)
    city_mixed_use = FloatField(prepare=lambda x: x or 0)
    city_residential = FloatField(prepare=lambda x: x or 0)
    city_commercial = FloatField(prepare=lambda x: x or 0)
    town_mixed_use = FloatField(prepare=lambda x: x or 0)
    town_residential = FloatField(prepare=lambda x: x or 0)
    town_commercial = FloatField(prepare=lambda x: x or 0)
    village_mixed_use = FloatField(prepare=lambda x: x or 0)
    village_residential = FloatField(prepare=lambda x: x or 0)
    village_commercial = FloatField(prepare=lambda x: x or 0)
    neighborhood_residential = FloatField(prepare=lambda x: x or 0)
    neighborhood_low = FloatField(prepare=lambda x: x or 0)
    office_focus = FloatField(prepare=lambda x: x or 0)
    mixed_office_and_r_and_d = FloatField(prepare=lambda x: x or 0)
    office_industrial = FloatField(prepare=lambda x: x or 0)
    industrial_focus = FloatField(prepare=lambda x: x or 0)
    low_density_employment_park = FloatField(prepare=lambda x: x or 0)
    high_intensity_activity_center = FloatField(prepare=lambda x: x or 0)
    mid_intensity_activity_center = FloatField(prepare=lambda x: x or 0)
    low_intensity_retail_centered_neighborhood = FloatField(
        prepare=lambda x: x or 0)
    retail_strip_mall_big_box = FloatField(prepare=lambda x: x or 0)
    industrial_office_residential_mixed_high = FloatField(
        prepare=lambda x: x or 0)
    industrial_office_residential_mixed_low = FloatField(
        prepare=lambda x: x or 0)
    suburban_multifamily = FloatField(prepare=lambda x: x or 0)
    suburban_mixed_residential = FloatField(prepare=lambda x: x or 0)
    residential_subdivision = FloatField(prepare=lambda x: x or 0)
    large_lot_residential = FloatField(prepare=lambda x: x or 0)
    rural_residential = FloatField(prepare=lambda x: x or 0)
    rural_ranchettes = FloatField(prepare=lambda x: x or 0)
    rural_employment = FloatField(prepare=lambda x: x or 0)
    campus_or_university = FloatField(prepare=lambda x: x or 0)
    institutional = FloatField(prepare=lambda x: x or 0)
    parks_and_open_space = FloatField(prepare=lambda x: x or 0)

    class Meta:
        delimiter = ","
        has_header = True
class HorarisCSV(CsvModel):
    a1 = IgnoredField()
    group = CharField()
    teacher = CharField()
    subject = CharField()
    classroom = CharField()
    date = IntegerField()
    time = IntegerField()
    b1 = IgnoredField()

    class Meta:
        delimiter = ","
class ImportCropType(CsvModel):
    id = IntegerField(prepare=lambda x: x or 0)
    name = CharField(prepare=lambda x: x or '')
    alfalfa = FloatField(prepare=lambda x: x or 0)
    almonds = FloatField(prepare=lambda x: x or 0)
    apples = FloatField(prepare=lambda x: x or 0)
    apricots = FloatField(prepare=lambda x: x or 0)
    asparagus = FloatField(prepare=lambda x: x or 0)
    beans = FloatField(prepare=lambda x: x or 0)
    blueberries = FloatField(prepare=lambda x: x or 0)
    corn = FloatField(prepare=lambda x: x or 0)
    grapes = FloatField(prepare=lambda x: x or 0)
    mandarins = FloatField(prepare=lambda x: x or 0)
    nursery = FloatField(prepare=lambda x: x or 0)
    olives = FloatField(prepare=lambda x: x or 0)
    other_citrus = FloatField(prepare=lambda x: x or 0)
    other_fruits_and_nuts = FloatField(prepare=lambda x: x or 0)
    other_stone_fruits = FloatField(prepare=lambda x: x or 0)
    pasture = FloatField(prepare=lambda x: x or 0)
    peaches = FloatField(prepare=lambda x: x or 0)
    pears = FloatField(prepare=lambda x: x or 0)
    prunes = FloatField(prepare=lambda x: x or 0)
    rice = FloatField(prepare=lambda x: x or 0)
    safflower = FloatField(prepare=lambda x: x or 0)
    strawberry = FloatField(prepare=lambda x: x or 0)
    sunflower = FloatField(prepare=lambda x: x or 0)
    timber = FloatField(prepare=lambda x: x or 0)
    tomatoes = FloatField(prepare=lambda x: x or 0)
    vegetables = FloatField(prepare=lambda x: x or 0)
    walnuts = FloatField(prepare=lambda x: x or 0)
    wheat = FloatField(prepare=lambda x: x or 0)
Esempio n. 10
0
class ProfessorsCSV(CsvModel):
    shortId = CharField()
    surname = CharField()
    s0 = IgnoredField()
    s1 = IgnoredField()
    s2 = IgnoredField()
    s3 = IgnoredField()
    s4 = IgnoredField()
    s5 = IgnoredField()
    s6 = IgnoredField()
    s7 = IgnoredField()
    s8 = IgnoredField()
    s9 = IgnoredField()
    a0 = IgnoredField()
    a1 = IgnoredField()
    a2 = IgnoredField()
    a3 = IgnoredField()
    a4 = IgnoredField()
    a5 = IgnoredField()
    a6 = IgnoredField()
    a7 = IgnoredField()
    position = CharField()
    b1 = IgnoredField()
    desc = CharField()
    ss0 = IgnoredField()
    ss1 = IgnoredField()
    ss2 = IgnoredField()
    ss3 = IgnoredField()
    ss4 = IgnoredField()
    name = CharField()
    c0 = IgnoredField()
    c1 = IgnoredField()
    c2 = IgnoredField()
    c3 = IgnoredField()
    c4 = IgnoredField()
    c5 = IgnoredField()
    c6 = IgnoredField()
    c7 = IgnoredField()
    c8 = IgnoredField()
    c9 = IgnoredField()
    z0 = IgnoredField()
    z1 = IgnoredField()
    z2 = IgnoredField()

    class Meta:
        delimiter = ","
class ImportPlacetypeComponent(CsvModel):
    #    BTID,Building_Type,
    # Urban Mixed Use,Urban Residential,Urban Commercial,City Mixed Use,City Residential,City Commercial,
    # Town Mixed Use,Town Residential,Town Commercial,Village Mixed Use,Village Residential,Village Commercial,
    # Neighborhood Residential,Neighborhood Low,Office Focus,Mixed Office and R&D,Office/Industrial,Industrial Focus,
    # Low-Density Employment Park,High Intensity Activity Center,Mid Intensity Activity Center,
    # Low Intensity Retail-Centered N'Hood,Retail: Strip Mall/ Big Box,Industrial/Office/Res Mixed High,
    # Industrial/Office/Res Mixed Low,Suburban Multifamily,Suburban Mixed Residential,Residential Subdivision,
    # Large Lot Residential Area,Rural Residential,Rural Ranchettes,Rural Employment,Campus/ University,
    # Institutional,Parks & Open Space,BuildingType Name,Gross_Net_Flag
    category = CharField(prepare=lambda x: x or '')
    btid = IntegerField(prepare=lambda x: x or 0)
    color = CharField(prepare=lambda x: x or '')
    name = CharField(prepare=lambda x: x or '')

    class Meta:
        delimiter = ","
        has_header = True
Esempio n. 12
0
class AulesCSV(CsvModel):
    shortName = CharField()
    name = CharField()
    s1 = IgnoredField()
    s2 = IgnoredField()
    s3 = IgnoredField()
    s4 = IgnoredField()
    s5 = IgnoredField()
    s6 = IgnoredField()
    s7 = IgnoredField()
    s8 = IgnoredField()
    s9 = IgnoredField()
    desc = CharField()
    ss1 = IgnoredField()
    ss2 = IgnoredField()
    ss3 = IgnoredField()
    ss4 = IgnoredField()
    ss5 = IgnoredField()

    class Meta:
        delimiter = ","
class ImportCrop(CsvModel):
    id = IntegerField(prepare=lambda x: x or 0)
    name = CharField(prepare=lambda x: x or '')

    crop_yield = FloatField(prepare=lambda x: x or 0)
    unit_price = FloatField(prepare=lambda x: x or 0)
    cost = FloatField(prepare=lambda x: x or 0)
    water_consumption = FloatField(prepare=lambda x: x or 0)
    labor_input = FloatField(prepare=lambda x: x or 0)
    truck_trips = FloatField(prepare=lambda x: x or 0)

    seed_cost = FloatField(prepare=lambda x: x or 0)
    chemical_cost = FloatField(prepare=lambda x: x or 0)
    fertilizer_cost = FloatField(prepare=lambda x: x or 0)
    custom_cost = FloatField(prepare=lambda x: x or 0)
    contract_cost = FloatField(prepare=lambda x: x or 0)
    irrigation_cost = FloatField(prepare=lambda x: x or 0)
    labor_cost = FloatField(prepare=lambda x: x or 0)
    equipment_cost = FloatField(prepare=lambda x: x or 0)
    fuel_cost = FloatField(prepare=lambda x: x or 0)
    other_cost = FloatField(prepare=lambda x: x or 0)
    feed_cost = FloatField(prepare=lambda x: x or 0)
    pasture_cost = FloatField(prepare=lambda x: x or 0)
    land_rent_cost = FloatField(prepare=lambda x: x or 0)
    other_cash_costs = FloatField(prepare=lambda x: x or 0)
    # We don't store this. We calculate it from everything above on the front-end
    total_cash_costs = FloatField(prepare=lambda x: x or 0)
    establishment_cost = FloatField(prepare=lambda x: x or 0)
    land_cost = FloatField(prepare=lambda x: x or 0)
    other_noncash_costs = FloatField(prepare=lambda x: x or 0)
    # We don't store this. We calculate it from everything above on the front-end
    total_noncash_costs = FloatField(prepare=lambda x: x or 0)

    class Meta:
        delimiter = ","
        has_header = True
Esempio n. 14
0
class Alumnes2CSV(CsvModel):
    row = CharField()

    class Meta:
        delimiter = ","
        has_header = True
Esempio n. 15
0
class ImportPrimaryComponent(CsvModel):
    # id
    id = IntegerField(prepare=lambda x: x or 0)
    #source,hyperlink,building_type,
    source = CharField(prepare=lambda x: x or '')
    website = CharField(prepare=lambda x: x or '')
    placetype_component = CharField(prepare=lambda x: x or '')
    #building,household_size,
    name = CharField(prepare=lambda x: x or '')
    address = CharField(prepare=lambda x: x or '')

    vacancy_rate = FloatField(prepare=lambda x: x or 0)
    household_size = FloatField(prepare=lambda x: x or 0)

    #Pct_SF_Large_Lot,Pct_SF_Small_Lot,Pct_Attached_SF,Pct_MF_2_to_4,Pct_MF_5_Plus,
    percent_detached_single_family = FloatField(prepare=lambda x: x or 0)
    percent_attached_single_family = FloatField(prepare=lambda x: x or 0)
    percent_multifamily_2_to_4 = FloatField(prepare=lambda x: x or 0)
    percent_multifamily_5_plus = FloatField(prepare=lambda x: x or 0)

    # Pct_Emp_Office_Svc,Pct_Educ_Svc,Pct_Medical_Svc,Pct_Public_Admin,
    percent_office_services = FloatField(prepare=lambda x: x or 0)
    percent_education_services = FloatField(prepare=lambda x: x or 0)
    percent_medical_services = FloatField(prepare=lambda x: x or 0)
    percent_public_admin = FloatField(prepare=lambda x: x or 0)

    #Pct_Retail_Svc,Pct_Restuarant,Pct_Accommodation,Pct_Arts_Entertainment,Pct_Other_Svc,
    percent_retail_services = FloatField(prepare=lambda x: x or 0)
    percent_restaurant = FloatField(prepare=lambda x: x or 0)
    percent_accommodation = FloatField(prepare=lambda x: x or 0)
    percent_arts_entertainment = FloatField(prepare=lambda x: x or 0)
    percent_other_services = FloatField(prepare=lambda x: x or 0)

    # Pct_Manufacturing,Pct_Transport_warehouse,Pct_Wholesale,Pct_Construction_Util,Pct_Agriculture,Pct_Extraction,
    percent_manufacturing = FloatField(prepare=lambda x: x or 0)
    percent_transport_warehouse = FloatField(prepare=lambda x: x or 0)
    percent_wholesale = FloatField(prepare=lambda x: x or 0)
    percent_construction_utilities = FloatField(prepare=lambda x: x or 0)

    percent_agriculture = FloatField(prepare=lambda x: x or 0)
    percent_extraction = FloatField(prepare=lambda x: x or 0)

    # Pct_ArmedForces,Pct_Military
    percent_military = FloatField(prepare=lambda x: x or 0)
    # percent_of_building_type,floors,percent_residential,percent_retail,percent_office,percent_industrial,
    percent_of_placetype_component = FloatField(prepare=lambda x: x or 0)
    lot_size_square_feet = FloatField(prepare=lambda x: x or 0)
    floors = FloatField(prepare=lambda x: x or 0)

    #total_far,parking_spaces,parking_structure_square_feet,residential_efficiency,residential_lot_square_feet,square_feet_per_du,
    total_far = FloatField(prepare=lambda x: x or 0)

    #residential efficiency
    residential_efficiency = FloatField(prepare=lambda x: x or 0)
    residential_square_feet_per_unit = FloatField(prepare=lambda x: x or 0)

    # retail_efficiency,retail_square_feet_per_employee,office_efficiency,office_square_feet_per_employee,
    retail_efficiency = FloatField(prepare=lambda x: x or 0)
    retail_square_feet_per_unit = FloatField(prepare=lambda x: x or 0)
    #office efficiency, etc.
    office_efficiency = FloatField(prepare=lambda x: x or 0)
    office_square_feet_per_unit = FloatField(prepare=lambda x: x or 0)

    #industrial_efficiency,industrial_square_feet_per_employee,
    industrial_efficiency = FloatField(prepare=lambda x: x or 0)
    industrial_square_feet_per_unit = FloatField(prepare=lambda x: x or 0)

    average_parking_space_square_feet = FloatField(prepare=lambda x: x or 0)
    surface_parking_spaces = FloatField(prepare=lambda x: x or 0)
    above_ground_parking_spaces = FloatField(prepare=lambda x: x or 0)
    below_ground_parking_spaces = FloatField(prepare=lambda x: x or 0)

    building_footprint_square_feet = FloatField(prepare=lambda x: x or 0)
    surface_parking_square_feet = FloatField(prepare=lambda x: x or 0)
    hardscape_other_square_feet = FloatField(prepare=lambda x: x or 0)

    irrigated_softscape_square_feet = FloatField(prepare=lambda x: x or 0)
    nonirrigated_softscape_square_feet = FloatField(prepare=lambda x: x or 0)

    irrigated_percent = FloatField(prepare=lambda x: x or 0)

    id2 = IntegerField(prepare=lambda x: x or 0)

    class Meta:
        delimiter = ","
        has_header = True
Esempio n. 16
0
class AlumnesCSV(CsvModel):
    id = IntegerField()
    name = CharField()
    plaest = CharField()
    niv = CharField()
    gpscls = CharField()
    grupclasse = CharField()
    email = CharField()
    home = CharField()
    mbl1 = CharField()
    mail1 = CharField()
    resp1 = CharField()
    resp2 = CharField()
    tlf2 = CharField()
    mbl2 = CharField()
    mail2 = CharField()

    class Meta:
        delimiter = ","
        has_header = True
Esempio n. 17
0
class TeacherEmailCSV(CsvModel):
    name = CharField()
    email = CharField()

    class Meta:
        delimiter = ","