Giter VIP home page Giter VIP logo

edgar-analytics's Introduction

Table of Contents

  1. Approach
  2. Dependencies
  3. Run Instructions

Approach

There are mainly xxx parts for the approach here:

  • Step1: read in each line of information from log.csv file, and the inactivity_period info from inactivity_period.txt file. Then store the log information in a list called 'data'
  • Step2: scan through each element in data list, create a dictionary using IP address as the key, the rest of the information as its values. There are 2 scenarios for information with new IP address and information with existing IP address.
  • Step3: A list called new_list is created using the processed key-value pair in dictionary. The calculation of time difference(delta) between current time to the time the IP first access the website is performed for each element in new_list.
  • Step4: using delta, 2 new lists(res_list1, res_list2) are created to stored records whose latest activity has passed the inactivity_period and within inactivity_period. Then res_list1 is sored by delta descending, and res_list2 is sorted by first access time and then last access time.
  • Step5: result list combines information from res_list1 and res_list2, and then print out to sessionization.txt file in output folder.

Dependencies

As the program is written in python3, below modules and libraries are used:

Modules:

  • os
  • csv
  • operator
  • datetime

Run Instructions

Simply go to folder /edgar-analytics-master, then run ./run.sh

For further questions, please email me at [email protected].

edgar-analytics's People

Contributors

qiandongmin avatar emhoa avatar

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.