Add generated chart and README

This commit is contained in:
Tyler Hallada 2020-12-14 13:33:11 -05:00
parent 0a0cb55ba6
commit a72212a7ff
2 changed files with 24 additions and 0 deletions

24
README.md Normal file
View File

@ -0,0 +1,24 @@
# Last.fm Stats
This is a tool I wrote to generate year-end charts and graphs for my listening
data in Last.fm. The binary downloads artists listened to and tags associated
with each to files. Then I use vega-lite to display charts based on the data.
Right now it just generates this, my top played genres of the year:
![Top Genre Tags Played in 2020](chart.png)
## .env file
Running the downloads requires you set two variables in the environment:
```
LASTFM_USER=thallada
LASTFM_API_KEY=<apikey-goes-here>
```
## Generating chart
I couldn't get `vg2png` to generate a chart that had bars for some reason, but
if I copy the JSON from `tags.json` into `"data": { "values": [...] }` and then
paste that into the [online editor](https://vega.github.io/editor/) it works.

BIN
chart.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB