microsoft / microsoft/calculator

Converter should integrate (or reuse) online unit conversions (Bing or similar services) to increase category/unit coverage

Open
#515 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement help wanted needs spec Pri: 2
Dominant language
C#
Stars
31.1k
Forks
5.8k
PR merge metrics
No merged PRs in 30d

Description

Problem Statement
The proposed feature is to add more comprehensive coverage of categories and units for Converter through some form of integration with newly created or existing online systems.

Calculator provides unit conversions for 13 categories (Currency, Volume, Length, Weight/Mass, Temperature, Energy, Area, Speed, Time, Power, Data, Pressure, Angle) via the main Hamburger Menu. Length has for example selections for 11 units (Nanometer, Microns, Millimeters, Centimeters, Meters, Kilometers, Inches, Feed, Yards, Miles, Nautical Miles) and outputs additional "practical" units in the UI (Paperclips). While the current hard-coded list of conversions in calculator is reasonably extensive, the fixed set of units can quickly reach its limits, in particular when scientific or rare units are required (see evidence below).

Once a user hits a unit conversion limitation, they will likely turn to search engines which generally provide the requested conversions directly from the search box. This slows down the user trying to perform unit conversions (context switch to browser, copy-and-paste of converted results) overall diminishes the value of the unit conversion feature and Calculator in a cloud-connected world.

The goal for this feature is to make the Converter the one-stop-shop for unit conversions, in particular for scientific and educational settings.

Evidence or User Insights

Various gaps have been identified and documented in existing issues:
https://github.com/microsoft/calculator/issues/275 - month and ns for time
https://github.com/microsoft/calculator/issues/325 - light years for distance

A Bing query for a unit conversion (https://www.bing.com/search?q=20+F+in+C) shows a "Convert units" dialog with 17 categories (Length, Mass, Temperature, Speed, Volume, Area, Time, Frequency, Angle, Force, Pressure, Energy, Power, Electric Current, Voltage, Resistance, Digital storage, Fuel consumption) which is 4 more than calculator.

The Wikipedia page for Length https://en.wikipedia.org/wiki/Conversion_of_units#Length lists 77 distinct distance units, which is 66 more than calculator.

A Bing query can also support variable conversions such as currency conversions (https://www.bing.com/search?q=20+euro+in+dollar&FORM=AWRE) where the factor changes over time.

Proposal

The related work to modernize the unit conversion architecture:
https://github.com/microsoft/calculator/issues/379
should consider making Converter fully data driven, and integrate with an online data-source or service so Converter can provide more comprehensive (and daily updatable) conversion tables without binary updates to Calculator itself.

Assuming the existence of an online service which would aggregate and serve existing conversions from online sources (i.e. via an exposed search engine API or code-sharing), add currency services, scrape Wikipedia or other public sources, and allow for curation (to avoid errors), Converter could download and cache a conversion table that is much more comprehensive than the current version.

Goals

User can convert anything that works in a search engine such as "20 dollars into euro" or "1 ly into mm" with Converter.

Non-Goals

Design and implementation of the web-service that aggregates and serves conversion data.

Low-Fidelity Concept

[Online Conversion Sources] + [Curators] ----web service ---> [Conversion Table Artifact] ---download/update---> [Calculator] ---cache/use---> [Converter UI]

Requested Assignment

I'm just suggesting this idea. I don't want to implement it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Converter UI and the related unit-conversion architecture work in issue #379. The proposal describes an online conversion service, downloadable conversion data, caching, and broader coverage, but does not identify files or tests. Done would mean supporting search-engine-like conversions through an integrated, updatable data source.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.