Giter Site home page Giter Site logo

pricepaiddata's Introduction

Setup virtual environment and install project dependencies:

python -m venv venv
source venv/bin/activate
pip install -r ./requirements.txt

Help

source venv/bin/activate
python ./src/app.py

Initial download of CSV data (the 1st step):

source venv/bin/activate
python ./src/app.py --action=init

All downloaded CSV files are placed into the DATA_DIR folder. Then all these files get preprocessed to the single "single.csv" file without duplicates. This "single.csv" file is created in the PROCESSED_DATA_DIR.

For all constants values please refer to the src/constants.py module; it is self-explanatory.

NOTE:

This step performs cleanup for all the previously downloaded files, i.e. it removes all files from the DATA_DIR and PROCESSED_DATA_DIR folders upon starting.

Query data from live website (the 2nd step):

source venv/bin/activate
python ./src/app.py --action=query

This step should be performed only when the 1st step is done and there's the "single.csv" file in the PROCESSED_DATA_DIR. This step iterates through all the unique postcodes from the "single.csv" file, does requests and scrapes the required relevant fields.

It stores these fields in a separate CSV file named after a postcode (i.e. SK13_5DB.csv will be generated for the "SK13 5DB" postcode) in the RESULTS_DIR folder. It skips postcodes if there's a corresponding CSV file in the RESULTS_DIR, therefore this step may be re-run many times without issues.

pricepaiddata's People

Contributors

varnie avatar

Watchers

 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.