earthref / MagIC

EarthRef's MagIC Web Application
https://earthref.org/MagIC
MIT License
8 stars 2 forks source link

When import from excel need to round some values #127

Open njarboe opened 7 years ago

njarboe commented 7 years ago

When import from excel need to round some values. See longitude which was calculated in excel with a formula. screen shot 2017-06-29 at 10 02 03 pm

rminnett commented 7 years ago

Can you help me work out what the rule should be for this? We don't apply a recommended precision to any columns; numeric data just get stored the way the user contributed them (with the exception of the upgrader, which does manipulate some columns #112). Should we store recommended precisions in the data model and apply them on upload or activation?

njarboe commented 7 years ago

Thinking about it a bit more, the current system is just taking what Excel has and using it exactly as found. This is the correct behavior. The user can manipulate data in Excel easily enough if they care. It might be nice to give a warning like "Some of your data values seem over precise. Excel has the Text(cellname,"0.0000") function to convert numbers to text with a specified precision." Do you store everything as text so that we don't have this "numbers are not exact when stored in binary float format" problem?

njarboe commented 7 years ago

Opening a new issue "Give warning when importing from excel and values have probably too many significant digits."

njarboe commented 5 years ago

@rminnett Lori and I worked on a system to fix this with PmagPy. https://github.com/PmagPy/PmagPy/issues/511 Her code is in MagicDataFrame method in pmagpy/contribution_builder.py, part of all_to_str.

rminnett commented 5 years ago

Ok, thanks, is the expected behavior that the upload tool fixes this or that it just gives a warning and lets the user upload again with a fixed file?