Giter Club home page Giter Club logo

hkjc's Introduction

HKJC analysis project

HKJC repo is a project fro analyzing the horse racing data from HKJC

Contents

Prerequisites

  1. Download Miniconda3
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
export PATH=~/miniconda/bin:$PATH
  1. Download PostgreSQL 11
sudo apt-get install postgresql-11 postgresql-contrib

Installing

  1. Clone the repo
git clone [email protected]:cfcdavidchan/HKJC.git
  1. Creating conda environment for the project and activate it
conda env create -f environment.yml
conda activate HKJC
  1. Create PostgresSQL database
sudo su - postgres
psql
\i repo_path/create_database.sql

Note: repo_path means the full path of this repo in your local computer

Crawler

  1. Add going data into Database
python ./HKJC_database/going.py
  1. Get into the crawler directory
cd HKJC_crawler
  1. Run the crawler and store into PostgreSQL
scrapy crawl Course_crawler #crawl course data into Database
scrapy crawl Jockeys_crawler #crawl jockey data into Database
scrapy crawl Trainer_crawler #crawl trainer data into Database
scrapy crawl Horse_crawler #crawl horse data into Database
scrapy crawl Match_crawler #crawl Match data into Database

hkjc's People

Contributors

cfcdavidchan avatar

Watchers

James Cloos avatar  avatar

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.