You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Museum objects use inches instead of cm in Past Perfect. We want to convert the extent statements to metric. Can this be done on the back end? Conversion s/b 2.54 cm per inch, with one decimal point retained.
The text was updated successfully, but these errors were encountered:
This is perfectly feasible, but it's not a 10-minute job either.
See e.g.: https://digital.sciencehistory.org/works/fb4948977 for an example: all the dimensions are contained in one string.
So we want a recipe that can take a few hundred strings of the form: 10.25 in. H x 8.25 in. (each of which can contain up to three separate dimensions in inches)
and return a string with each value converted appropriately, and of course with the new units.
Yep. i'd use a regex to look for something like /(\d+\.?\d*) in\./. and just replace each one with ${converted_to_cm} cm
The code doesn't need to know whether there are two dimensions or three or that the dimensions might be lableled with W or anything, just replaces every XX.XX in. with XX.X cm. Only in the specific field(s) specified. (I think just extent)
Does need some testing to make sure no data corruption, it is a bit risky true! Still a human doing it manually would probably make some errors too!
Museum objects use inches instead of cm in Past Perfect. We want to convert the extent statements to metric. Can this be done on the back end? Conversion s/b 2.54 cm per inch, with one decimal point retained.
The text was updated successfully, but these errors were encountered: