vaccine_data_visual package

Submodules

vaccine_data_visual.admin module

vaccine_data_visual.api module

class vaccine_data_visual.api.CovidDataAPI(**kwargs)

Bases: rest_framework.generics.ListAPIView

queryset
serializer_class

alias of vaccine_data_visual.serializers.CovidSerializer

class vaccine_data_visual.api.VaccineDataAPI(**kwargs)

Bases: rest_framework.generics.ListAPIView

queryset
serializer_class

alias of vaccine_data_visual.serializers.VaccineSerializer

vaccine_data_visual.apps module

class vaccine_data_visual.apps.VaccineDataVisualConfig(app_name, app_module)

Bases: django.apps.config.AppConfig

default_auto_field = 'django.db.models.BigAutoField'
name = 'vaccine_data_visual'

vaccine_data_visual.models module

class vaccine_data_visual.models.CovidData(*args, **kwargs)

Bases: django.db.models.base.Model

Data model to store and retrieve covid data by country

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

confirmed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

country

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_date(*, field=<django.db.models.fields.DateField: date>, is_next=True, **kwargs)
get_previous_by_date(*, field=<django.db.models.fields.DateField: date>, is_next=False, **kwargs)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class vaccine_data_visual.models.VaccineData(*args, **kwargs)

Bases: django.db.models.base.Model

Data model to store and retrieve vaccine data by country

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

country

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

doses_administered

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_date(*, field=<django.db.models.fields.DateField: date>, is_next=True, **kwargs)
get_previous_by_date(*, field=<django.db.models.fields.DateField: date>, is_next=False, **kwargs)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>

vaccine_data_visual.serializers module

class vaccine_data_visual.serializers.CovidSerializer(*args, **kwargs)

Bases: rest_framework.serializers.ModelSerializer

CovidData serializer for REST API Integration

class Meta

Bases: object

fields = '__all__'
model

alias of vaccine_data_visual.models.CovidData

class vaccine_data_visual.serializers.VaccineSerializer(*args, **kwargs)

Bases: rest_framework.serializers.ModelSerializer

VaccineData serializer for REST API Integration

class Meta

Bases: object

fields = '__all__'
model

alias of vaccine_data_visual.models.VaccineData

vaccine_data_visual.tests module

vaccine_data_visual.urls module

vaccine_data_visual.views module

vaccine_data_visual.views.covid_cases_predict(request)

http request to perform covid cases linear regression prediction

Parameters

request – http request to perform covid cases linear regression prediction

Returns

JSON data of predicted values

vaccine_data_visual.views.covid_data_chart(request)

Handles http request and responds with formatted JSON data for covid for a given country

Parameters

request – http request

Returns

formatted JSON data response

vaccine_data_visual.views.home_demo(request)

Template Function handles http request / response and HTML page rendering.

Parameters

request – gets the http request and returns response for rendering the HTML

Returns

render, html page response

vaccine_data_visual.views.linear_reg_predict(data)

Perform linear regression model execution and return the predicted values

Parameters

data – data sequence (covid or vaccine data for given country)

Returns

The generated predicted values for the next few days

vaccine_data_visual.views.vaccine_covid_data_aggregation(request)
vaccine_data_visual.views.vaccine_data_chart(request)

Handles http request and responds with formatted JSON data for vaccine for a given country

Parameters

request – http request

Returns

formatted JSON data response

vaccine_data_visual.views.vaccine_doses_predict(request)

http request to perform covid cases linear regression prediction

Parameters

request – http request to perform vaccine doses linear regression prediction

Returns

JSON data of predicted values

Module contents