Code Monkey home page Code Monkey logo

ballgame's Issues

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.

Team standings

Web scraping for Team Standings for each league current and past

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:

  • Team position (#)
  • Team logo url
  • Team acronym (ID) for example HOB
  • Team name
  • Wins (W)
  • Losses (L)
  • Ties (T)
  • Win percentage (PCT)
  • Games behind (GB)
  • Season ID, for example Regular season (RS), Split (SPL), Belgian Series (BS)
  • Table ID, a season ID may have more than one table, for example Belgium D1 Split, has two: BD1 Top 4 (BD1TOP4) and BD1 Bot 4 (BD1BOT4)
  • If possible the division logo url:
image

BELGIUM

Current season

2024

Baseball D1

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

Softball Ladies D1

D1 Softball Ladies has two parts in the season with one table each: Regular season and Belgian Series
D1 Ladies

Baseball D2

D2 Baseball has two parts in season each with 2 tables each.
D2

Baseball D3 and D4

D3 and D4 have only Regular season with two tables.
D3
D4

Softball Ladies D2

D2 Softball Ladies have only Regular season and one table
D2 Ladies

Softball Ladies D3

D3 Ladies has two parts: Regular season (two tables) and Split (Three tables)
D3 Ladies

Softball Men D1

The D1 Softball Men has two parts in the season Regular season and Belgian Series each one with one table only.
D1 Softball Men

Softball Reserves

The Softball Reserves league only has a Regular season with one table
Reserves

Previous seasons

2023

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.

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
`

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.