GithubHelp home page GithubHelp logo

peace-and-passion / luncho Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 1.15 MB

Price level calculator: Pricing calculator that respects the price levels of countries using Purchase Power Parity (PPP). A library and server for currency conversion among local currency, US Dollar, and Luncho that is a common value index.

Home Page: https://luncho-de-peace.org

License: MIT License

TypeScript 14.41% EJS 0.44% HTML 8.05% CSS 8.04% JavaScript 4.30% Shell 0.88% Python 63.71% Dockerfile 0.16%
exchange-rate forex inequality ppp pricing purchase-power-parity

luncho's Introduction

Luncho de Peace: Price level calculator

Pricing calculator that respects the price levels of countries using Purchase Power Parity (PPP). A library for currency conversion among local currency, US Dollar, and Luncho that is a common value index. Also with an API server and an app.

Examples

To get the local currency value of a country from a US dollar value in US, taking the price level of the country into account by factor 0 to 1.0.

   const jpy = await this.luncho.get_currency_from_US_dollar(50.0, 'JP', 1.0)

To get the local currency value of a country from a Luncho value, taking the price level of the country into account by factor 0 to 1.0.

   const local_currency_value = await this.luncho.get_currency_from_luncho(100.0, 'JP', 1.0);

To get the Luncho value of a country from a local currency value.

   const luncho_value = await this.luncho.get_luncho_from_currency(50.0, 'JP', 1.0);

To get the US Dollar value of a country from a Luncho value, taking the price level of the country into account by factor 0 to 1.0.

   const dollar_value = await this.luncho.get_US_dollar_from_luncho(100, 'JP', 1.0);

To estimate country code from IP address

   this.countryCode = await this.luncho.get_country_code();

Common value index that you can have simple lunch in every country with 100 Luncho.

Useful for currency conversion on pricing pages and wages for mitigating the inequality problem among countries. It's based on purchase power parity (PPP) and World comparison Program (ICP).

A luncho value shows the same value in any country taking its price levels into account. For example, with 100 Luncho, you can have simple lunch in India, in Brazil, in USA, in Japan, and in any other countries.

In India 100 Luncho is equivalent to 191.11 Rupee ($2.31 US dollar), while the same 100 Luncho is 20.91 Real ($3.96 US dollar) in Brazil. In USA, 100 Luncho is about $7.97 US dollar. All are the same value because everything is just 100 Luncho for a lunch.

Usages

API change

  • Added get_luncho_from_currency() and get_currency_from_US_dollar().
  • 100 Luncho is 6 SDR since 16th March, 2023.

Bonus

Grow your product with Luncho.

Once you use Luncho in your pricing page, people in developing countries who are not able to buy your digital service will become to afford to buy it. Luncho will accelerate growth of your user base and your revenue beyond the current ones without Luncho.

Note

Luncho de Peace is a derived work of AIST Luncho.

luncho's People

Contributors

dependabot[bot] avatar hirano-satoshi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

luncho's Issues

Add lunch map

It would be nice if the single page has a map of the country with many lunch images with Luncho prices.

  • A location based image service API for lunch images
    • code
    • test
  • Leaflet with OpenStreet map on the single page
  • Login with Land ID
  • The entry page

Exchange rates are ignored

Although exchange rates are fetched, they are not used during conversion from Luncho to local currencies. Luncho calculation reflects only PPP values.

To reflect the latest exchange rate of a currency in a country, we need the exchange rate at the moment when International Comparison Program measured the price levels in the country.

In STATISTICAL APPENDIX of World Economic Outlook 2021, they wrote:

  • Real effective exchange rates for the advanced economies are assumed to remain constant at their average levels measured during January 18, 2021–February 15, 2021. For 2021 and 2022 these assumptions imply average US dollar–special drawing right (SDR) conversion rates of 1.445 and 1.458,

So, we have to calculate the average exchange rate of the currency during the period above mentioned. And we can reflect the latest exchange rate against the average exchange rate.

We need a database. The current implementation runs on Google App Engine Standard (GAE) but it should run on any Docker container. If I use free Datastore on GAE, it won't run on other environment.

exchangerate.host API change

The Luncho server was able to use free exchangerate.host and fixer.io for currency exchange rates.

On 23 September, exchangerate.host was sold and became a paid service. Also their API was changed.

Because both provides the same free tier (1000/month), there is no reason to support exchangerate.host.

Please use fixer.io with setting FIXER_API_KEY environment variable. That priorities fixer.io and doesn't use exchangerate.host.

CAUTION: Our public server at luncho-de-peace.org is working with a snapshot of exchange rate taken on the date.

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.