https://github.com/csparpa/last.fm-stats
Exercise on Last.fm data aggregation
https://github.com/csparpa/last.fm-stats
data-analysis exercise lastfm lastfm-api python
Last synced: 24 days ago
JSON representation
Exercise on Last.fm data aggregation
- Host: GitHub
- URL: https://github.com/csparpa/last.fm-stats
- Owner: csparpa
- License: mit
- Created: 2014-10-14T10:06:38.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-19T12:43:03.000Z (over 11 years ago)
- Last Synced: 2023-08-03T13:42:40.906Z (almost 3 years ago)
- Topics: data-analysis, exercise, lastfm, lastfm-api, python
- Language: Python
- Size: 211 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
last.fm-stats
=============
Exercise on Last.fm data aggregation
Works on
--------
Python 2.7
How to use it
-------------
1. Clone source code into a folder the Python interpreter can write into (eg. your
home directory):
```bash
$ git clone git@github.com:csparpa/last.fm-stats.git
```
2. Install dependencies:
```bash
$ cd last.fm_stats
$ sudo pip install -r requirements.txt
```
(omit `sudo` if on Windows)
3. Launch the script replacing `` with the username you want stats for:
```bash
$ python lastfm_stats.py
You have listened to a total of 254 tracks.
Your top 5 favorite artists: U2, Led Zeppelin, Rolling Stones, Bob Marley, Kasabian.
You listen to an average of 32 tracks a day.
Your most active day is Tuesday.
```
How to run the test suites
--------------------------
Make sure you are inside the git-cloned folder and execute:
```bash
$ python -m unittest discover
```
What you need to know
---------------------
* Only unit tests have been provided, using mocks where needed for the
external components:
- Last.fm web API
- SQLite database
* Average tracks per day are rounded to the lowest integer value