*Introduction*

When I was invited to become the editor of the Japan Studies content on Digital Orientalist, I began to reflect more fully on the problems that I have faced in my own research and the ways in which I may be able to address these digitally for both myself and others. One problem that has consistently surfaced is interaction with and more specifically the conversion of the Japanese system of measurements (*shakkanhō* 尺貫法) into metric measurements. In the past, I have searched for conversions in the appendices of academic texts or on sites such as Wikipedia and calculated the metric equivalent myself. After some preliminary searches, I noticed that most websites that offer free conversion calculators for Japanese units are outdated, and I, therefore, began to flirt with the idea of creating a new conversion calculator.

A new conversion calculator could easily be created in Microsoft Excel, however, an Excel file could easily be lost within a user’s hard drive and as such it would not be particularly useful to other scholars who downloaded it. The calculator could also be created as a Java Application, but I did not believe that the concept required a stand-alone piece of software. Overall, I believed that an online platform would be most useful to both myself and potential users, and I, therefore, opted to use the online system *vCalc* to create and host the conversion calculator. *vCalc *allows users, primarily in the fields of academia, construction, and finance, to create and use mathematical calculators, equations, and datasets using a combination of its own system and the programming language *Apache Groovy*.

An example of *Apache Groovy *as used in *vCalc *from my *Japanese (Shokkanhō**) Lengths *equation.

*Creating the Calculator*

After signing up for an account I spent the better part of a week learning how to use the system and familiarizing myself with *Groovy* by reading the algorithms created by other users working on similar projects. *vCalc *encourages users to adapt the algorithms of others within their own work, and therefore I created an initial set of equations that converted Japanese measurements into their metric equivalents basing the project on imperial unit conversion calculators and currency calculators already present on the *vCalc *system. For instance, the equation I created for the length measurement, *Mō *(毛 or 毫), stated that:

*Millimetres *= *Mō*/33

Later, I realized through looking at the algorithms of the equations for *Biblical Lengths *that a better system could be instated by creating Japanese measurements as constants (mathematical units) rather than equations, and later feeding these constants into an equation. Under the new system, *Mō* is defined as:

*Mō* = 0.03030*mm*

I imported this information (alongside other Japanese units of length) into an equation. The equation contained a switch that created a drop-down menu allowing the user to select different units. The chosen unit is then multiplied by the numerical value that the user inputs. If a user selects *Mō*, which the system understands to mean 0.03030mm based on the imported information from the above-noted data, the equation in its most basic form states that:

*X =* *Mō *x *Y*

The *vCalc *system then automatically allows the output to be converted into other metric or imperial measurements.

The drop-down menu, and input and output boxes for the *Japanese (Shokkanhō**) Area *equation.

I repeated this process for Japanese units of area, volume, weight, and rice weights, creating a total of 40 constants and five equations, each with their own algorithms, definitions, and Wikipedia-style information pages. Once I reached this stage, I imported my five equations into the calculator creation page in order to create a separate calculator page where all my equations could be instantaneously accessed and used. I composed the information on the page and launched the calculator, equations, and constants into *vCalc*’s public system, known as *vCommons*, making all the information, algorithms and code accessible to the public and users of the system. Making this information public also means that the information pages can be edited by other users or duplicated in order to create further constants, equations or calculators.

*Reception*

Shortly after launching the calculator, the President of *vCalc, *Kurt Heckman, sent me a personal email praising the calculator and its *wiki *pages. He performed some minor edits on the calculator’s *wiki *pages and the company began making efforts to publicize the calculator online. Due to *vCalc*‘s interest in the calculator, Heckman has written a blog post on *vCalc*‘s main site about the calculator, which can be viewed *here*.

*Finding the Finished Product*

I intend to expand the *Japanese (Shakkanhō) Unit Conversion Calculator* with further equations and constants, such as historical monetary weights, however, the 14.2 version (accurate at the time of writing and pictured below) can now be accessed here or through *vCalc*‘s mobile application,* vCalc Mobile. *I am interested in hearing users’ thoughts on the Calculator in order to improve it, so if you happen to give it a try please feel free to send me feedback. I am also flirting with the idea of turning the calculator into a stand-alone application, but that will be the topic of a potential future post.

A screenshot of the finished *Japanese (Shakkanhō) Unit Conversion Calculator *page on *vCalc*.

*Links*

*The next article in this series.*

Pingback: Creating an Online Calculator (2): Algorithms and Code | The Digital Orientalist