Skip to content

Is it still possible to get shot chart detail? #107

Open
@ghost

Description

Hello, I tried to fetch data about shot chart details, but it seems like stats.nba.com no longer has the servlet to handle this request. Can I still get shot chart details? Thank you!!

nba.stats.shots({
            PlayerID: this.props.playerId
        }).then((response) => {
            const final_shots = response.shot_Chart_Detail.map(shot => ({
                x: (shot.locX + 250) / 10,
                y: (shot.locY + 50) / 10,
                action_type: shot.actionType,
                shot_distance: shot.shotDistance,
                shot_made_flag: shot.shotMadeFlag,
            }));

            const courtSelection = d3.select("#shot-chart");
            const chart_court = court().width(500);
            const chart_shots = shots().shotRenderThreshold(2).displayToolTips(true).displayType("hexbin");
            courtSelection.call(chart_court);
            courtSelection.datum(final_shots).call(chart_shots);
        });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions