the measured value on a arduino might be 0 … 1023
same as you suggest in the map function.
so i see no use to try to convert that value from string into a float.
anyhow i recommend that you print that ( cleaned up ) string to console first
to see what you really get from serial port.
/ and if it match with what you see in the arduino IDE monitor,
after upload your arduino sketch