Skip to content

Instantly share code, notes, and snippets.

@theracingapi
Last active February 17, 2023 14:36
Show Gist options
  • Save theracingapi/cdad8949a12fd54571bae55d3efce884 to your computer and use it in GitHub Desktop.
Save theracingapi/cdad8949a12fd54571bae55d3efce884 to your computer and use it in GitHub Desktop.
Racecard built with HTML, CSS and jQuery using example racecard data (Basic Plan)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<style>
html, body {
margin: 0;
padding:0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial;
}
#root {
height: 100%;
margin: 0;
padding:0;
}
#container {
display: flex;
flex-direction: column;
height:100%;
padding: 30px;
font-size: 14px;
font-weight: 300;
max-width: 800px;
margin: 0 auto;
}
#race {
display: flex;
flex: 1;
flex-direction: column;
border: 1px solid #dadada;
padding: 30px;
border-radius: 30px;
}
#race_header {
display: flex;
line-height: 1;
margin: 20px 0;
}
#race_header_left,
#race_header_right {
display: flex;
flex-direction: column;
justify-content: flex-end;
margin-right: 30px;
}
#race_event {
margin: 2px 0;
line-height: 1;
}
#race_name {
margin: 2px 0;
line-height: 1;
font-weight: 500;
}
#race_details_1,
#race_details_2 {
margin: 2px 0;
line-height: 1.2;
font-weight: 500;
}
.race_runner {
display: flex;
padding: 20px 0;
}
.race_runner_number_draw {
margin-right: 20px;
width:16px;
}
.race_runner_number {
font-weight: 500;
font-size: 16px;
}
.race_runner_silk_container {
margin-right: 20px;
}
.race_runner_silk {
width: 60px;
}
.race_runner_name_breeding_form {
width: 205px;
margin-right: 20px;
}
.race_runner_name {
margin: 0;
}
.race_runner_breeding {
font-size: 12px;
}
.race_runner_form {
font-size: 12px;
}
.race_runner_weight_headgear {
font-size: 12px;
line-height: 1.5;
margin-right: 40px;
width: 55px;
}
.race_runner_ofr_ts {
font-size: 12px;
line-height: 1.5;
margin-right: 60px;
}
.race_runner_jockey_trainer {
font-size: 12px;
line-height: 1.5;
font-weight: 400;
}
</style>
</head>
<body>
<div id="container">
<div id="main">
<div id="main_inner">
<div id="race">
<div id="race_header">
<div id="race_header_right">
<h1 id="race_event"></h1>
<h3 id="race_name"></h3>
</div>
<div id="race_header_left">
<h5 id="race_details_1"></h5>
<h5 id="race_details_2"></h5>
</div>
</div>
<div id="race_runners">
<div id="race_runners_header"></div>
<div id="race_runners_inner">
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js" integrity="sha512-STof4xm1wgkfm7heWqFJVn58Hm3EtS31XFaagaa8VMReCXAkQnJZ+jEy8PCC/iT18dFy95WcExNHFTqLyp72eQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="text/javascript" src="racecard_data.js"></script>
<script type="text/javascript">
function lbsToStone(lbs) {
lbs_int = parseInt(lbs)
stone = Math.floor(lbs_int / 14);
remainder = lbs_int % 14;
return String(stone) + '-' + String(remainder);
}
function buildRunnerRow(runner) {
var runner_row = $('<div>', {id: 'runner_' + runner.horse_id, class: 'race_runner'});
var runner_number_draw = $('<div>', {class: 'race_runner_number_draw'});
var runner_number = $('<div>', {class: 'race_runner_number'}).text(runner.number);
var runner_draw = $('<div>', {class: 'race_runner_draw'}).text('(' + runner.draw + ')');
runner_number_draw.append(runner_number);
runner_number_draw.append(runner_draw);
var runner_silk_container = $('<div>', {class: 'race_runner_silk_container'});
var runner_silk = $('<img>', {src: runner.silk_url, class: 'race_runner_silk'});
runner_silk_container.append(runner_silk);
var runner_name_breeding_form = $('<div>', {class: 'race_runner_name_breeding_form'});
var runner_name = $('<h4>', {class: 'race_runner_name'}).text(runner.horse);
var runner_breeding = $('<div>', {class: 'race_runner_breeding'}).text(runner.sire + ' (' + runner.sire_region + ') | ' + runner.dam + ' (' + runner.dam_region + ')');
var runner_form = $('<div>', {class: 'race_runner_form'}).text('Form: ' + runner.form);
runner_name_breeding_form.append(runner_name);
runner_name_breeding_form.append(runner_breeding);
runner_name_breeding_form.append(runner_form);
var runner_weight_headgear = $('<div>', {class: 'race_runner_weight_headgear'});
var runner_weight = $('<div>', {class: 'race_runner_name'}).text('wgt: ' + lbsToStone(runner.lbs));
var runner_headgear = $('<div>', {class: 'race_runner_headgear'}).text('hg: ' + runner.headgear);
runner_weight_headgear.append(runner_weight);
runner_weight_headgear.append(runner_headgear);
var runner_ofr_ts = $('<div>', {class: 'race_runner_ofr_ts'});
var runner_ofr = $('<div>', {class: 'race_runner_ofr'}).text('ofr: ' + runner.ofr);
var runner_ts = $('<div>', {class: 'race_runner_ts'}).text('ts: ' + runner.ts);
runner_ofr_ts.append(runner_ofr);
runner_ofr_ts.append(runner_ts);
var runner_jockey_trainer = $('<div>', {class: 'race_runner_jockey_trainer'});
var runner_jockey = $('<div>', {class: 'race_runner_jockey'}).text('J: ' + runner.jockey);
var runner_trainer = $('<div>', {class: 'race_runner_trainer'}).text('T: ' + runner.trainer);
runner_jockey_trainer.append(runner_jockey);
runner_jockey_trainer.append(runner_trainer);
runner_row.append(runner_number_draw);
runner_row.append(runner_silk_container);
runner_row.append(runner_name_breeding_form);
runner_row.append(runner_weight_headgear);
runner_row.append(runner_ofr_ts);
runner_row.append(runner_jockey_trainer);
return runner_row;
}
function buildRacecard(racecard) {
// Populate race header
$('#race_event').text(racecard.off_time + ' ' + racecard.course);
$('#race_name').text(racecard.race_name);
$('#race_details_1').text(racecard.region + ' | ' + racecard.race_class + ' | ' + racecard.age_band + ' | ' + racecard.rating_band);
$('#race_details_2').text('Prize ' + racecard.prize + ' - ' + racecard.field_size + ' run');
// Build runner rows
$(racecard.runners).each(function(i,v) {
var runner_row = buildRunnerRow(v);
$('#race_runners_inner').append(runner_row);
})
}
$( document ).ready(function() {
buildRacecard(data);
});
</script>
</body>
</html>
data = {
"course": "Chelmsford (AW)",
"course_id": "crs_28158",
"date": "2023-02-16",
"off_time": "6:00",
"race_name": "Winning Connections Networking Handicap",
"distance_round": "6f",
"distance": "6f",
"distance_f": "6.0",
"region": "GB",
"pattern": "",
"race_class": "Class 5",
"type": "Flat",
"age_band": "4yo+",
"rating_band": "0-75",
"prize": "£5,051",
"field_size": "10",
"going_detailed": "",
"rail_movements": "",
"stalls": "",
"weather": "",
"going": "Standard",
"surface": "AW",
"runners": [
{
"horse_id": "hrs_18581997",
"horse": "Magical Max",
"dob": "2017-04-19",
"age": "6",
"sex": "gelding",
"sex_code": "G",
"colour": "gr",
"region": "GB",
"breeder": "Poole, Trickledown & The Late Mrs Poole",
"dam": "Vellena",
"dam_id": "dam_5695795",
"dam_region": "GB",
"sire": "Coach House",
"sire_id": "sir_5827822",
"sire_region": "IRE",
"damsire": "Lucky Story",
"damsire_id": "dsi_4067126",
"damsire_region": "USA",
"trainer": "Ivan Furtado",
"trainer_id": "trn_277803",
"trainer_location": "Averham Park, Notts",
"trainer_14_days": {
"runs": "9",
"wins": "1",
"percent": "11"
},
"owner": "The Follow The Majer Partnership",
"owner_id": "own_1304872",
"prev_trainers": [
{
"trainer": "Mark Walford",
"trainer_id": "trn_259884",
"change_date": "2022-12-30"
}
],
"prev_owners": [
{
"owner": "Mrs E Holmes, M Johnson & Mrs Walford",
"owner_id": "own_1110064",
"change_date": "2022-12-30"
},
{
"owner": "Mrs G B Walford",
"owner_id": "own_40636",
"change_date": "2019-06-10"
}
],
"comment": "Turned things around with good second over C&D on his stable debut last month; respected",
"spotlight": "Both wins came in his two juvenile runs in 2019; hasn't seen much action in recent years but he made a good start for this yard when runner-up off a reduced mark over C&D (first-time tongue-tie) last month; that was a bold bid from the front and he's a big player if he can build on that with cheekpieces added.",
"quotes": [
{
"date": "2019-06-15",
"race": "Reg Griffin Appreciation EBFstallions.com Maiden Stakes (Plus 10 Race)",
"course": "York",
"course_id": "crs_2782",
"distance_f": "6",
"distance_y": "1320",
"quote": "We've liked Magical Max at home. We didn't bring him here expecting to win and it was a really nice performance. He wasn't tuned up for today and it's all about the future. We put him in the Tattersalls race at Newmarket in October as he'd get no weight for that as a six grand yearling and that's the race we have in mind - Mark Walford, trainer."
}
],
"stable_tour": [],
"medical": [],
"number": "1",
"draw": "8",
"headgear": "tp",
"headgear_first": "1",
"lbs": "135",
"ofr": "75",
"rpr": "90",
"ts": "74",
"jockey": "Kieran O'Neill",
"jockey_id": "jky_250764",
"silk_url": "https://www.rp-assets.com/svg/8/1/2/326218.svg",
"last_run": "42",
"form": "3000-2",
"trainer_rtf": "22"
},
{
"horse_id": "hrs_25924325",
"horse": "Bang On The Bell",
"dob": "2019-04-28",
"age": "4",
"sex": "gelding",
"sex_code": "G",
"colour": "b",
"region": "GB",
"breeder": "Michael Turner",
"dam": "Bella Beguine",
"dam_id": "dam_3810555",
"dam_region": "GB",
"sire": "Heeraat",
"sire_id": "sir_5528656",
"sire_region": "IRE",
"damsire": "Komaite",
"damsire_id": "dsi_2133621",
"damsire_region": "USA",
"trainer": "J R Jenkins",
"trainer_id": "trn_315",
"trainer_location": "Royston, Herts",
"trainer_14_days": {
"runs": "2",
"wins": "0",
"percent": "0"
},
"owner": "M K P Turner",
"owner_id": "own_743860",
"prev_trainers": [],
"prev_owners": [],
"comment": "Wasn't at his best at Southwell latest but he's not ruled out on this drop back in grade",
"spotlight": "Three wins at Wolverhampton (5f/6f) in 2022 and he still looks feasibly treated on his best efforts last year; his form dipped at Southwell in December but that was in a Class 4 and he's not ruled out on this drop back in grade; usually leads but he can miss the break at times.",
"quotes": [],
"stable_tour": [],
"medical": [],
"number": "2",
"draw": "9",
"headgear": "",
"headgear_first": "",
"lbs": "134",
"ofr": "74",
"rpr": "88",
"ts": "78",
"jockey": "Clifford Lee",
"jockey_id": "jky_280440",
"silk_url": "https://www.rp-assets.com/svg/5/6/9/185965.svg",
"last_run": "62",
"form": "32038-",
"trainer_rtf": ""
},
{
"horse_id": "hrs_7313033",
"horse": "Muscika",
"dob": "2014-04-13",
"age": "9",
"sex": "gelding",
"sex_code": "G",
"colour": "b",
"region": "GB",
"breeder": "Dukes Stud & Overbury Stallions Ltd",
"dam": "Miss Villefranche",
"dam_id": "dam_5351955",
"dam_region": "GB",
"sire": "Kyllachy",
"sire_id": "sir_3691611",
"sire_region": "GB",
"damsire": "Danehill Dancer",
"damsire_id": "dsi_728077",
"damsire_region": "IRE",
"trainer": "David Omeara",
"trainer_id": "trn_205551",
"trainer_location": "Upper Helmsley, N Yorks",
"trainer_14_days": {
"runs": "18",
"wins": "2",
"percent": "11"
},
"owner": "Gallop Racing I",
"owner_id": "own_958580",
"prev_trainers": [
{
"trainer": "Richard Hannon",
"trainer_id": "trn_259083",
"change_date": "2017-04-24"
}
],
"prev_owners": [
{
"owner": "Gallop Racing",
"owner_id": "own_940648",
"change_date": "2022-10-10"
},
{
"owner": "Gallop Racing & Dynast Racing",
"owner_id": "own_999864",
"change_date": "2020-09-08"
},
{
"owner": "Hamdan Al Maktoum",
"owner_id": "own_7436",
"change_date": "2017-04-24"
}
],
"comment": "13-time winner who escapes a penalty for his success at Wolverhampton last week; respected",
"spotlight": "9yo who recorded his 13th win when making all in apprentice handicap at Wolverhampton (6f, Tapeta) last Wednesday; that was in a tight finish but he escapes a penalty for that brave win (due to be 2lb higher in future) and is respected back on Polytrack.",
"quotes": [
{
"date": "2020-07-26",
"race": "Sky Bet Extended Dash Handicap",
"course": "York",
"course_id": "crs_2782",
"distance_f": "6",
"distance_y": "1320",
"quote": "We've always thought there was a good race in Muscika and he's proved it today. We might look at going back for the Great St Wilfrid after he finished fourth in it last year - Richard Walker, racing manager for owners Gallop Racing."
},
{
"date": "2019-05-18",
"race": "JW 4x4 Northallerton Handicap",
"course": "Thirsk",
"course_id": "crs_2080",
"distance_f": "6",
"distance_y": "1320",
"quote": "Muscika was dropped in last time and went a bit sour with it, so the boss said ride him handy. He travelled through the race great and quickened up before idling a bit when in front. He's a fine horse and hopefully there's more to come - Cam Hardie, jockey"
},
{
"date": "2017-04-30",
"race": "Visit The Start Today Maiden Auction Stakes",
"course": "Thirsk",
"course_id": "crs_2080",
"distance_f": "6",
"distance_y": "1320",
"quote": "Muscika is a nice big horse, but he is still a bit raw and green. He ran on well in the closing stages when the penny dropped. He may stay further but he could get quicker with racing - David O'Meara, trainer."
}
],
"stable_tour": [
{
"quote": "Won two nice races at York last year and seems to like the place. He's had some good runs this season and probably paid the price late on for going too fast at Ripon last time. He'll be kept going in the nice sprint handicaps, including at York. 10-05-21"
}
],
"medical": [
{
"date": "2018-02-06",
"type": "Wind Surgery"
}
],
"number": "3",
"draw": "4",
"headgear": "v",
"headgear_first": "",
"lbs": "134",
"ofr": "74",
"rpr": "92",
"ts": "74",
"jockey": "Jason Watson",
"jockey_id": "jky_288666",
"silk_url": "https://www.rp-assets.com/svg/5/4/6/239645.svg",
"last_run": "9",
"form": "34-601",
"trainer_rtf": "79"
},
{
"horse_id": "hrs_7344918",
"horse": "El Hombre",
"dob": "2014-04-25",
"age": "9",
"sex": "gelding",
"sex_code": "G",
"colour": "ch",
"region": "GB",
"breeder": "Mrs J McMahon",
"dam": "Nigella",
"dam_id": "dam_2148713",
"dam_region": "GB",
"sire": "Camacho",
"sire_id": "sir_4216086",
"sire_region": "GB",
"damsire": "Band On The Run",
"damsire_id": "dsi_370027",
"damsire_region": "GB",
"trainer": "Mark Loughnane",
"trainer_id": "trn_138861",
"trainer_location": "Rock, Worcs",
"trainer_14_days": {
"runs": "16",
"wins": "2",
"percent": "13"
},
"owner": "Over The Moon Racing",
"owner_id": "own_635544",
"prev_trainers": [
{
"trainer": "Keith Dalgleish",
"trainer_id": "trn_220932",
"change_date": "2020-07-20"
}
],
"prev_owners": [
{
"owner": "Weldspec Glasgow Limited",
"owner_id": "own_492812",
"change_date": "2020-07-20"
}
],
"comment": "Two wins since October but his form cooled last time; needs to step up again after that",
"spotlight": "Has won twice since October including over C&D last month but his form cooled at Wolverhampton last time; that was from a tough draw but he needs to step up again after that and this is competitive.",
"quotes": [
{
"date": "2020-03-07",
"race": "Heed Your Hunch At Betway Handicap",
"course": "Wolverhampton (AW)",
"course_id": "crs_13338",
"distance_f": "6",
"distance_y": "1340",
"quote": "El Hombre had been a bit unlucky before now and that was a good performance as he had a bad draw - Joe Fanning, jockey."
},
{
"date": "2017-09-01",
"race": "Theakston Lightfoot Handicap",
"course": "Thirsk",
"course_id": "crs_2080",
"distance_f": "6",
"distance_y": "1320",
"quote": "El Hombre is doing well, he has only once finished out of the first four, but the key to him is the ground as he is a different horse on fast ground - Rowan Scott, jockey."
},
{
"date": "2017-05-26",
"race": "Racing UK In HD Handicap",
"course": "Haydock",
"course_id": "crs_598",
"distance_f": "6",
"distance_y": "1320",
"quote": "El Hombre has a great attitude and lots of natural speed. He won over a stiff six last time and should probably get seven but this trip seems to suit him - Rowan Scott, jockey."
}
],
"stable_tour": [],
"medical": [],
"number": "4",
"draw": "1",
"headgear": "",
"headgear_first": "",
"lbs": "130",
"ofr": "70",
"rpr": "86",
"ts": "78",
"jockey": "Joanna Mason",
"jockey_id": "jky_257346",
"silk_url": "https://www.rp-assets.com/svg/6/8/8/158886.svg",
"last_run": "26",
"form": "35-126",
"trainer_rtf": "59"
},
{
"horse_id": "hrs_18310943",
"horse": "Bezzas Lad",
"dob": "2017-03-01",
"age": "6",
"sex": "gelding",
"sex_code": "G",
"colour": "b",
"region": "IRE",
"breeder": "Tally-Ho Stud",
"dam": "Red Rosanna",
"dam_id": "dam_4971428",
"dam_region": "GB",
"sire": "Society Rock",
"sire_id": "sir_5171712",
"sire_region": "IRE",
"damsire": "Bertolini",
"damsire_id": "dsi_3420004",
"damsire_region": "USA",
"trainer": "Tony Carroll",
"trainer_id": "trn_87426",
"trainer_location": "Cropthorne, Worcs",
"trainer_14_days": {
"runs": "50",
"wins": "6",
"percent": "12"
},
"owner": "Khdrp",
"owner_id": "own_900328",
"prev_trainers": [
{
"trainer": "Michael Appleby",
"trainer_id": "trn_93267",
"change_date": "2021-06-18"
},
{
"trainer": "Tony Carroll",
"trainer_id": "trn_87426",
"change_date": "2021-04-21"
},
{
"trainer": "Phillip Makin",
"trainer_id": "trn_322119",
"change_date": "2020-01-02"
}
],
"prev_owners": [
{
"owner": "Peter Sumner",
"owner_id": "own_1178096",
"change_date": "2021-11-19"
},
{
"owner": "Peter Sumner & Noel Berrisford",
"owner_id": "own_1141592",
"change_date": "2020-07-31"
},
{
"owner": "Noel Berrisford",
"owner_id": "own_1141520",
"change_date": "2020-01-03"
},
{
"owner": "Show Me The Money Uk Ltd",
"owner_id": "own_1099788",
"change_date": "2020-01-02"
}
],
"comment": "Win and close second at Lingfield last twice and he should be in the thick of things again",
"spotlight": "Made all at Lingfield (6f, Polytrack) last month and he made another bold bid when runner-up there 12 days ago; climbing back up the weights and there are plenty of other pacesetters in this line-up but he should be in the thick of things again.",
"quotes": [],
"stable_tour": [],
"medical": [],
"number": "5",
"draw": "7",
"headgear": "",
"headgear_first": "",
"lbs": "129",
"ofr": "69",
"rpr": "88",
"ts": "80",
"jockey": "Alistair Rawlinson",
"jockey_id": "jky_279633",
"silk_url": "https://www.rp-assets.com/svg/2/8/0/225082.svg",
"last_run": "12",
"form": "08-212",
"trainer_rtf": "55"
},
{
"horse_id": "hrs_24372712",
"horse": "Thismydream",
"dob": "2019-03-30",
"age": "4",
"sex": "gelding",
"sex_code": "G",
"colour": "b",
"region": "IRE",
"breeder": "Ringfort Stud Ltd",
"dam": "Ponty Royale",
"dam_id": "dam_6169800",
"dam_region": "IRE",
"sire": "Camacho",
"sire_id": "sir_4216086",
"sire_region": "GB",
"damsire": "Royal Applause",
"damsire_id": "dsi_723912",
"damsire_region": "GB",
"trainer": "Michael Attwater",
"trainer_id": "trn_147654",
"trainer_location": "Epsom, Surrey",
"trainer_14_days": {
"runs": "11",
"wins": "0",
"percent": "0"
},
"owner": "Dare To Dream Racing",
"owner_id": "own_1002948",
"prev_trainers": [
{
"trainer": "W P Browne",
"trainer_id": "trn_51561",
"change_date": "2022-05-18"
}
],
"prev_owners": [
{
"owner": "Leidiana Marques",
"owner_id": "own_1210344",
"change_date": "2022-05-18"
}
],
"comment": "Won a Southwell novice latest but this is tougher back in a competitive handicap",
"spotlight": "Off the mark at the 23rd attempt when making all at Southwell (5f) last month but that was in a small-field novice and this is tougher off his revised mark back in a handicap; has some work to do back up in trip in a race littered with confirmed front-runners.",
"quotes": [],
"stable_tour": [],
"medical": [
{
"date": "2022-10-14",
"type": "Wind Surgery"
}
],
"number": "6",
"draw": "5",
"headgear": "p",
"headgear_first": "",
"lbs": "128",
"ofr": "68",
"rpr": "88",
"ts": "77",
"jockey": "Taylor Fisher(5)",
"jockey_id": "jky_305277",
"silk_url": "https://www.rp-assets.com/svg/7/3/7/250737.svg",
"last_run": "24",
"form": "344-21",
"trainer_rtf": "36"
},
{
"horse_id": "hrs_24665130",
"horse": "Jupiter Express",
"dob": "2019-02-17",
"age": "4",
"sex": "gelding",
"sex_code": "G",
"colour": "b",
"region": "IRE",
"breeder": "Gerry Flannery Developments Ltd",
"dam": "Spinola",
"dam_id": "dam_3952193",
"dam_region": "FR",
"sire": "Kodiac",
"sire_id": "sir_4080139",
"sire_region": "GB",
"damsire": "Spinning World",
"damsire_id": "dsi_759374",
"damsire_region": "USA",
"trainer": "Michael Appleby",
"trainer_id": "trn_93267",
"trainer_location": "Oakham, Rutland",
"trainer_14_days": {
"runs": "47",
"wins": "9",
"percent": "19"
},
"owner": "The Horse Watchers",
"owner_id": "own_915704",
"prev_trainers": [
{
"trainer": "K J Condon",
"trainer_id": "trn_137160",
"change_date": "2022-12-07"
},
{
"trainer": "J P Murtagh",
"trainer_id": "trn_253620",
"change_date": "2022-03-31"
}
],
"prev_owners": [
{
"owner": "Darragh McDonagh",
"owner_id": "own_738356",
"change_date": "2022-12-07"
}
],
"comment": "Won at Wolverhampton last month and was close second there (6f) last time; key player",
"spotlight": "Ex-Irish gelding who has had only five runs for Mick Appleby and he won at Wolverhampton (7f) last month and was a close second over 6f there last time; remains well treated on his best form last year and he seems tactically versatile; interesting contender.",
"quotes": [],
"stable_tour": [],
"medical": [],
"number": "7",
"draw": "2",
"headgear": "t",
"headgear_first": "",
"lbs": "124",
"ofr": "64",
"rpr": "87",
"ts": "77",
"jockey": "Oisin Murphy",
"jockey_id": "jky_278184",
"silk_url": "https://www.rp-assets.com/svg/c/6/2/228926c.svg",
"last_run": "29",
"form": "8-3172",
"trainer_rtf": "66"
},
{
"horse_id": "hrs_22731555",
"horse": "Desert Boots",
"dob": "2018-02-25",
"age": "5",
"sex": "gelding",
"sex_code": "G",
"colour": "b",
"region": "GB",
"breeder": "Godolphin",
"dam": "City Chic",
"dam_id": "dam_6260016",
"dam_region": "USA",
"sire": "Belardo",
"sire_id": "sir_6017543",
"sire_region": "IRE",
"damsire": "Street Cry",
"damsire_id": "dsi_3763522",
"damsire_region": "IRE",
"trainer": "Simon Pearce",
"trainer_id": "trn_330147",
"trainer_location": "Newmarket, Suffolk",
"trainer_14_days": {
"runs": "6",
"wins": "1",
"percent": "17"
},
"owner": "Deerfield Syndicate",
"owner_id": "own_1120536",
"prev_trainers": [
{
"trainer": "Mark Johnston",
"trainer_id": "trn_30402",
"change_date": "2021-02-18"
}
],
"prev_owners": [
{
"owner": "Killarney Glen",
"owner_id": "own_480524",
"change_date": "2022-10-20"
},
{
"owner": "Sheikh Hamdan bin Mohammed Al Maktoum",
"owner_id": "own_237888",
"change_date": "2021-02-18"
}
],
"comment": "On reduced mark but last win was two years ago and he was laboured at Southwell last week",
"spotlight": "On dangerous mark but he's an inconsistent type who has not won since February 2021 and was laboured at Southwell (7f) last week; others preferred.",
"quotes": [],
"stable_tour": [],
"medical": [],
"number": "8",
"draw": "10",
"headgear": "b",
"headgear_first": "",
"lbs": "123",
"ofr": "63",
"rpr": "87",
"ts": "81",
"jockey": "Rose Dawes(7)",
"jockey_id": "jky_301152",
"silk_url": "https://www.rp-assets.com/svg/4/3/1/280134.svg",
"last_run": "6",
"form": "469-36",
"trainer_rtf": "33"
},
{
"horse_id": "hrs_29435266",
"horse": "Mustaffiz",
"dob": "2019-04-10",
"age": "4",
"sex": "gelding",
"sex_code": "G",
"colour": "b",
"region": "GB",
"breeder": "Shadwell Estate Company Limited",
"dam": "Mulkeyya",
"dam_id": "dam_6038809",
"dam_region": "IRE",
"sire": "Oasis Dream",
"sire_id": "sir_3960579",
"sire_region": "GB",
"damsire": "Mawatheeq",
"damsire_id": "dsi_4863383",
"damsire_region": "USA",
"trainer": "Charlie Wallis",
"trainer_id": "trn_271602",
"trainer_location": "Ardleigh, Essex",
"trainer_14_days": {
"runs": "11",
"wins": "0",
"percent": "0"
},
"owner": "Mrs Hayley Wallis",
"owner_id": "own_1079824",
"prev_trainers": [
{
"trainer": "E J O'Neill",
"trainer_id": "trn_123354",
"change_date": "2022-11-02"
},
{
"trainer": "M A Cahill",
"trainer_id": "trn_182250",
"change_date": "2022-04-25"
}
],
"prev_owners": [
{
"owner": "J M Bradley",
"owner_id": "own_19308",
"change_date": "2023-01-27"
},
{
"owner": "J Davis & Mrs M O'Neill",
"owner_id": "own_1009132",
"change_date": "2022-11-02"
},
{
"owner": "Mrs Melissa O'Neill",
"owner_id": "own_1078440",
"change_date": "2022-04-25"
}
],
"comment": "5f winner in France but he's finished down the field in six runs for current yard",
"spotlight": "5f winner on turf in France last May but he's finished down the field in six AW runs for current yard; didn't seem to get home when upped to 7f here last time but he still has quite a lot to prove back in trip.",
"quotes": [],
"stable_tour": [],
"medical": [],
"number": "9",
"draw": "3",
"headgear": "",
"headgear_first": "",
"lbs": "122",
"ofr": "62",
"rpr": "87",
"ts": "78",
"jockey": "Mollie Phillips(3)",
"jockey_id": "jky_297951",
"silk_url": "https://www.rp-assets.com/svg/6/5/9/269956.svg",
"last_run": "14",
"form": "990-06",
"trainer_rtf": "36"
},
{
"horse_id": "hrs_15245832",
"horse": "Autumn Flight",
"dob": "2016-03-29",
"age": "7",
"sex": "gelding",
"sex_code": "G",
"colour": "b",
"region": "IRE",
"breeder": "Troy Cullen",
"dam": "Swallow Falls",
"dam_id": "dam_4213678",
"dam_region": "IRE",
"sire": "Dandy Man",
"sire_id": "sir_4459483",
"sire_region": "IRE",
"damsire": "Lake Coniston",
"damsire_id": "dsi_585060",
"damsire_region": "IRE",
"trainer": "Phil Mcentee",
"trainer_id": "trn_116136",
"trainer_location": "Newmarket, Suffolk",
"trainer_14_days": {
"runs": "26",
"wins": "2",
"percent": "8"
},
"owner": "Miss Robin Blaze Mcentee",
"owner_id": "own_886604",
"prev_trainers": [
{
"trainer": "Robert Cowell",
"trainer_id": "trn_108513",
"change_date": "2023-01-27"
},
{
"trainer": "Tim Easterby",
"trainer_id": "trn_91368",
"change_date": "2021-03-24"
}
],
"prev_owners": [
{
"owner": "Mrs Morley, R Penney & A Rix",
"owner_id": "own_1048712",
"change_date": "2023-01-27"
},
{
"owner": "Ambrose Turnbull & Partner",
"owner_id": "own_1011696",
"change_date": "2021-03-24"
},
{
"owner": "Habton Farms",
"owner_id": "own_590968",
"change_date": "2018-08-23"
}
],
"comment": "Doesn't look the force of old but he's 26lb below last winning mark and can't be dismissed",
"spotlight": "Not disgraced in three sprint races on Tapeta for new stable, latest at Wolverhampton on Monday; doesn't look the force of old but he's 26lb below last winning mark and can't be dismissed.",
"quotes": [
{
"date": "2018-09-13",
"race": "Allied Irish Bank Novice Stakes (Plus 10 Race)",
"course": "Hamilton",
"course_id": "crs_572",
"distance_f": "5",
"distance_y": "1107",
"quote": "Autumn Flight had been green from the gates first time and Catterick's not a place you can get away with that. He travelled nicely and is very well balanced. He has a great temperament - David Allan, jockey."
}
],
"stable_tour": [],
"medical": [],
"number": "10",
"draw": "6",
"headgear": "h",
"headgear_first": "",
"lbs": "117",
"ofr": "57",
"rpr": "86",
"ts": "80",
"jockey": "Josephine Gordon",
"jockey_id": "jky_278403",
"silk_url": "https://www.rp-assets.com/svg/1/5/6/221651.svg",
"last_run": "3",
"form": "-57455",
"trainer_rtf": "58"
}
]
}
@theracingapi
Copy link
Author

Generates the following racecard:

Screenshot 2023-02-17 at 14 02 45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment