Giter Club home page Giter Club logo

yankeesbythenumbers's Introduction

Yankees by the Numbers

This dataset contains famous numbers relevant to the history of the New York Yankees/Highlanders.

How do I use this?

Grab the CSV file. For the number you want, take that line of the CSV file. One or more comma-separated and properly-delimited facts will be available for you to use.

Sample PHP code

// Open the file and use CSV parsing mode.
$file = new SplFileObject('facts.csv', 'r');
$file->setFlags(SplFileObject::READ_CSV | SplFileObject::DROP_NEW_LINE);

// Get the desired line number.
// Note that SplFileObject::seek() uses zero-based indexing!
$file->seek($NUMBER_YOU_WANT - 1);

// Get an array full of zero or more facts.
$facts = $file->current();

// Close the file.
$file = null;

Sample PowerShell code

(Get-Content -Path 'facts.csv' -TotalCount $NUMBER_YOU_WANT)[-1]

Did you use this?

Yes. Visit https://TightenThisShitUp.com for a live demo. The number it pulls for facts is the number of men left on base by the 2021 Yankees. (Not good enough? There is an "easteregg" parameter to really see it in action. Don't abuse my bandwidth without making a donation.)

May I use this?

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC-BY-4.0

Where did you get this data?

Mostly Wikipedia, Baseball Reference, and a bunch of other places. No unverified research went into the creation of this dataset.

Hey, you missed something; you have a typo; or you got something wrong.

Submit a pull request. Please cite your source, too.

You know, you can do a lot better than a giant CSV file.

I know. I'll think about other formats. Ideally, you would want to take this file and load it into a proper database. Parsing this millions-line-long CSV file is going to be an exercise in futility.

yankeesbythenumbers's People

Contributors

rhymeswithmogul avatar

Stargazers

 avatar

Watchers

 avatar

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.