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
- First, make sure you have python >= 3.11. You can check the version with
python --version. - Make sure
ryeis there. Alternatively, usepipto 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/
- check if it is installed by executing
- Install the dependecies by navigating to the MADS-DAV folder where the
pyproject.tomlis located and runrye 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.
Metadata
Release files for wa-analyzer 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wa_analyzer-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / wa_analyzer-0.4.1-py3-none-any.whl
| Download URL | wa_analyzer-0.4.1-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2864eb248f9a724cf55235df6d65cf6c25143f027b2be41eabaee58fd37ab4f2
|
|
BLAKE2b-256 checksum How to use checksums |
7e4bb7eae0b12ca520c634c6d8d31839337e2817de8c90ba23088b7162320e65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.2
|
Security for wa-analyzer 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.