Esempio n. 1
0
class DataPoint(Model):

    uid = StringType(required=True)
    date = DateTimeType(required=True)
    latitude = FloatType(min_value=-90, max_value=90, required=True)
    longitude = FloatType(min_value=-180, max_value=180, required=True)
    initiated = DateTimeType()
    completed = DateTimeType()
Esempio n. 2
0
class NumberDimension(Model):

    type = StringType()
    count = IntType()
    min = IntType()
    max = IntType()
    avg = FloatType()
    std_deviation = FloatType()
Esempio n. 3
0
class Event(Model):
    class Options:
        serialize_when_none = True

    id = StringType()
    title = StringType()
    description = StringType()
    start = DateTimeType()
    end = DateTimeType()
    timezone = StringType()
    duration = IntType()
    category = StringType()
    labels = ListType(StringType())
    country = StringType()
    rank = IntType()

    # `local_rank`, `aviation_rank`, and `phq_attendance` are paid features.
    # They will only show up in your response body if you
    # have subscribed to them.
    local_rank = IntType()
    aviation_rank = IntType()
    phq_attendance = IntType()

    entities = ListType(ModelType(Entities))
    location = GeoJSONPointType()
    place_hierarchies = ListType(ListType(StringType()))
    scope = StringType()
    relevance = FloatType()
    state = StringType()
    first_seen = DateTimeType()
    updated = DateTimeType()
    deleted_reason = StringType()
    duplicate_of_id = StringType()
Esempio n. 4
0
class CountResultSet(Model):

    count = IntType()
    top_rank = FloatType()
    rank_levels = DictType(IntType)
    categories = DictType(IntType)
    labels = DictType(IntType)
Esempio n. 5
0
class Event(Model):
    class Options:
        serialize_when_none = True

    id = StringType()
    title = StringType()
    description = StringType()
    start = DateTimeType()
    end = DateTimeType()
    timezone = StringType()
    duration = IntType()
    category = StringType()
    labels = ListType(StringType())
    country = StringType()
    rank = IntType()
    local_rank = IntType()
    entities = ListType(ModelType(Entities))
    location = GeoJSONPointType()
    place_hierarchies = ListType(ListType(StringType()))
    scope = StringType()
    relevance = FloatType()
    state = StringType()
    first_seen = DateTimeType()
    updated = DateTimeType()
    deleted_reason = StringType()
    duplicate_of_id = StringType()
Esempio n. 6
0
class CalendarDay(Model):

    date = DateType()
    count = IntType()
    top_rank = FloatType()
    rank_levels = DictType(IntType)
    categories = DictType(IntType)
    labels = DictType(IntType)
    top_events = ModelType(EventResultSet)
Esempio n. 7
0
class AnalysisParams(PaginatedMixin, SortableMixin, Model):
    class Options:
        serialize_when_none = False

    id = StringType(required=True)
    date = ModelType(DateTimeRange)
    initiated = ModelType(DateTimeRange)
    completed = ModelType(DateTimeRange)
    within = StringListType(StringModelType(Area), separator="+")
    significance = FloatType(min_value=0, max_value=100)
    place = ModelType(Place)
Esempio n. 8
0
class CountAnalysisComponent(Model):

    count = IntType()
    expected = FloatType()
    excess = FloatType()
Esempio n. 9
0
class MeanAnalysisComponent(Model):

    mean = FloatType()
    std_deviation = FloatType()
    expected = FloatType()
    excess = FloatType()