{"id":97,"date":"2017-09-25T10:06:36","date_gmt":"2017-09-25T17:06:36","guid":{"rendered":"http:\/\/www.ootp.cavebutter.net\/blog\/?p=97"},"modified":"2017-09-25T10:06:36","modified_gmt":"2017-09-25T17:06:36","slug":"run-environment-3-the-second-run-values-view","status":"publish","type":"post","link":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97","title":{"rendered":"<font color='#1e73be'> Run Environment 3: The Second Run Values View<\/font>"},"content":{"rendered":"<p>Here&#8217;s what we&#8217;re doing for the next view. \u00a0We&#8217;re taking all of the run expectancy values from the previous view, making 3 more calculations that I will explain in a moment, and creating linear weights for each non-out batting event that we&#8217;ll use to derive <a href=\"https:\/\/www.fangraphs.com\/library\/offense\/woba\/\">wOBA<\/a>.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>runMinus<\/em><\/span> establishes a run value for outs and other events that are not part of OBP. \u00a0It&#8217;s AB &#8211; H + SF, and is equivalent to a batting out.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>runPlus<\/em><\/span> gives us the average run value for all non-out batting events: Hits, Hit-by-Pitches, and Walks.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>wOBA<\/em><\/span> will give us the Weighted On Base Average for the league<\/p>\n<p><span style=\"text-decoration: underline;\"><em>wobaScale<\/em> <\/span>will give us the factor to apply to all of the other linear weights and for each league year in order to scale players&#8217; wOBAs to their matching, unweighted On Base Percentage.<\/p>\n<p>Two notes before the code. \u00a0First, we&#8217;re using stats from the players_career_batting_stats table. \u00a0I wrote a join to the league_history_stats table when I was thinking of doing it another way. \u00a0I may go back and switch it out to the other table as it will save us doing the sums.<\/p>\n<p>Second, there&#8217;s got to be a more elegant way to do this. \u00a0I think there is, and it&#8217;s to do with defining runPlus, runMinus, and wobaScale as variables so that I don&#8217;t have to elaborate the code each time they are mentioned. \u00a0I know that I can&#8217;t use column aliases within the select statement. \u00a0So my options are leaving it as is (I am getting results that look reasonable), try my luck with variables, or create another table or view to store these values and call them from this view.<\/p>\n<p>I will come back to this to try to clean it up.<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"line-numbers\"><code class=\"language-sql\">CREATE OR REPLACE VIEW vRunValues2 AS\r\nSELECT \r\nr.year\r\n, r.league_id\r\n, r.RperOut \r\n, r.runBB \r\n, r.runHB \r\n, r.run1B \r\n, r.run2B \r\n, r.run3B \r\n, r.runHR \r\n, r.runSB \r\n, r.runCS \r\n, Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP + r.run1B * (b.H -b.d - b.t -b.hr)\r\n    + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR + r.runSB * b.SB - r.runCS *b.CS)\r\n    \/ Sum(b.ab -b.h + b.SF) AS runMinus \r\n, Sum(r.runBB * (b.BB - b.ibb) + r.runHB * b.HP +r.run1B * (b.H -b.d -b.t -b.hr)\r\n    + r.run2B *b.d + r.run3B * b.t + 1.4 *b.hr + r.runSB * b.SB - r.runCS * b.CS)\r\n    \/ Sum(b.BB - b.IBB + b.HP +b.H) AS runPlus \r\n\r\n, #1\/([runPlus]+[runMinus]) AS wOBAscale \r\n1\/ ((Sum(r.runBB * (b.BB - b.ibb) + r.runHB * b.HP +r.run1B * (b.H -b.d -b.t -b.hr)\r\n    + r.run2B *b.d + r.run3B * b.t + 1.4 *b.hr + r.runSB * b.SB - r.runCS * b.CS))\r\n    \/ (Sum(b.BB - b.IBB + b.HP +b.H) + Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP\r\n    + r.run1B * (b.H -b.d - b.t -b.hr) + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR\r\n    + r.runSB * b.SB - r.runCS *b.CS) \/ Sum(b.ab -b.h + b.SF))) AS wOBAscale\r\n\r\n, #([runBB]+[runMinus])*[wOBAscale] AS wobaBB \r\n(r.runBB + (Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP + r.run1B\r\n    * (b.H -b.d - b.t -b.hr) + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR + r.runSB\r\n    * b.SB - r.runCS *b.CS) \/ Sum(b.ab -b.h + b.SF))) \r\n    * (1\/ ((Sum(r.runBB * (b.BB - b.ibb) + r.runHB * b.HP +r.run1B\r\n    * (b.H -b.d -b.t -b.hr) + r.run2B *b.d + r.run3B * b.t + 1.4 *b.hr\r\n    + r.runSB * b.SB - r.runCS * b.CS)) \/ (Sum(b.BB - b.IBB + b.HP +b.H)\r\n    + Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP + r.run1B \r\n    * (b.H -b.d - b.t -b.hr) + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR \r\n    + r.runSB * b.SB - r.runCS *b.CS) \/ Sum(b.ab -b.h + b.SF)))) AS wobaBB\r\n\r\n, #([runHB]+[runMinus])*[wOBAscale] AS wobaHB \r\n(r.runHB +(Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP + r.run1B \r\n   * (b.H -b.d - b.t -b.hr) + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR \r\n   + r.runSB * b.SB - r.runCS *b.CS) \/ Sum(b.ab -b.h + b.SF))) \r\n   * (1\/ ((Sum(r.runBB * (b.BB - b.ibb) + r.runHB * b.HP +r.run1B * (b.H -b.d -b.t -b.hr) \r\n   + r.run2B *b.d + r.run3B * b.t + 1.4 *b.hr + r.runSB * b.SB - r.runCS * b.CS)) \r\n   \/ (Sum(b.BB - b.IBB + b.HP +b.H) + Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP \r\n   + r.run1B * (b.H -b.d - b.t -b.hr) + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR \r\n   + r.runSB * b.SB - r.runCS *b.CS) \/ Sum(b.ab -b.h + b.SF)))) AS wobaHB\r\n\r\n, #([run1B]+[runMinus])*[wOBAscale] AS woba1B \r\n(r.run1b + (Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP + r.run1B * (b.H -b.d - b.t -b.hr) \r\n   + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR + r.runSB * b.SB - r.runCS *b.CS) \r\n   \/ Sum(b.ab -b.h + b.SF))) * (1\/ ((Sum(r.runBB * (b.BB - b.ibb) + r.runHB * b.HP \r\n   +r.run1B * (b.H -b.d -b.t -b.hr) + r.run2B *b.d + r.run3B * b.t + 1.4 *b.hr \r\n   + r.runSB * b.SB - r.runCS * b.CS)) \/ (Sum(b.BB - b.IBB + b.HP +b.H) \r\n   + Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP + r.run1B * (b.H -b.d - b.t -b.hr) \r\n   + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR + r.runSB * b.SB - r.runCS *b.CS) \r\n   \/ Sum(b.ab -b.h + b.SF)))) AS woba1B\r\n\r\n, #([run2B]+[runMinus])*[wOBAscale] AS woba2B \r\n(r.run2b + (Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP + r.run1B * (b.H -b.d - b.t -b.hr) \r\n   + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR + r.runSB * b.SB - r.runCS *b.CS) \r\n   \/ Sum(b.ab -b.h + b.SF))) * (1\/ ((Sum(r.runBB * (b.BB - b.ibb) + r.runHB * b.HP \r\n   +r.run1B * (b.H -b.d -b.t -b.hr) + r.run2B *b.d + r.run3B * b.t + 1.4 *b.hr \r\n   + r.runSB * b.SB - r.runCS * b.CS)) \/ (Sum(b.BB - b.IBB + b.HP +b.H) \r\n   + Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP \r\n   + r.run1B * (b.H -b.d - b.t -b.hr) + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR \r\n   + r.runSB * b.SB - r.runCS *b.CS) \/ Sum(b.ab -b.h + b.SF)))) AS woba2B\r\n\r\n, #([run3B]+[runMinus])*[wOBAscale] AS woba3B \r\n(r.run3B + (Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP + r.run1B * (b.H -b.d - b.t -b.hr) \r\n   + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR + r.runSB * b.SB - r.runCS *b.CS) \r\n   \/ Sum(b.ab -b.h + b.SF))) * (1\/ ((Sum(r.runBB * (b.BB - b.ibb) + r.runHB * b.HP \r\n   +r.run1B * (b.H -b.d -b.t -b.hr) + r.run2B *b.d + r.run3B * b.t + 1.4 *b.hr \r\n   + r.runSB * b.SB - r.runCS * b.CS)) \/ (Sum(b.BB - b.IBB + b.HP +b.H) \r\n   + Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP + r.run1B * (b.H -b.d - b.t -b.hr) \r\n   + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR + r.runSB * b.SB - r.runCS *b.CS) \r\n   \/ Sum(b.ab -b.h + b.SF)))) AS woba3B\r\n\r\n, #([runHR]+[runMinus])*[wOBAscale] AS wobaHR \r\n(r.runHR + (Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP + r.run1B * (b.H -b.d - b.t -b.hr) \r\n   + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR + r.runSB * b.SB - r.runCS *b.CS) \r\n   \/ Sum(b.ab -b.h + b.SF))) * (1\/ ((Sum(r.runBB * (b.BB - b.ibb) + r.runHB * b.HP \r\n   +r.run1B * (b.H -b.d -b.t -b.hr) + r.run2B *b.d + r.run3B * b.t + 1.4 *b.hr \r\n   + r.runSB * b.SB - r.runCS * b.CS)) \/ (Sum(b.BB - b.IBB + b.HP +b.H) \r\n   + Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP + r.run1B * (b.H -b.d - b.t -b.hr) \r\n   + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR + r.runSB * b.SB - r.runCS *b.CS) \r\n   \/ Sum(b.ab -b.h + b.SF)))) AS wobaHR\r\n\r\n, #[runSB]*[wOBAscale] AS wobaSB \r\nr.runSB * (1\/ ((Sum(r.runBB * (b.BB - b.ibb) + r.runHB * b.HP +r.run1B * (b.H -b.d -b.t -b.hr) \r\n   + r.run2B *b.d + r.run3B * b.t + 1.4 *b.hr + r.runSB * b.SB - r.runCS * b.CS)) \r\n   \/ (Sum(b.BB - b.IBB + b.HP +b.H) + Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP \r\n   + r.run1B * (b.H -b.d - b.t -b.hr) + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR \r\n   + r.runSB * b.SB - r.runCS *b.CS) \/ Sum(b.ab -b.h + b.SF)))) AS wobaSB\r\n\r\n, #[runCS]*[wOBAscale] AS wobaCS\r\nr.runCS * (1\/ ((Sum(r.runBB * (b.BB - b.ibb) + r.runHB * b.HP +r.run1B * (b.H -b.d -b.t -b.hr) \r\n   + r.run2B *b.d + r.run3B * b.t + 1.4 *b.hr + r.runSB * b.SB - r.runCS * b.CS)) \r\n   \/ (Sum(b.BB - b.IBB + b.HP +b.H) + Sum(r.runBB* (b.bb - b.ibb) + r.runHB * b.HP \r\n   + r.run1B * (b.H -b.d - b.t -b.hr) + r.run2B * b.d + r.run3B * b.t + 1.4*b.HR \r\n   + r.runSB * b.SB - r.runCS *b.CS) \/ Sum(b.ab -b.h + b.SF)))) AS wobaCS\r\n\r\nFROM \r\nvRunValues r\r\nINNER JOIN players_career_batting_stats b ON r.year=b.year AND r.league_id=b.league_id\r\nINNER JOIN league_history_batting_stats lhb ON r.year=lhb.year AND r.league_id=lhb.league_id\r\n\r\nGROUP BY \r\nr.year\r\n, r.league_id\r\n, r.RperOut \r\n, r.runBB \r\n, r.runHB \r\n, r.run1B \r\n, r.run2B \r\n, r.run3B \r\n, r.runHR \r\n, r.runSB \r\n, r.runCS\r\n\r\n\r\nORDER BY \r\nr.year DESC;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s what we&#8217;re doing for the next view. \u00a0We&#8217;re taking all of the run expectancy values from the previous view, making 3 more calculations that I will explain in a moment, and creating linear weights for each non-out batting event that we&#8217;ll use to derive wOBA. runMinus establishes a run value for outs and other&hellip; <a class=\"more-link\" href=\"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97\">Continue reading <span class=\"screen-reader-text\"> Run Environment 3: The Second Run Values View<\/span> <span class=\"meta-nav\" aria-hidden=\"true\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[23],"tags":[14,17,7,4,24],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-run-environment","tag-batting","tag-leagues","tag-mysql","tag-ootp","tag-view"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"woba linear weights scale baseball statistics sabermetrics\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"cavebutter\"\/>\n\t<link rel=\"canonical\" href=\"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"MySQL MyStruggle | Rolling my own MySQL Database with OOTP\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Run Environments - wOBA Linear Weights | MySQL MyStruggle\" \/>\n\t\t<meta property=\"og:description\" content=\"woba linear weights scale baseball statistics sabermetrics\" \/>\n\t\t<meta property=\"og:url\" content=\"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2017-09-25T17:06:36+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2017-09-25T17:06:36+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Run Environments - wOBA Linear Weights | MySQL MyStruggle\" \/>\n\t\t<meta name=\"twitter:description\" content=\"woba linear weights scale baseball statistics sabermetrics\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/97#article\",\"name\":\"Run Environments - wOBA Linear Weights | MySQL MyStruggle\",\"headline\":\"Run Environment 3: The Second Run Values View\",\"author\":{\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/author\\\/cavebutter#author\"},\"publisher\":{\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/#organization\"},\"datePublished\":\"2017-09-25T10:06:36-07:00\",\"dateModified\":\"2017-09-25T10:06:36-07:00\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/97#webpage\"},\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/97#webpage\"},\"articleSection\":\"Run Environment, batting, leagues, mysql, OOTP, view\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/97#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/category\\\/run-environment#listItem\",\"name\":\"Run Environment\"}},{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/category\\\/run-environment#listItem\",\"position\":2,\"name\":\"Run Environment\",\"item\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/category\\\/run-environment\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/97#listItem\",\"name\":\"Run Environment 3: The Second Run Values View\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/97#listItem\",\"position\":3,\"name\":\"Run Environment 3: The Second Run Values View\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/category\\\/run-environment#listItem\",\"name\":\"Run Environment\"}}]},{\"@type\":\"Organization\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/#organization\",\"name\":\"MySQL MyStruggle\",\"description\":\"Rolling my own MySQL Database with OOTP\",\"url\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/author\\\/cavebutter#author\",\"url\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/author\\\/cavebutter\",\"name\":\"cavebutter\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/97#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3841893aa5a48e51f3ff3699f735196959f8b88a5ed3851eda2fed141b75cadc?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"cavebutter\"}},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/97#webpage\",\"url\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/97\",\"name\":\"Run Environments - wOBA Linear Weights | MySQL MyStruggle\",\"description\":\"woba linear weights scale baseball statistics sabermetrics\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/97#breadcrumblist\"},\"author\":{\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/author\\\/cavebutter#author\"},\"creator\":{\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/archives\\\/author\\\/cavebutter#author\"},\"datePublished\":\"2017-09-25T10:06:36-07:00\",\"dateModified\":\"2017-09-25T10:06:36-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/#website\",\"url\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/\",\"name\":\"MySQL MyStruggle\",\"description\":\"Rolling my own MySQL Database with OOTP\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"http:\\\/\\\/www.ootp.cavebutter.net\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Run Environments - wOBA Linear Weights | MySQL MyStruggle","description":"woba linear weights scale baseball statistics sabermetrics","canonical_url":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97#article","name":"Run Environments - wOBA Linear Weights | MySQL MyStruggle","headline":"Run Environment 3: The Second Run Values View","author":{"@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/author\/cavebutter#author"},"publisher":{"@id":"http:\/\/www.ootp.cavebutter.net\/blog\/#organization"},"datePublished":"2017-09-25T10:06:36-07:00","dateModified":"2017-09-25T10:06:36-07:00","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97#webpage"},"isPartOf":{"@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97#webpage"},"articleSection":"Run Environment, batting, leagues, mysql, OOTP, view"},{"@type":"BreadcrumbList","@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"http:\/\/www.ootp.cavebutter.net\/blog#listItem","position":1,"name":"Home","item":"http:\/\/www.ootp.cavebutter.net\/blog","nextItem":{"@type":"ListItem","@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/category\/run-environment#listItem","name":"Run Environment"}},{"@type":"ListItem","@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/category\/run-environment#listItem","position":2,"name":"Run Environment","item":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/category\/run-environment","nextItem":{"@type":"ListItem","@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97#listItem","name":"Run Environment 3: The Second Run Values View"},"previousItem":{"@type":"ListItem","@id":"http:\/\/www.ootp.cavebutter.net\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97#listItem","position":3,"name":"Run Environment 3: The Second Run Values View","previousItem":{"@type":"ListItem","@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/category\/run-environment#listItem","name":"Run Environment"}}]},{"@type":"Organization","@id":"http:\/\/www.ootp.cavebutter.net\/blog\/#organization","name":"MySQL MyStruggle","description":"Rolling my own MySQL Database with OOTP","url":"http:\/\/www.ootp.cavebutter.net\/blog\/"},{"@type":"Person","@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/author\/cavebutter#author","url":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/author\/cavebutter","name":"cavebutter","image":{"@type":"ImageObject","@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/3841893aa5a48e51f3ff3699f735196959f8b88a5ed3851eda2fed141b75cadc?s=96&d=mm&r=g","width":96,"height":96,"caption":"cavebutter"}},{"@type":"WebPage","@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97#webpage","url":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97","name":"Run Environments - wOBA Linear Weights | MySQL MyStruggle","description":"woba linear weights scale baseball statistics sabermetrics","inLanguage":"en-US","isPartOf":{"@id":"http:\/\/www.ootp.cavebutter.net\/blog\/#website"},"breadcrumb":{"@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97#breadcrumblist"},"author":{"@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/author\/cavebutter#author"},"creator":{"@id":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/author\/cavebutter#author"},"datePublished":"2017-09-25T10:06:36-07:00","dateModified":"2017-09-25T10:06:36-07:00"},{"@type":"WebSite","@id":"http:\/\/www.ootp.cavebutter.net\/blog\/#website","url":"http:\/\/www.ootp.cavebutter.net\/blog\/","name":"MySQL MyStruggle","description":"Rolling my own MySQL Database with OOTP","inLanguage":"en-US","publisher":{"@id":"http:\/\/www.ootp.cavebutter.net\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"MySQL MyStruggle | Rolling my own MySQL Database with OOTP","og:type":"article","og:title":"Run Environments - wOBA Linear Weights | MySQL MyStruggle","og:description":"woba linear weights scale baseball statistics sabermetrics","og:url":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97","article:published_time":"2017-09-25T17:06:36+00:00","article:modified_time":"2017-09-25T17:06:36+00:00","twitter:card":"summary","twitter:title":"Run Environments - wOBA Linear Weights | MySQL MyStruggle","twitter:description":"woba linear weights scale baseball statistics sabermetrics"},"aioseo_meta_data":{"post_id":"97","title":"Run Environments - wOBA Linear Weights | #site_title","description":"woba linear weights scale baseball statistics sabermetrics","keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-02-03 03:39:37","updated":"2025-12-10 01:12:40","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"http:\/\/www.ootp.cavebutter.net\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/category\/run-environment\" title=\"Run Environment\">Run Environment<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<font color=\"#1e73be\"> Run Environment 3: The Second Run Values View<\/font>\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"http:\/\/www.ootp.cavebutter.net\/blog"},{"label":"Run Environment","link":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/category\/run-environment"},{"label":"<font color='#1e73be'> Run Environment 3: The Second Run Values View<\/font>","link":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/97"}],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9cxb5-1z","jetpack_likes_enabled":true,"jetpack-related-posts":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":3,"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"predecessor-version":[{"id":100,"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/posts\/97\/revisions\/100"}],"wp:attachment":[{"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}