Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
/ onscoutline Public archive

Web app for integration data and publication statistics about football players in Czech Republic.

Notifications You must be signed in to change notification settings

dmitrijt9/onscoutline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Onscoutline

Web app for integration data and publication statistics about football players playing in Czech Republic.

Web app was made as a practival part of a diploma thesis at DIKE at Prague University of Economics and Business.

Web App includes:

  • FACR data extraction
  • Extracted data processing (clean, transform, structure)
  • Data save
  • GraphQL API to publish processed data

Links

DEV

Development of the app is in Docker environment. It is better (because of IDE) to develop each service in a separate workspace.

Prerequisities

  • Docker
  • Yarn3
  • Create your .env.local file by copying .env file

Start app

# Go to API service
cd services/api

# Run docker container
bin/start

# [In container] run the app with file watcher
yarn start:dev

Data extraction

For data extraction there are multiple scripts that scrape FACR websites to get competitions, clubs, players and matches.

Each script in package.json starts witch prefix scraper:.

In case of clubs and matches it is needed to install chromium to the API container first.

# [In container] install chromium
yarn chrome:install

GraphQL queries examples

Query Player
query Player($playerId: ID!) {
  player(id: $playerId) {
    id
    playerInfo {
      positions
      transferRecords {
        clubFrom
        clubTo
        when
        event
      }
    }
    stats {
      hattricks
    }
  }
}

// variables example
{
  "playerId": "1005"
}
Query Players
query Players($query: String!) {
  players(query: $query) {
    id
    personInfo {
      gender
    }
    playerInfo {
      shirt
    }
    parentClub {
      name
    }
    loanClub {
      name
    }
    stats {
      goalsPerGameRatio
    }
  }
}

// variables example
{
  "query": "Eliška"
}
Query PlayerStats
query PlayerStats($playerId: ID!, $stat: PlayerStat!) {
  playerStats(playerId: $playerId, stat: $stat) {
    season
    value
  }
}

// variables example
{
  "playerId": "1186",
  "stat": "GoalsPerGameRatio"
}
Query Clubs
query Clubs {
  clubs {
    id
    name
    url
  }
}

About

Web app for integration data and publication statistics about football players in Czech Republic.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages