Giter Club home page Giter Club logo

moj-analytical-services.defcalc's Introduction

DefCalc

DASD tool, designed to provide a central source for commonly used indices. Enables users to view, download and upload indices; and inflate, deflate and discount financial values.

Getting Started

This README file will provide developers with an overview of the project works.

Prerequisites

Developers MUST have access to:

  • MOJ-Analytical-Services organisation on Github, and the following repositories:
    • DefCalc; provides the code necessary to run the app
    • airflow-DefCalc; provides the code necessary to auto-scrape the file(s) to update the app's data source
    • airflow-dags; required to allow airflow-DefCalc to run globally using MOJ airflow (rather than localised)
  • MOJ Analytical Platform:
    • RStudio
    • Webapp(s):
      • Defcalc
    • Webapp data source(s):
      • alpha-app-defcalc

Knowledge of R & Rshiny is strongly recommended.

Installing

To link the project to RStudio, it is recommended to clone the repositories using their respective SSH keys.

Key Files

Within the DefCalc repository, the following are key files:

  • ui.R; contains the code for producing the user interface of the app
  • server.R; contains the bulk of the code for the app. This includes generating all of the table(s), manipulating the data, download functionality etc. It is set out loosely by 'section' such that each tool has its own scope
  • idx.R; takes the data from the AWS S3 bucket (alpha-app-defcalc) and then cleans it, and creates some global functions for use in ui.R & server.R
  • www; contains several pages used to generate the guidance displayed within the app for users
  • deploy.json; describes the parameters required for access (i.e. everyone, approved users only, DOM1 users...)
  • environment.yml; details all packages/dependencies required for the app to load

Within the airflow-DefCalc repository, the following are key files:

  • ds.R; contains the code that scrapes the website(s) specified for the data required to feed into the app, and saves it to the AWS S3 bucket (alpha-app-defcalc)
  • iam_policy.json; provides persmissions/access for the airflow to read/write in the AWS S3 bucket (alpha-app-defcalc)
  • packrat; details all packages/dependencies required for the app to load

Within the airflow-dags repository, the following are key file(s):

  • defcalc_obr_scraper_global.py; contains the code to ensure that the code within airflow-DefCalc is automatically ran at specified time intervals

Deployment

When ready to deploy new releases, newly published releases should adhere to the following versioning formats: https://semver.org/

moj-analytical-services.defcalc's People

Contributors

dwmoj avatar hannah-manak-moj avatar jnrwalden avatar leicesterjj 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.