If you had attached the data as a File attachment and used Observable's tool to load it on the page, you could have added the typed:true to the import to auto convert.
You can also put a + in front of a value that may be a string that you want interpreted as a number to make it a number.