map_filter_values: Translate values (only) to stats.nba.com API values

Description Usage Arguments Details Value See Also

Description

Translates the values in a named list of statsnbaR key-value pairs to values that the stats.nba.com API recognises.

Usage

1

Arguments

filters

The statsnbaR filter key-value pairs

Details

The mappings for each filter are specified in the internal YAML data which look, for example, like the following:

1
2
3
4
5
6
7
filters :
    league :
        mapping : {
            NBA      : "00",
            D-League : "20"
            }
        default : NBA

When we say that only the value is mapped, that means we do not map the key-name ‘league’ to the key-name that stats.nba.com expects. We simply map the value 'NBA' that statsnbaR accepts to the value "00" that the stats.nba.com API expects. Simple, yes?

Value

Named list of key-values with values mapped to stats.nba.com API values

See Also

map_filters


stephematician/statsnbaR documentation built on May 30, 2019, 3:17 p.m.