How to use the predicthq.endpoints.schemas.FloatType function in predicthq

To help you get started, we’ve selected a few predicthq examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github predicthq / sdk-py / predicthq / endpoints / v1 / signals / schemas.py View on Github external
avg = FloatType()
    std_deviation = FloatType()


class Dimensions(Model):

    date = ModelType(DateDimension)
    initiated = ModelType(DateDimension)
    completed = ModelType(DateDimension)
    location = ModelType(GeoDimension)
    # @todo: Support custom dimensions from signal


class MeanAnalysisComponent(Model):

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


class CountAnalysisComponent(Model):

    count = IntType()
    expected = FloatType()
    excess = FloatType()


class DailyAnalysis(Model):

    date = DateType()
    demand = ModelType(CountAnalysisComponent)
github predicthq / sdk-py / predicthq / endpoints / v1 / signals / schemas.py View on Github external
count = IntType()


class CategoryDimension(Model):

    type = StringType()
    options = ListType(ModelType(CategoryDimensionComponent))


class NumberDimension(Model):

    type = StringType()
    count = IntType()
    min = IntType()
    max = IntType()
    avg = FloatType()
    std_deviation = FloatType()


class Dimensions(Model):

    date = ModelType(DateDimension)
    initiated = ModelType(DateDimension)
    completed = ModelType(DateDimension)
    location = ModelType(GeoDimension)
    # @todo: Support custom dimensions from signal


class MeanAnalysisComponent(Model):

    mean = FloatType()
    std_deviation = FloatType()
github predicthq / sdk-py / predicthq / endpoints / v1 / signals / schemas.py View on Github external
class CategoryDimension(Model):

    type = StringType()
    options = ListType(ModelType(CategoryDimensionComponent))


class NumberDimension(Model):

    type = StringType()
    count = IntType()
    min = IntType()
    max = IntType()
    avg = FloatType()
    std_deviation = FloatType()


class Dimensions(Model):

    date = ModelType(DateDimension)
    initiated = ModelType(DateDimension)
    completed = ModelType(DateDimension)
    location = ModelType(GeoDimension)
    # @todo: Support custom dimensions from signal


class MeanAnalysisComponent(Model):

    mean = FloatType()
    std_deviation = FloatType()
    expected = FloatType()
github predicthq / sdk-py / predicthq / endpoints / v1 / signals / schemas.py View on Github external
location = ModelType(GeoDimension)
    # @todo: Support custom dimensions from signal


class MeanAnalysisComponent(Model):

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


class CountAnalysisComponent(Model):

    count = IntType()
    expected = FloatType()
    excess = FloatType()


class DailyAnalysis(Model):

    date = DateType()
    demand = ModelType(CountAnalysisComponent)
    lead = ModelType(MeanAnalysisComponent)
    span = ModelType(MeanAnalysisComponent)


class AnalysisResultSet(ResultSet):

    results = ResultType(DailyAnalysis)
github predicthq / sdk-py / predicthq / endpoints / v1 / signals / schemas.py View on Github external
class Options(Signal.Options):
        pass


class SignalResultSet(ResultSet):

    results = ResultType(SavedSignal)


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()
    # @todo: Support custom dimensions from signal


class SignalDataPoints(Model):

    id = StringType(required=True)
    data_points = ListType(ModelType(DataPoint), required=True)
    chunk_size = IntType(default=1000, max_value=5000, required=True)


class DateDimension(Model):

    type = StringType()
    count = IntType()
github predicthq / sdk-py / predicthq / endpoints / v1 / events / schemas.py View on Github external
updated = DateTimeType()
    deleted_reason = StringType()
    duplicate_of_id = StringType()


class EventResultSet(ResultSet):

    overflow = BooleanType()

    results = ResultType(Event)


class CountResultSet(Model):

    count = IntType()
    top_rank = FloatType()
    rank_levels = DictType(IntType)
    categories = DictType(IntType)
    labels = DictType(IntType)


class TopEventsSearchParams(SortableMixin, Model):

    limit = IntType(min_value=0, max_value=10)


class CalendarParams(SearchParams):

    top_events = ModelType(TopEventsSearchParams)


class CalendarDay(Model):
github predicthq / sdk-py / predicthq / endpoints / v1 / events / schemas.py View on Github external
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()


class EventResultSet(ResultSet):

    overflow = BooleanType()

    results = ResultType(Event)


class CountResultSet(Model):
github predicthq / sdk-py / predicthq / endpoints / v1 / signals / schemas.py View on Github external
class AnalysisResultSet(ResultSet):

    results = ResultType(DailyAnalysis)


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)
github predicthq / sdk-py / predicthq / endpoints / v1 / signals / schemas.py View on Github external
class Dimensions(Model):

    date = ModelType(DateDimension)
    initiated = ModelType(DateDimension)
    completed = ModelType(DateDimension)
    location = ModelType(GeoDimension)
    # @todo: Support custom dimensions from signal


class MeanAnalysisComponent(Model):

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


class CountAnalysisComponent(Model):

    count = IntType()
    expected = FloatType()
    excess = FloatType()


class DailyAnalysis(Model):

    date = DateType()
    demand = ModelType(CountAnalysisComponent)
    lead = ModelType(MeanAnalysisComponent)
    span = ModelType(MeanAnalysisComponent)
github predicthq / sdk-py / predicthq / endpoints / v1 / signals / schemas.py View on Github external
class SavedSignal(SignalID, Signal):

    class Options(Signal.Options):
        pass


class SignalResultSet(ResultSet):

    results = ResultType(SavedSignal)


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()
    # @todo: Support custom dimensions from signal


class SignalDataPoints(Model):

    id = StringType(required=True)
    data_points = ListType(ModelType(DataPoint), required=True)
    chunk_size = IntType(default=1000, max_value=5000, required=True)


class DateDimension(Model):

    type = StringType()