Changelog¶
v0.11.0¶
(#159) Allow access to more functions in
scmdata.run.BaseScmRun.process_over
, including arbitrary functions(#158) Return
cftime.DatetimeGregorian
rather thancftime.datetime
fromscmdata.time.TimePoints.as_cftime()
andscmdata.offsets.generate_range()
to ensure better interoperability with other libraries (e.g. xarray’s plotting functionality). Adddate_cls
argument toscmdata.time.TimePoints.as_cftime()
andscmdata.offsets.generate_range()
so that the output date type can be user specified.(#148) Refactor
scmdata.database.ScmDatabase
to be able to use custom backends(#157) Add
disable_tqdm
parameter toscmdata.database.ScmDatabase.load()
andscmdata.database.ScmDatabase.save()
to disable displaying progress bars(#155) Simplify flake8 configuration
v0.10.1¶
(#154) Refactor common binary operators for
scmdata.run.BaseScmRun
andscmdata.timeseries.Timeseries
into a mixin following the removal ofxarray.core.ops.inject_binary_ops()
in xarray==1.18.0
v0.10.0¶
(#151) Add
ScmRun.to_xarray()
(improves conversion to xarray and ability of user to control dimensions etc. when writing netCDF files)(#149) Fix bug in testcase for xarray<=0.16.1
(#147) Re-do netCDF reading and writing to make use of xarray and provide better handling of extras (results in speedups of 10-100x)
(#146) Update CI-CD workflow to include more sensible dependencies and also test Python3.9
(#145) Allow
ScmDatabase.load()
to handle lists as filter values
v0.9.1¶
(#144) Fix
ScmRun.plumeplot()
style handling (previously, ifdashes
was not supplied each line would be a different style even if all the lines had the same value forstyle_var
)
v0.9.0¶
(#143) Alter time axis when serialising to netCDF so that time axis is easily read by other tools (e.g. xarray)
v0.8.0¶
(#139) Update filter to handle metadata columns which contain a mix of data types
(#139) Add
ScmRun.plumeplot()
(#140) Add workaround for installing scmdata with Python 3.6 on windows to handle lack of cftime 1.3.1 wheel
(#138) Add
ScmRun.quantiles_over()
(#137) Fix
scmdata.ScmRun.to_csv()
so that writing and reading is circular (i.e. you end up where you started if you write a file and then read it straight back into a newscmdata.ScmRun
instance)
v0.7.6¶
v0.7.5¶
(#133) Pin pandas<1.2 to avoid pint-pandas installation failure (see pint-pandas #51)
v0.7.4¶
(#132) Update to new openscm-units 0.2
(#130) Add stack info to warning message when filtering results in an empty
scmdata.run.ScmRun
v0.7.3¶
(#124) Add
scmdata.run.BaseScmRun
andscmdata.run.BaseScmRun.required_cols
so new sub-classes can be defined which use a different set of required columns fromscmdata.run.ScmRun
. Also addedscmdata.errors.MissingRequiredColumn
and tidied up the docs.(#75) Add test to ensure that
scmdata.ScmRun.groupby()
cannot pick up the same timeseries twice even if metadata is changed by the function being applied(#125) Fix edge-case when filtering an empty
scmdata.ScmRun
(#123) Add
scmdata.database.ScmDatabase
to read/write data using multiple files. (closes #103)
v0.7.2¶
(#121) Faster implementation of
scmdata.run.run_append()
. The original timeseries indexes and order are no longer maintained after an append.(#120) Check the type and length of the runs argument in
scmdata.run.run_append()
(closes #101)
v0.7.1¶
(#119) Make groupby support grouping by metadata with integer values
(#119) Ensure using
scmdata.run.run_append()
does not mangle the index topd.DatetimeIndex
v0.7.0¶
(#118) Make scipy an optional dependency
(#116) Update
scmdata.ScmRun.drop_meta()
inplace behaviour(#115) Add na_override argument to
scmdata.ScmRun.process_over()
for handling nan metadata (closes #113)(#114) Add operations:
scmdata.ScmRun.linear_regression()
,scmdata.ScmRun.linear_regression_gradient()
,scmdata.ScmRun.linear_regression_intercept()
andscmdata.ScmRun.linear_regression_scmrun()
(#111) Add operation:
scmdata.ScmRun.delta_per_delta_time()
(#112) Ensure unit conversion doesn’t fall over when the target unit is in the input
(#110) Revert to using pd.DataFrame with pd.Categorical series as meta indexes.
(#105) Add performance benchmarks for
ScmRun
(#106) Add
ScmRun.integrate()
so we can integrate timeseries with respect to time(#104) Fix bug when reading csv/excel files which use integer years and
lowercase_cols=True
(closes #102)
v0.6.4¶
(#96) Fix non-unique timeseries metadata checks for
ScmRun.timeseries()
(#100) When initialising
ScmRun
from file, make the default be to read withpd.read_csv()
. This means we now initialising reading from gzipped CSV files.(#99) Hotfix failing notebook test
(#95) Add
drop_all_nan_times
keyword argument toScmRun.timeseries()
so time points with no data of interest can easily be removed
v0.6.2¶
(#87) Upgrade workflow to use
isort>=5
(#82) Add support for adding Pint scalars and vectors to
scmdata.Timeseries
andscmdata.ScmRun
instances(#85) Allow required columns to be read as
extras
from netCDF files (closes #83)(#84) Raise a DeprecationWarning if no default
inplace
argument is provided forScmRun.drop_meta()
. inplace default behaviour scheduled to be changed toFalse
in v0.7.0(#81) Add
scmdata.run.ScmRun.metadata
to trackScmRun
instance-specific metadata (closes #77)(#80) No longer use
pandas.tseries.offsets.BusinessMixin
to determine Business-related offsets inscmdata.offsets.to_offset()
. (closes #78)(#79) Introduce
scmdata.errors.NonUniqueMetadataError
. Update handling of duplicate metadata so default behaviour ofrun_append
is to raise aNonUniqueMetadataError
. (closes #76)
v0.6.1¶
v0.5.2¶
(#65) Use pint for ops, making them automatically unit aware
(#71) Start adding arithmetic support via
scmdata.ops
. So far only add and subtract are supported.(#70) Automatically set y-axis label to units if it makes sense in
ScmRun
’slineplot()
method
v0.5.1¶
(#68) Rename
scmdata.run.df_append()
to :func`scmdata.run.run_append`. :func`scmdata.run.df_append` deprecated and will be removed in v0.6.0(#67) Update the documentation for
ScmRun.append()
(#66) Raise ValueError if index/columns arguments are not provided when instantiating a :class`ScmRun` object with a numpy array. Add
lowercase_cols
argument to coerce the column names in CSV files to lowercase
v0.5.0¶
(#64) Remove spurious warning from
ScmRun
’sfilter()
method(#63) Remove
set_meta()
fromScmRun
in preference for using the__setitem__()
method(#62) Fix interpolation when the data contains nan values
(#61) Hotfix filters to also include caret (“^”) in pseudo-regexp syntax. Also adds
empty()
property toScmRun
(#59) Deprecate
ScmDataFrame
. To be removed in v0.6.0(#58) Use
cftime
datetimes when appendingScmRun
objects to avoid OutOfBounds errors when datetimes span many centuries(#55) Add
time_axis
keyword argument toScmRun.timeseries
,ScmRun.long_data
andScmRun.lineplot
to give greater control of the time axis when retrieving data(#54) Add
drop_meta()
toScmRun
for dropping metadata columns(#53) Don’t convert case of variable names written to file. No longer convert case of serialized dataframes
(#51) Refactor
relative_to_ref_period_mean()
so that it returns an instance of the input data type (rather than apd.DataFrame
) and puts the reference period in separate meta columns rather than mangling the variable name.(#47) Update README and
setup.py
to make it easier for new users
v0.4.1¶
(#44) Add multi-dimensional handling to
scmdata.netcdf
(#43) Fix minor bugs in netCDF handling and address minor code coverage issues
(#41) Update documentation of the data model. Additionally:
makes
.time_points
atttributes consistently returnscmdata.time.TimePoints
instancesensures
.meta
is used consistently throughout the code base (removing.metadata
)
(#33) Remove dependency on pyam. Plotting is done with seaborn instead.
(#34) Allow the serialization/deserialization of
scmdata.run.ScmRun
andscmdata.ScmDataFrame
as netCDF4 files.(#30) Swap to using openscm-units for unit handling (hence remove much of the
scmdata.units
module)(#21) Added
scmdata.run.ScmRun
as a proposed replacement forscmdata.dataframe.ScmDataFrame
. This new class provides an identical interface as aScmDataFrame
, but uses a different underlying data structure to theScmDataFrame
. The purpose ofScmRun
is to provide performance improvements when handling large sets of time-series data. Removed support for Python 3.5 until pyam dependency is optional(#31) Tidy up repository after changing location
v0.3.1¶
v0.2.1¶
v0.1.2¶
v0.1.0¶
(#3) Added documentation for the api and Makefile targets for releasing
(#2) Refactored scmdataframe from openclimatedata/openscm@077f9b5 into a standalone package
(#1) Add docs folder