Skip to main content

Code for the Master of Applied Data Science course Data Analysis and Visualization

Project description

This is the repository for the Master of Applied Data Science course "Data Analysis & Visualisation", previously known as "Data Mining & Exploration". All instructions assume a UNIX machine. You should have received an invite link for a VM; if not, contact your teacher. On the VM, everything is installed (like rye).

Setup the virtual environment

  1. First, make sure you have python >= 3.11. You can check the version with python --version.
  2. Make sure rye is there. Alternatively, use pip to install your environment.
    • check if it is installed by executing rye --help
    • if not, run curl -sSf https://rye.astral.sh/get | bash (not necessary on the VM)
    • watch the intro video for rye at https://rye.astral.sh/guide/
  3. Install the dependecies by navigating to the MADS-DAV folder where the pyproject.toml is located and run rye sync.

Run the preprocessor

Download a chat from Whatsapp and put it in the data/raw folder. Rename the file to `chat.txt' and run the following command:

source .venv/bin/activate

This will activate your virtual environment. You can check which python is being used by running:

which python

After this, you can run the preprocessor with the following command:

analyzer --device ios

Change ios to android if you have an android device. This will run the src/wa_analyzer.py:main method, which will process the chat and save the results in the data/processed folder.

You should see some logs, like this:

2024-02-11 16:07:19.191 | INFO     | __main__:main:71 - Using iOS regexes
2024-02-11 16:07:19.201 | INFO     | __main__:process:61 - Found 1779 records
2024-02-11 16:07:19.201 | INFO     | __main__:process:62 - Appended 152 records
2024-02-11 16:07:19.202 | INFO     | __main__:save:30 - Writing to data/processed/whatsapp-20240211-160719.csv
2024-02-11 16:07:19.206 | SUCCESS  | __main__:save:32 - Done!

Inside the log folder you will find a logfile, which has some additional information that might be useful for debugging.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wa_analyzer-0.3.1.tar.gz (33.9 MB view details)

Uploaded Source

Built Distribution

wa_analyzer-0.3.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file wa_analyzer-0.3.1.tar.gz.

File metadata

  • Download URL: wa_analyzer-0.3.1.tar.gz
  • Upload date:
  • Size: 33.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for wa_analyzer-0.3.1.tar.gz
Algorithm Hash digest
SHA256 1ba1549b64071419ce98e5b8285c698959729f646ea15efcbb388e0f333f85ba
MD5 62e2bcd361b84d062210c7751581b507
BLAKE2b-256 713271ae07a74295651f6e4fa79afdf9b499c84a63160c9cfda15786c518aace

See more details on using hashes here.

File details

Details for the file wa_analyzer-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: wa_analyzer-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for wa_analyzer-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f922e975f11bdc7ae8dfd5a77ff1aa6ad21024e7b1da03e10861f431600710d5
MD5 ba74890b15f5b05a7a2615132b921a17
BLAKE2b-256 c8d135732420dc046054a8aa3175b8a42030137ccf755521cfcdd87000358d42

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page