- 🔭 I’m currently working on WBSC Europe Baseball and Softball Sabermetrics Application
tonper19 / ballgame Goto Github PK
View Code? Open in Web Editor NEWWBSC Europe Baseball and Softball Statistics Data warehouse and BI application
License: Other
WBSC Europe Baseball and Softball Statistics Data warehouse and BI application
License: Other
When the player name contains a comma it is separated into an additional field. The surname contains the bold string, and the first name becomes two fields. When the ETL process reads the csv file, the field Team (third column) contains the part of the first name after the comma, the AB field contains a null string causing the ETL to abend.
Example: Italy Serie A 2023 batting: PAULA José-Andres, Gregorio
The process should replace commas in any string field by spaces to avoid separation into additional fields in the csv file.
@enavarrocu : The first rows on D1 2022 Belgian Federation page stats do not have a player name but a dash - This causes the scraping to fail.
`
[email protected] webBattingScrapper
node src/scrapper/urlBattingScrapper.js https://www.baseballsoftball.be/en/events/2022-baseball-d1/stats/general/all/batting ../csv/stats_batting_raw_d1_2022.csv
(node:26203) [DEP0040] DeprecationWarning: The punycode
module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ...
to show where the warning was created)
file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/interpreter/PlayerInterpreter.js:19
return playerName.match(this._surNameMatcher)[1];
^
TypeError: Cannot read properties of null (reading '1')
at BattingPlayerInterpreter.getPlayerSurName (file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/interpreter/PlayerInterpreter.js:19:48)
at extractBattingPlayerData (file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/data-extractor/BattingDataExtractor.js:8:21)
at Array.map ()
at extractBattingData (file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/data-extractor/BattingDataExtractor.js:38:29)
at file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/scrapper/urlBattingScrapper.js:10:12
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v21.7.3
[email protected] webPitchingScrapper
node src/scrapper/urlPitchingScrapper.js https://www.baseballsoftball.be/en/events/2022-baseball-d1/stats/general/all/pitching ../csv/stats_pitching_raw_d1_2022.csv
(node:26224) [DEP0040] DeprecationWarning: The punycode
module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ...
to show where the warning was created)
file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/interpreter/PlayerInterpreter.js:19
return playerName.match(this._surNameMatcher)[1];
^
TypeError: Cannot read properties of null (reading '1')
at PitchingPlayerInterpreter.getPlayerSurName (file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/interpreter/PlayerInterpreter.js:19:48)
at extractPitchingPlayerData (file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/data-extractor/PitchingDataExtractor.js:6:21)
at Array.map ()
at extractPitchingData (file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/data-extractor/PitchingDataExtractor.js:43:29)
at file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/scrapper/urlPitchingScrapper.js:10:12
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v21.7.3
[email protected] webFieldingScrapper
node src/scrapper/urlFieldingScrapper.js https://www.baseballsoftball.be/en/events/2022-baseball-d1/stats/general/all/fielding ../csv/stats_fielding_raw_d1_2022.csv
(node:26243) [DEP0040] DeprecationWarning: The punycode
module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ...
to show where the warning was created)
file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/interpreter/PlayerInterpreter.js:19
return playerName.match(this._surNameMatcher)[1];
^
TypeError: Cannot read properties of null (reading '1')
at FieldingPlayerInterpreter.getPlayerSurName (file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/interpreter/PlayerInterpreter.js:19:48)
at extractFieldingPlayerData (file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/data-extractor/FieldingDataExtractor.js:6:21)
at Array.map ()
at extractFieldingData (file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/data-extractor/FieldingDataExtractor.js:29:29)
at file:///Users/tonper/Development/DWH/ballgame/data/webscrap/src/scrapper/urlFieldingScrapper.js:10:12
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v21.7.3
`
I would like to improve the application by introducing Team Standings. Although the standings are similar on all European competitions each Federation and division has its own formats, even different in certain years. I will explain the differences as much as possible.
The scraping should collect:
In Baseball D1 the competition has three parts: Regular season, Split and Belgian Series the 2024 standings url is
D1
D1 has one table for the Regular season
D1 has two tables for the Slit
D1 has one table for the Belgian Series
D1 Softball Ladies has two parts in the season with one table each: Regular season and Belgian Series
D1 Ladies
D2 Baseball has two parts in season each with 2 tables each.
D2
D3 and D4 have only Regular season with two tables.
D3
D4
D2 Softball Ladies have only Regular season and one table
D2 Ladies
D3 Ladies has two parts: Regular season (two tables) and Split (Three tables)
D3 Ladies
The D1 Softball Men has two parts in the season Regular season and Belgian Series each one with one table only.
D1 Softball Men
The Softball Reserves league only has a Regular season with one table
Reserves
In addition to the same tables as in the current season, certain leagues have the Final Standings table
D1 2023
D2 2023
D1 Ladies 2023
D2 Ladies 2023
D3 Ladies 2023
Extra information will be added if necessary.
@enavarrocu Executing the webscraper for all three stat types produces a deprecation warning.
To reproduce:
node src/scrapper/urlBattingScrapper.js https://www.baseballsoftball.be/en/events/2024-baseball-d1/stats/general/all/batting ../csv/stats_batting_raw_d1_2024.csv
(node:26087) [DEP0040] DeprecationWarning: The punycode
module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ...
to show where the warning was created)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.