Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return OSeMOSYS data as an xarray.DataSet #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

willu47
Copy link
Member

@willu47 willu47 commented Jun 21, 2023

An inelegant/experimental implementation on the ReadStrategy class which returns an xarray.DataSet object of OSeMOSYS model data

Description

xarray.DataSet provides a number of advantages for dealing with OSeMOSYS data, including advanced filtering.

Read in the data to an xarray.DataSet::

>>> reader = ReadCsv('config.yaml')
>>> ds = reader.to_xarray('my_folder_csvs')

Then drop years::

>>> ds = ds.drop_sel(YEAR=range(2025, 2071))

Issue Ticket Number

Some of the issues around indexing that aren't satisfactory in pandas were mentioned in #98 (categorical indexes) and #165 (duplicate indexes).

Documentation

None yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant