Coder Social home page Coder Social logo

companieshouse_api's Introduction

CompaniesHouse API Wrapper

This code serves as a wrapper to interface with the Companies House API. Please create an API key to use this wrappers functionalities. You can crate an API key by following the official instructions: https://developer.company-information.service.gov.uk/get-started

Feel free to use the Jupyter Notebook "API prod.ipynb" as an interface.

Launch virtual Jupyter Notebook

badge

Creating a CHouse object

To interface with the companies house API, a CHouse object needs to be created. This is possible by passing a valid API key string into the CHouse class.

After a successful object creation, it is possible to filter companies after their SIC codes and current status (active, inactive). This filter and extraction process is done via the filter_sic(sic_code, status, start index) method. Please note that the start index determines where the extraction process should begin. If all filter specified companies shall be extracted, please set the start index to 0.

CHouse object creation

Creating a company location Map

The filtered data can be enriched with the geographical location of the different companies. This can be achieved by calling the method create_map(data, display map). The second argument of the method allows the user to specify if the map shall be instantly rendered within a Jupyter Notebook. Please note that the map will be saved within an CompanyMap.html file if the second argument is set to False.

Enrich geo location

Enrich geo location 2

Enriching data with significant owner

The method enrich_founder(data) will add information to the existing data by retrieving all owners with significant control based on the company id.

Retrieve company filings

The method retrieve_filings(company id) will retrieve the latest company filings based on the passed in company id.

Company filings

Saving data in a .xlsx file

You can save your retrieved data anytime as an xlsx file by using the export_excel(data) method. The file generated will be named as follows: CompaniesExport.xlsx

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.