Code Monkey home page Code Monkey logo

covitter's Introduction

COVITTER ANALYSIS

Covitter Analysis is a COVID-19 analysis application on Twitter posts. It uses a stream of posts about COVID-19 collected at 10 minute intervals. On the application, analysis on sentiment, entity linking and co-occurancies are presented.

You can access the application from https://covitter.herokuapp.com.

You may find the detailed documentation here.

The application is readily available here and the source code can be cloned from this repository. To use the system there are certain accounts one has to get. They are;

  • Twitter developer account
  • TagMe account
  • News API account
  • A database url that contains the data explained the “System Design” section of the project documentation in the repository.

An .env file has to be created by filling the values in the .env-sample file in the repository. It is placed at the root of the repository with (or in place of) the sample file. After obtaining all environment variables, there are two ways to run and customize the code.

Using pipenv

1. Install Python 3

2. Install pipenv by: pip install pipenv

3. Go to applications root directory: cd SWE573_project

4. Run pipenv install . This will install every dependency declared in the requirements.txt file.

5. After the virtual environment is created, go to it by; pipenv shell

6. Run the application by; python manage.py runserver 0.0.0.0:8000 (for Windows) or gunicorn CovitterAnalysis.wsgi:application --bind 0.0.0.0:8000 (for Mac)

7. Go to the localhost:8000 to view the application.

Using Docker

As the application is dockerized, an image can be built and ran, by the following steps.

1. Build image; docker build -t covitter -f Dockerfile.local . (this is for local use, for deployment use Dockerfile instead)

2. Run; docker run -it -p 8000:8000 --env-file=.env covitter (--env-file is optional, add that if the application fails to read environment variables)

3. Go to the localhost:8000 to view the application.

covitter's People

Contributors

melismirza avatar

Watchers

 avatar  avatar

covitter's Issues

Set up "Search in time" page

On frontend put: From time, end time, search button

Backend: Display a page with 100 tweets from the given time interval

Deploy to Prod using Heroku

Deploy the application to prod.

Set the DB as postgres that was set on Heroku, for posts

Test every functionality

Django Research

Work on:

  • the general structure of Django
  • MVC
  • dependencies
  • a basic tutorial / implementation

share findings on Wiki page.

Create Mockup

Design the front page and create a mock up
Include:

  • fields for user input
  • tables for data output
  • charts and graphics for visualization

Create Concurrency Network

  • Create the network: which is better, weighted or unweighted?
  • Consider the ways to display it on front-end
  • Decide which indices to display on frontend

Create This Week Page

Using the word search results page as a template, update views.py and templates to include display of data results.

Find and Implement a Bootstrap Theme

Find a bootstrap design theme online, free.

Implement it on the application for the general style. Use "static" folder to manage and reference the implementation.

Create Sign Up Page

Required fields for registration

  • First name
  • Last name
  • User name
  • Password
  • Password confirmation
  • E-mail

Once registered the sign up page should log the user in and direct to main page.

Finalize SRS

Finalize the software requirements specifications. Include:

  • Functional requirements
  • Non-functional requirements
  • Mockups
  • Scenarios

Put in on Wiki.

Check Piazza for implementation details

Start Project Planning Document

  • Install Project Libre
  • List all tasks in mind
  • Link the tasks together
  • Assign tasks to weekly milestones
  • show on Gant chart

Create .env File

Create the .env file and add every sensitive info in that. Commit changes

Write The Documentation For the Application

Create a documentation on the Wiki page to include;

  • function and operation of each feature on the pages
  • warning about usage if there are any
  • suggestions for future development

Create a Table At DB to Store Twitter Data

The table should contain the following fields:

  • Original and cleaned post content.
  • Favorite / retweet counts
  • Sentiment Analysis result
  • post date
  • emoji content
  • mentions in the post
  • entities in the post
  • owner of the post
  • whether post is a retweet or not

Transfer data on local db to Prod DB

As a single batch job, transfer all data collected on local POSTGRES db to the DB created on Heroku.

While transferring, re-check all retweet and favourite counts, send updated data

Implement Data Cleaning

Write the code to implement the data cleaning strategy.

  • Have the methods modularized in a separate class that can be imported.
  • Keep the custom stopwords and abbreviations on different files and read them into the code.

Test MongoDB

  • Setup a trial DB (mongo cloud is ok)
  • load some mock data
  • try CRUD by script
  • if you find stg noteworthy/ out of ordinary, create and share on wiki

Create Postgres DB on Heroku

Create a postgres db on Heroku. The model for that will be the local DB that is currently being used for storing posts.

Look for ways to transfer data form local to Heroku. If possible sent previously collected data.

Prepare Questions For Requirement Elicitation

Before the meeting with customer questions for requirement elicitation will be prepared. Questions may be collected on a wiki page that is open to contribution from every member.

Questions should be prepared to enlighten the following topics (at minimum):

  • The product they have in mind
  • The medium it will run on
  • Performance requirements
  • Target group of the product
  • User interface design
  • Deadline of the project (milestones and deliveries up to that)
  • Amount of deliveries and the minimum content
  • Budget of the project
  • Freshness of the data to be used
  • Regulatory constraints, if any

Test Twitter API

Test with the Twitter API for:

  • trending topics
  • limitations for the account permissions
  • stream data
  • historical data
  • searching

Dockerize the Django Application

Dockerize a trial django application.

Main purpose is to understand the docker-compose.yaml, requirements.txt and containerization of the application.

Run the application using Docker.

Store Analyzed Stream Data at DB

  • Impelement the process to clean& analyze and then store data at the Postgresql database.
  • Use the classes created for cleaning and analyzing

Create the Login Page

Should have fields for username and password.
Must direct to main page if user already a member or else to sign up.
Display if there are any error messages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.