gmn_python_api.meteor_trajectory_reader#

This module contains functions to load meteor trajectory data into Pandas DataFrames.

Module Contents#

Functions#

read_data(data[, input_camel_case, output_camel_case])

Reads meteor trajectory data either as a CSV string or a list of dicts into a Pandas

_convert_camel_case_to_verbose_column_names(dataframe)

Converts the column names in a DataFrame containing meteor trajectory data to verbose

_set_camel_case_column_names(dataframe)

Sets the column names in a DataFrame containing meteor trajectory data to camel case

_set_data_types(dataframe)

Sets the data types and index column in a DataFrame containing meteor trajectory

Attributes#

gmn_python_api.meteor_trajectory_reader.DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S.%f'#
gmn_python_api.meteor_trajectory_reader.read_data(data, input_camel_case=False, output_camel_case=False)#
Reads meteor trajectory data either as a CSV string or a list of dicts into a Pandas

DataFrame. Columns available in the DataFrame can be found here: https://gmn-python-api.readthedocs.io/en/latest/data_schemas.html

Parameters:
  • data (Union[str, List[Dict[str, Any]]]) – The meteor trajectory data. Either a CSV string from the GMN data directory or a JSON from the GMN REST API.

  • input_camel_case (Optional[bool]) – If True, the input data is assumed to have camel case column names e.g. m_deg

  • output_camel_case (Optional[bool]) – If True, DataFrame column names will be camel cased e.g. m_deg

Returns:

Pandas DataFrame of the meteor trajectory data.

Return type:

pandas.DataFrame

gmn_python_api.meteor_trajectory_reader._convert_camel_case_to_verbose_column_names(dataframe)#
Converts the column names in a DataFrame containing meteor trajectory data to verbose

e.g. beginning_utc_time to Beginning (UTC Time).

Parameters:

dataframe (pandas.DataFrame) – The meteor trajectory dataframe to convert the column names for.

Returns:

The meteor trajectory dataframe with verbose column names.

Return type:

pandas.DataFrame

gmn_python_api.meteor_trajectory_reader._set_camel_case_column_names(dataframe)#
Sets the column names in a DataFrame containing meteor trajectory data to camel case

e.g. m_deg.

Parameters:

dataframe (pandas.DataFrame) – The meteor trajectory dataframe to set the column names for.

Returns:

None.

Return type:

None

gmn_python_api.meteor_trajectory_reader._set_data_types(dataframe)#
Sets the data types and index column in a DataFrame containing meteor trajectory

data. The input dataframe must be in verbose column name format e.g. “Beginning (UTC Time)”.

Parameters:

dataframe (pandas.DataFrame) – The meteor trajectory dataframe to set the data types for.

Returns:

None.

Return type:

None