cwdaily: Player game-by-game generator¶
cwdaily produces one record for each individual player appearance in a game. Each record contains identifying information and the player’s batting, pitching, and position-specific fielding totals for that game. Team totals are not reported by cwdaily; they are available through the standard and extended fields of cwgame.
Note
The name “daily” follows the traditional baseball usage of “dailies” or “day-by-day records” for a player’s list of per-game records. It is a slight misnomer: each record represents one game rather than one calendar day, so a player can have multiple records on the date of a doubleheader or tripleheader.
cwdaily has no DiamondWare equivalent. It outputs up to 154
fields, all of which are included by default. The fields generated can
be selected with the -f command-line option. The other common
command-line options are described in the command-line options
table.
Identification fields (0-10)¶
Field number |
Description |
Header |
|---|---|---|
0 |
Game ID |
|
1 |
Game date |
|
2 |
Game number |
|
3 |
Player appearance date |
|
4 |
Team ID |
|
5 |
Player ID |
|
6 |
Batting-order slot |
|
7 |
Sequence within batting-order slot |
|
8 |
Home-team flag |
|
9 |
Opponent ID |
|
10 |
Park ID |
|
GAME_DT is derived from the game’s info,date record and is
reported in YYYYMMDD form. APPEAR_DT is intended to identify
the date on which the player entered the game. For starters, it is set
to GAME_DT.
While processing the game, Chadwick maintains a current appearance
date, initially set to GAME_DT. When it encounters a comment whose
text begins with suspended,, it replaces the current appearance
date with the value following that prefix. A substitute’s
APPEAR_DT is the current appearance date when the substitution is
processed. Thus a player who first enters after a properly coded
resumption receives the resumed date, while players already in the
game retain the dates on which they originally appeared.
This result depends on the suspension and resumption comments in the
source file. Chadwick does not infer an appearance date from schedules
or other games, and it does not validate or normalize the date taken
from a suspended, comment. If that coding is absent, misplaced, or
inconsistent, APPEAR_DT may not reflect the player’s actual
appearance date. For boxscore event files, where player statistics are
supplied in extended records rather than reconstructed from plays,
APPEAR_DT is set to GAME_DT for every player.
SLOT_CT is 1 through 9 for a player in the batting order and 0 for
a pitcher who does not occupy a batting-order slot. SEQ_CT gives
the player’s order among all players who occupied that slot.
HOME_FL is 1 for the home team and 0 for the visiting team.
Batting fields (11-35)¶
Field number |
Description |
Header |
|---|---|---|
11 |
Games played as a batter |
|
12 |
Plate appearances |
|
13 |
At bats |
|
14 |
Runs |
|
15 |
Hits |
|
16 |
Total bases |
|
17 |
Doubles |
|
18 |
Triples |
|
19 |
Home runs |
|
20 |
Grand slams |
|
21 |
Runs batted in |
|
22 |
Game-winning RBI |
|
23 |
Walks |
|
24 |
Intentional walks |
|
25 |
Strikeouts |
|
26 |
Grounded into double plays |
|
27 |
Hit by pitch |
|
28 |
Sacrifice hits |
|
29 |
Sacrifice flies |
|
30 |
Stolen bases |
|
31 |
Caught stealing |
|
32 |
Reached on interference |
|
33 |
Games as designated hitter |
|
34 |
Games as pinch hitter |
|
35 |
Games as pinch runner |
|
Pitching fields (36-70)¶
Field number |
Description |
Header |
|---|---|---|
36 |
Games pitched |
|
37 |
Games started |
|
38 |
Complete games |
|
39 |
Shutouts |
|
40 |
Games finished |
|
41 |
Wins |
|
42 |
Losses |
|
43 |
Saves |
|
44 |
Outs recorded |
|
45 |
Batters faced |
|
46 |
At bats against |
|
47 |
Runs allowed |
|
48 |
Earned runs allowed |
|
49 |
Hits allowed |
|
50 |
Total bases allowed |
|
51 |
Doubles allowed |
|
52 |
Triples allowed |
|
53 |
Home runs allowed |
|
54 |
Grand slams allowed |
|
55 |
Walks allowed |
|
56 |
Intentional walks allowed |
|
57 |
Strikeouts |
|
58 |
Grounded into double plays |
|
59 |
Hit batsmen |
|
60 |
Sacrifice hits against |
|
61 |
Sacrifice flies against |
|
62 |
Reached on interference |
|
63 |
Wild pitches |
|
64 |
Balks |
|
65 |
Inherited runners |
|
66 |
Inherited runners who scored |
|
67 |
Ground-ball outs |
|
68 |
Air outs |
|
69 |
Pitches |
|
70 |
Strikes |
|
P_OUT records outs rather than fractional innings; divide by
three to obtain innings pitched. If a pitcher has more than one
pitching stint in a game, the pitching fields combine all of those
stints.
P_PITCH and P_STRIKE are reported only when the game’s
info,pitches value is pitches. They are blank when complete
pitch data is not indicated.
Fielding fields (71-153)¶
Fielding statistics are reported separately for each defensive position. The table gives the exact field number and header in each cell. The common suffixes have these meanings:
G: games at the position;GS: games started at the position;OUT: outs recorded while at the position;TC: total chances;PO: putouts;A: assists;E: errors;DP: double plays; andTP: triple plays.
As with P_OUT, an OUT field records outs rather than
fractional innings; divide by three to obtain innings fielded.
Position |
G |
GS |
OUT |
TC |
PO |
A |
E |
DP |
TP |
|---|---|---|---|---|---|---|---|---|---|
Pitcher |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
Catcher |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
First base |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
Second base |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
Third base |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
Shortstop |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
Left field |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
Center field |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
Right field |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
The catcher has two additional fields:
Field number |
Description |
Header |
|---|---|---|
89 |
Passed balls |
|
90 |
Catcher’s interference |
|
TC is calculated as putouts plus assists plus errors. It is blank
if any of those three component statistics is unavailable.
Missing and inapplicable statistics¶
An unavailable statistic, whether because it is not reported or not able to be computed from the data, is emitted as a blank field. A statistic which is computable from the data, or which does not apply because the player did not appear in that role or position, is reported as zero. In particular, Retrosheet boxscore files use “-1” to indicate null values; these are correctly rendered as null (blank) values.
