# Artist Similarity Matrix
Product Page: https://data-analytics.atlassian.net/wiki/spaces/DS/pages/69632337/Similar+Artists

## Using the API

The API returns a JSON formatted result, in the following format:

    - meta:
        - query(str)                the artist you queried for, in normalised form
        - min_similarity(float)     the minimum similarity score
        - results                   number of results
    - results
      -
        - name                      artist name
        - similarity_score          normalised similarity score (highest value = 1)


### Basic querying

To query the API:

    http://<endpoint>/?artist=Johnny%20Cash

Note that simply invoking the endpoint without an `artist` query parameter 
will yield an error.

### Minimum similarity

The `min_similarity` query parameter allows you to limit the minimum similarity 
score. This must be a floating point value or the integer 1. Specifying the 
integer 1 retrieves the single most similar result.

### Local development

#### Makefile

##### Targets

| Target | Description |
| --- | --- |
| help | show available targets and current configuration |
| venv/init | create virtual environment |
| venv/activate | activate virtual environment and install dependencies |
| local/init | install or upgrade `bumpversion` |
| bumpversion | run `bumpversion` |
| docker/login | login to ECR |
| docker/build | build docker image |
| docker/push | push docker image to ECR |
| docker/run | run docker container |
