WBSC Europe Baseball and Softball Statistics Data warehouse and BI 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
@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
`
@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)
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.
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.