GithubHelp home page GithubHelp logo

han-tun / bizarroball Goto Github PK

View Code? Open in Web Editor NEW

This project forked from allanbowe/bizarroball

0.0 1.0 0.0 445 KB

Sample SAS data as contributed by Paul Dorfman and Don Henderson in "Data Management Solutions Using SAS Hash Table Operations: A Business Intelligence Case Study"

License: MIT License

SAS 70.12% Shell 0.93% HTML 0.83% CSS 7.63% Rich Text Format 20.49%

bizarroball's Introduction

Bizarro Ball

TLDR;

To get the Bizarro Ball data, simply run the following:

filename bizarro url 
  "https://raw.githubusercontent.com/allanbowe/BizarroBall/master/bizarroball.sas";
%inc bizarro;

Note - this can take 4-5 minutes to run, as there is a lot of data! It will be saved in your SASUSER library/folder, change this location manually if desired.

After the data is loaded you can remap the libraries in future sessions as follows:

filename bizarro url
  "https://raw.githubusercontent.com/allanbowe/BizarroBall/master/autoexec.sas";
%inc bizarro;

Wait - What Is This?

This repository contains the sample data used in the seminal book Data Management Solutions Using SAS Hash Table Operations: A Business Intelligence Case Study by Paul Dorfman and Don Henderson. More information on the incredible power of hashing can be found in their SGF2017 paper Beyond Table Lookup: The Versatile SAS® Hash Object .

The code itself is documented here and was originally sourced from here and here.

An article on this data is also available on communities.

Who Is It For?

Primarily this data is useful (and was prepared specifically) for readers of the aforementioned book, however the authors have given permission for the data to be used for other purposes as well - such as testing, education, development, and demos.

Unlike the sample data in SASHELP, the Bizarro data can modified. It also contains some interesting properties (such as md5 hashed indexes / surrogate keys).

How Do I Use It?

For ease of extraction, the files are built into a single bizarroball.sas file that can be easily copy pasted into a SAS session.

Simply modify the root variable (to a permanent path, if desired), and hit RUN.

This produces the following data:

  • 32 teams (2 leagues, each with 16 teams)
  • 1,600 Players (2 leagues * 16 teams * 50 players)
  • 992 games over 31 days ( 16 morning games and 16 afternoon games for each of 31 days)
  • 27,776 batter x game combinations (each team has 14 batters in each of the 62 games)
  • 17,856 pitcher x game combinations (each team has 9 pitchers, who each pitch one inning, in each of the 62 games)
  • 98,769 plate appearances across all the teams/games. This number can be varied based on the random number seeds used to determine the results of each pitch. Note that this data includes details on what bases a given runner occupies at the completion of each plate appearance.
  • 301,506 pitches for those 98,769 plate appeances.
  • 23,901 runs scored

This Is Great! How Do I Show My Appreciation?

After you have bought the book, feel free to hit the STAR button at the top of this repo so others can learn about (and benefit from) this contribution

bizarroball's People

Contributors

allanbowe avatar

Watchers

James Cloos 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.