Lecture: Creating a chart for Universal Basic Income, r ver. 4

Last Updated on July 7, 2022 by shibatau

I’m rewriting now.

I. Universal Basic Income

You can learn about Universal Basic Income here:

生活保護制度とベーシックインカムと負の所得税の違い

II. The scripts

Let’s create a chart using R. If you want to show Japanese on the chart, you have to add the following code:

par(family="HiraKakuProN-W3")

III. Creating a chart online

Please press Run on the bottom right corner and you will get a plot.




# Basic Income
# plot frame
plot(NA, xlim = c(0, 80), ylim = c(0, 80), ann = FALSE)
# without any taxes and public assistance
curve(1*x,from=0, to=80, add=TRUE, ann = FALSE)
# net income
curve(0.5*x+12, add=TRUE, lwd=4, ann = FALSE)
# total income
curve(1*x+12, lty=2, from=0, to=80, ann = FALSE)
# plot with texts
polygon(c(0,0,24), c(0,12,24), col="mistyrose")
polygon(c(24,80,80), c(24,80,52), col="lightcyan")
title(main="BASIC INCOME", xlab="INCOME", ylab="NET INCOME")
text(70, 58, paste("income tax"))
text(25, 52, paste("BASIC INCOME"))
text(25, 50, paste("TOTAL INCOME BEFORE TAXING"))
text(45, 27, paste("net income"))




I have also created a chart using Python though not completed.

https://colab.research.google.com/drive/1S8qlyfim8k8H4WSpTy5osod3a-eHzi6_?usp=sharing

About shibatau

I was born and grown up in Kyoto. I studied western philosophy at the University and specialized in analytic philosophy, especially Ludwig Wittgenstein at the postgraduate school. I'm interested in new technology, especially machine learning and have been learning R language for two years and began to learn Python last summer. Listening toParamore, Sia, Amazarashi and MIyuki Nakajima. Favorite movies I've recently seen: "FREEHELD". Favorite actors and actresses: Anthony Hopkins, Denzel Washington, Ellen Page, Meryl Streep, Mia Wasikowska and Robert DeNiro. Favorite books: Fyodor Mikhailovich Dostoyevsky, "The Karamazov Brothers", Shinran, "Lamentations of Divergences". Favorite phrase: Salvation by Faith. Twitter: @shibatau

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.