pyaerocom icon indicating copy to clipboard operation
pyaerocom copied to clipboard

Allow importing a DataFrame as a ColocatedData object

Open thorbjoernl opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. Allow creating a ColocatedData object from a pandas DataFrame. Basically the inverse of ColocatedData.to_dataframe().

Would allow for another path for injecting ColocatedData into Pyaerocom.

Describe the solution you would like to see A clear and concise description of what you want to happen.

  • Would you be able to work on this solution yourself?
  • How can the Pyaerocom development team assist you?

Additional context Add any other context or screenshots about the feature request here.

thorbjoernl avatar Oct 10 '24 08:10 thorbjoernl

Is it possible to also allow for xarray dataset to be injected as ColocatedData? Let's say I do the collocation manually using the pyaerocom api i.e.

coldata = pya.colocation.colocator.colocate_gridded_ungridded(rsdscs,data,ts_type='monthly',harmonise_units=False)
ds = coldata.data
ds.to_netcdf("awsome_colocated_data.nc")

which returns coldata as a Xarray dataset that i can save to disk. Could i inject this into pyaeroval for visualization? In let's say by reading it in my config.py?

Ovewh avatar Oct 10 '24 09:10 Ovewh

@Ovewh In theory if you do it correctly it is possible. But this interface for picking up collocated data objects in a WIP https://pyaerocom.readthedocs.io/en/latest/pyaerocom-tutorials/making_a_colocated_data_object_with_pyaerocom.html

lewisblake avatar Oct 21 '24 09:10 lewisblake

This issue is stale because it has been open for 365 days with no activity. This issue will be closed in 14 days if no action is taken.

github-actions[bot] avatar Oct 22 '25 02:10 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Nov 05 '25 02:11 github-actions[bot]