Giter Club home page Giter Club logo

parliamentarypetitionparser's Introduction

ParliamentaryPetitionParser

A handy code wrapper to retrieve and parse data from the UK Parliamentary Petitions website.

This code accepts petition numbers, and automatically collects, parses, and saves data associated with that petition. The data collected and parsed from the petition can be saved in a time-separated manner to allow analysis of the petition's evolution over time.

Requirements

This repo is written for Python 3. Python 2 compatibility is not guaranteed. See requirements.txt for a list of python packages this code depends on.

How To Use

This repo is in the early stages of development

  1. Clone this repo and install the required packages.
  2. Find out the petition number of the petition for which you would like to collect data
  3. Find the path to the directory to which you would like data to be saved, relative to the top-level ParliamentaryPetitionParser directory. This defaults to data/.
  4. In the ParliamentaryPetitionParser directory, run python -m src.petition --petition_number=NUM --output_dir=DIR, where NUM is the petition number and DIR is the save directory.
  5. Check your output directory location. You will have two files: constituency and country, which are prefixed by year_month_day_hour_minute_ and suffixed by the petition number.

You can also set ParliamentaryPetitionParser to collect data every X minutes. To do this, run python -m src.petition --petition_number=NUM --output_dir=DIR --frequency=X

parliamentarypetitionparser's People

Contributors

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