Git Product home page Git Product logo

onsapir's People

Contributors

kproductivity avatar

Watchers

 avatar

onsapir's Issues

Dataset extraction

Note: 'A dataset (or slice) is represented in SDMX by two responses: Structure and Data. The ONS API, for convenience, allows you to receive the two responses in a combined message, but as this is not valid in SDMX an artificial ONSDataPackage entity is used to encapsulate them. If you are using SDMX-based tools (e.g. from Eurostat) you should always use the separate outputs (/dsd for the structure and /set for the data).
The Structure part of an SDMX message can contain Key Families, Concepts and Codelists, these three together comprise a DSD (Data Structure Definition). Parts of the DSD can be returned separately, or in a single response thing using dataset/[datasetid]/dsd.'

Need to consider that if dataset is too big, the extraction will be in the form of a zip file.

Error control

Controlling for the API [error] response codes:

• 500 - internal server error (unexpected)
• 407 - proxy authentication required
• 406 - not acceptable (usually an incorrect accept header)
• 404 - not found (could be misspelling or dataset id not found on database)
• 400 – Bad Request (usually a syntax error)
• 202 – Accepted, not complete (download being generated)
• 200 - OK (only returned for successful requests, never used for any type of error condition as this can cause ambiguity for the client application)

Interactive dataset discovery

According to the API documentation, 'the root node of the API can be queried and the response includes the URLs for a list of contexts, a list of concepts, a list of collections and a list of classifications'.

A function that interactively queried the API to build the url can be programmed.

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.