Code Monkey home page Code Monkey logo

tonper19 / ballgame Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 336.66 MB

WBSC Europe Baseball and Softball Statistics Data warehouse and BI application

License: Other

TSQL 0.12% HTML 94.70% Batchfile 0.17% Python 0.19% JavaScript 1.19% Shell 3.63%
austria baseball-analytics baseball-statistics belgium business-intelligence etl italy microstrategy netherlands oracle pentaho pentaho-data-integration spain sql european-baseball microstrategy-workstation baseball sabermetrics

ballgame's Introduction

ballgame

WBSC Europe Baseball and Softball Statistics Data warehouse and BI application

ballgame's People

Contributors

enavarrocu avatar tonper19 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

ballgame's Issues

Webscraping error on 2022 BE D1

Error webscraping 2022 data (all) for Belgium Baseball D1

@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.

`

2022

[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
`

Webscraping DeprecationWarning (low priority)

@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)

Webscraping comma in the player name

Webscraping logical error

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.