aerosandbox.tools.webplotdigitizer_reader
A series of utilities for working with CSV data extracted from WebPlotDigitizer.
https://automeris.io/WebPlotDigitizer/ https://github.com/ankitrohatgi/WebPlotDigitizer
Functions
string_to_float(s) | Converts a string input to a float. If not possible, returns NaN. |
remove_nan_rows(a) | Removes any rows in a 2D ndarray where any of the entries are NaN. |
read_webplotdigitizer_csv(filename) | Reads a CSV file produced by WebPlotDigitizer (https://automeris.io/WebPlotDigitizer/). |
Module Contents
aerosandbox.tools.webplotdigitizer_reader.string_to_float(s) : Converts a string input to a float. If not possible, returns NaN.
code
Parameters:
: **s** (*str*) –
Return type:
: floataerosandbox.tools.webplotdigitizer_reader.remove_nan_rows(a) : Removes any rows in a 2D ndarray where any of the entries are NaN.
code
Parameters:
: **a** (*numpy.ndarray*) –
Return type:
: numpy.ndarrayaerosandbox.tools.webplotdigitizer_reader.read_webplotdigitizer_csv(filename) : Reads a CSV file produced by WebPlotDigitizer (https://automeris.io/WebPlotDigitizer/).
code
If there’s only one data series, produces a Dict with key “data” and value 2D ndarray.
If there are multiple data series, produces a Dict with keys of the names and values of 2D ndarrays.
2D ndarrays are sorted by their X-values before being returned.
Parameters:
: **filename** (*Union**[**pathlib.Path**,* *str**]*) – Filename, as a string or pathlib Path, or equivalent.
Return type:
: Dict[str, numpy.ndarray]
Returns: A dictionary where keys are series names and values are data points.