feddernico / open-leontief-solver Goto Github PK
View Code? Open in Web Editor NEWThis repository contains a Shiny app made to solve an open Leontief model
This repository contains a Shiny app made to solve an open Leontief model
--- title: 'Readme: Open Leontief Solver' author: "Federico Viscioletti" date: "1/17/2018" output: html_document: toc: yes toc_float: yes theme: cosmo highlight: tango --- This Shiny app provides an example on how to solve a Open Leontief model, using random generated data. ## How it works The user can select the complexity of the problem by selecting the number of interrelated sectors in the model, using a slider available in the sidebar. Then a consumption matrix and a demand vector is generated and shown in the **Input Data** section. Internal consumption is $C \times P$. So if P is our production vector, $P - C \times P = D$, the consumption of external industries. We of course want to find the level of production that meets internal and external demand. $$P - C \times P = P (I - C) = D$$ If $C$ is productive (sum of each row/col is less than 1), $(I - C)$ is guaranteed to be invertible. (Beyond the scope of this script to prove this, though). So the Production vector is calculated as `solve(I - C) %*% D`, which is the solution to the Leontief Problem. In the **Solver** section, the production vector $P$ that solves the Leontief problem is calculated and shown in a tabular format. Using this we can answer some useful questions like: - Given current external demand, what should every industry be producing?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.