Wolfram Cloud (Mathematica) Demo: Import JSON Data, Values, For Loop, ToExpression and StringReplace
In this video, we look at an example of having Wolfram Cloud (Mathematica) import some data from a JSON file. We show how to extract the desired rows and columns from the data along with the use of the Values method to work with the key-value pairs. We use a For method to loop over the rows of data pairs. With each individual pair, we use StringReplace to eliminate characters that might interfere with the conversion of the data from a string to a number. Finally we use ToExpression to convert the strings to numbers. Once we had the data in the proper form, we could use ListPlot to display that data as a graph followed by LinearModelFit to fit the data to a quadratic form (polynomial of Order 2). (It's linear if the fit coefficient.)
Видео Wolfram Cloud (Mathematica) Demo: Import JSON Data, Values, For Loop, ToExpression and StringReplace канала Thomas Blum
Видео Wolfram Cloud (Mathematica) Demo: Import JSON Data, Values, For Loop, ToExpression and StringReplace канала Thomas Blum
Комментарии отсутствуют
Информация о видео
20 января 2023 г. 23:04:20
00:17:50
Другие видео канала