/covid-analysis-mongoDB-explored

A covid data analysis application mainly focused on the applications of mongoDB databse

Primary LanguageJupyter NotebookMIT LicenseMIT


19AIE304 - BDMS END SEM PROJECT

Team - 03


Team Members :

Name : Roll No :
Haripranav J M CB.EN.U4AIE20021
Pravin Raj A K CB.EN.U4AIE20054
Sabharish A L CB.EN.U4AIE20061
Sai Sangavi C CB.EN.U4AIE20063
Saivarsha R CB.EN.U4AIE20064

Project Title :

Covid-19 Vaccination and Cases Analysis Along with 

  -> 3 Tier Architecture

  -> Data Replication [ CAP Theorem ]

  -> Data Streaming


File Contents :

  • Server directory containing codes for the application server

  • data/country_vaccinations.csv -> Dataset of global vaccination report

  • data/district_level_latest.csv -> Dataset of Indian District vise Covid Cases

  • dataInsertion.py -> Code for inserting data into the mongoDB database server

  • dataAnalysis.py  -> Code performing some analysis from the database


Instructions :

  • For creating a mongodb database with replication enabled, In the terminal type :

    mongod --dbpath <path_to_db_storage> --replSet <replication_set_name> --bind_ip <your_system_ip>

    The same command can be given to all the different nodes provided they are in the same network
  • Next in the primary node open a terminal and then type

    mongosh --host <your_system_ip>

    Then in the mongosh shell to initiate the replication set and add the nodes

    rs.initiate()
    rs.add(<node1_ip>:<port>)
    rs.add(<node2_ip>:<port>)

    You can check the status of the database using

    rs.status()
  • Now we can have the mongoDB url for connecting through a application

    mongodb://<node1_ip>:<node1_port>,<node2_ip>:<node2_port>,<node3_ip>:<node3_port>/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.0

    Once you get the URL make sure you also change it in the Server/mongoDB/views.py connString variable

Applciation Server :

The application server is developed using Python's Django Framework.
To start the server run the following command in the terminal at the Server directory:

python manage.py runserver

To access the application server in the network run the following command in the terminal at the same directory

python manage.py runserver 0.0.0.0:<port>
[or]
python manage.py runserver <system_ip>:<port>

To create a new admin account to access the server run the following command:

python manage.py createsuperuser

and fill the asked details and then make sure you enter the same in the admin dashboard and the datainsertion code

Sample username and password :
User Name : admin
Password : admin

Images :

Login Page Dashboard Page Analysis Page Edit Data Page

Analysis Images

Analysis One Analysis Two Analysis One Analysis One Analysis One