Giter Site home page Giter Site logo

Comments (3)

albertlyu avatar albertlyu commented on August 27, 2024

Looks like pitchStats.js was missing:

if (pitch.isWhiff())
{
    aggregator.whiff++;
}

I'm not sure why. I'll investigate. I'm guessing I didn't have an updated local repo when I submitted my pull request.

from pitchfx-site.

albertlyu avatar albertlyu commented on August 27, 2024

See commit 5e0f497 for the last time whiffs were being aggregated.

if (pitch.isSwing())
{
aggregator.swing++;
/*jshint maxdepth:5 */
if (pitch.isWhiff())
{
aggregator.whiff++;
if ((!havePitchTypeFilters || pitchTypeFilters[pitchCode]) && angular.isDefined(pitch.px) && angular.isDefined(pitch.pz))
{
whiffSeries.push([pitch.px, pitch.pz]);
}
}
}

When ec62105 was pushed to master, the whiff stats were wiped out. I believe the intention was to remove the whiffSeries object, but in doing so, aggregator.whiff++; was also removed. 5e0f497...ec62105#diff-112bb635c769a65c5ead2fd78f47975aR210

I believe the fix would be to add the following to L330-L333 at https://github.com/kruser/pitchfx-site/blob/master/app/app/scripts/controllers/pitchStats.js#L330-L333:

if (pitch.isSwing()) {
    aggregator.swing++;
    if (pitch.isWhiff()) {
        aggregator.whiff++;
    }
}

I will submit a pull request with these changes later today, for @kruser's review.

from pitchfx-site.

kruser avatar kruser commented on August 27, 2024

deploying to site now. I only see you on the site @albertlyu so it's safe to deploy.

FYI, if you don't want to show up on my Google Analytics you can always opt-out on Chrome. That's what I do.
https://tools.google.com/dlpage/gaoptout

from pitchfx-site.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.