Giter Club home page Giter Club logo

pyleoclim_util's People

Contributors

alexkjames avatar aragath avatar commonclimate avatar consideratio avatar fzhu2e avatar jordanplanders avatar kcpevey avatar khider avatar lionelvoirol avatar mosoriob avatar myronkwan avatar neillinehan avatar paleolipidrr avatar pratheekbalaji avatar qianxyz avatar ramkumar-kr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyleoclim_util's Issues

Smoothing

R compiler

R needs to be present. Add to documentation.

Rearrange Pyleoclim modules

Proposed change:

  1. Wrapper module called workflow.py that will handle LiPD files directly and automate some of the decisions (as much as possible).

Workflows would either allow for a LiPD object (dictionary) or for a user dictionary containing appropriate information as specified by function (e.g., time, value for Series).

  1. Upper module api.py which would contain the functions that are most likely being used by a user to return either results, plots or text. Object-driven.

Can be used to create personal workflows. See Jupyter Notebook as example. These methods will be re-used in workflow.py

Classes to consider:

  • Series -> plot, hist, clean, correlation, causality, spectral, wavelet, wavelet coherence, generate surrogate of the series, filter, PCA, SSA, stats, interpolation (interp/bin), standardize, annualize (with lots of error checks),
  • Output of spectral becomes a PSD object -> plot
  • Output of wavelet becomes a scalogram object-> plot
  • Output of coherence becomes Coherence object->plot
  • Ens class -> takes a list of series objects, plot
  • Chron obj -> generate ensembles
  • LiPD object -> map, summaryplots, then send to other objects
  • MultipleSeries -> list of series/ens objects; correlation with FDR, PCA, plot (stack plot)
  1. Lower modules, which contains base methods. Need to concatenate as follows:
  • examples.py - example data
  • lipdutils.py
  • map + plot + summaryplots -> visualization and deal with issue #66
  • rbchron -> age model
  • spectral, stats, timeseries -> analysis.py

Fortran compiler

Change the import to fortran code to be within the function so the package doesn't fail on import. Put a warning that the method is slow and we strongly suggest installing said compiler.

Regression for calibration

Feng, Julien wanted to integrate your notebook into Pyleoclim. He said using statsmodel. More details would be nice.

Graphic identity

It's important for our plots to have a distinct look and feel.
To me that involves two things:

  • using a Matplotlib style (either existing or custom) throughout, instead of doing so on a function by function basis.
  • despining most (all?) plots.

Currently our style is a bit of a mish-mash, so we need to get coherent. What style do you prefer? I'm pretty happy with the new matplotlib default, with ggplot a close second.

Another consideration is customizability: it's essential to have sensible defaults, but it should be easy for users to override that if they have a preferred style. I think this can be done easily by explaining in the documentation that the package sets its own Matplotlib style, but explain how users can override that in one line of code.

Variable "distance_from_top"

Currently, Pyleoclim does not interpret the variable "distance_from_top" as "depth". Thus for example, in the summaryTs function, age model plot can not be generated.

Stats.py clean up

Several functions, like corrsig and rednoise, look like they are not used and should therefore be canned to avoid confusion.

Bad basemap>=1.0.7 requirements when installing from pip

Hello! Just a heads up:

Users will get an error for your basemap requirement when following the install guide.

Can recreate this on a clean conda environment on OSX or Linux:

conda create --name spacemonkey
source activate spacemonkey
conda install python=3.6 pip
pip install 

The last pip command gives:

 Could not find a version that satisfies the requirement basemap>=1.0.7 (from pyleoclim) (from versions: )
No matching distribution found for basemap>=1.0.7 (from pyleoclim)

JetStream deployment

Installation issues are real (particularly for Windows users, for whom Anaconda is hit or miss, and Basemap is still a major issue). One idea to circumvent them is to run our notebooks on
JetStream (https://jetstream-cloud.org). First, we need to check that it is feasible. Can someone give it a try?

Age model plot

Needs to show only the dates (circles), together with their uncertainties (error bars). No line connecting them unless there is a ChronData table or EnsembleTable in the lipd file.

Upper workflow for spectral

Should we create an upper workflow with all the spectral methods in? In this case, we need to make sure that inputs/ouputs are dictionaries to allow for the variability in outputs for each functions

MSSA/SSA LiPD workflow

enabled SSA as a method for Series in ui.py
enable MSSA as a method for MultipleSeries in ui.py

Cant find @rpath/libiomp5.dylib ref from pyleoclim/f2py_wwz.cpython-36m-darwin.so

Hello again!

If I work around Issue #21 by installing basemap from conda, I can open a python shell or ipython or what have you and run:

import pyleoclim as pyleo

At this point I'm super excited for the wave of paleo awesomeness that is about to hit me. But instead I get:

~/miniconda/envs/spacemonkey/lib/python3.6/site-packages/pyleoclim/__init__.py in <module>()
     29 from pyleoclim import SummaryPlots
     30 from pyleoclim import Plot
---> 31 from pyleoclim import Spectral
     32 from pyleoclim import Stats
     33 from pyleoclim import Timeseries

~/miniconda/envs/spacemonkey/lib/python3.6/site-packages/pyleoclim/Spectral.py in <module>()
     34 
     35 if sys.platform.startswith('darwin'):
---> 36     from . import f2py_wwz as f2py
     37 
     38 '''

ImportError: dlopen(/Users/notarealuser/miniconda/envs/spacemonkey/lib/python3.6/site-packages/pyleoclim/f2py_wwz.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libiomp5.dylib
  Referenced from: /Users/notarealuser/miniconda/envs/spacemonkey/lib/python3.6/site-packages/pyleoclim/f2py_wwz.cpython-36m-darwin.so
  Reason: image not found

And the library is not imported. Looks like it might be an issue with f2py needing an Intel lib.... I thought it could be something with MKL or GDAL...

Installing MKL from conda and then reloading the shell and importing pyleoclim gives me:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-2828cd9a80d8> in <module>()
----> 1 import pyleoclim as pyleo

~/miniconda/envs/spacemonkey/lib/python3.6/site-packages/pyleoclim/__init__.py in <module>()
     32 from pyleoclim import Stats
     33 from pyleoclim import Timeseries
---> 34 from pyleoclim import RBchron
     35 
     36 

~/miniconda/envs/spacemonkey/lib/python3.6/site-packages/pyleoclim/RBchron.py in <module>()
     13 import pandas as pd
     14 import datetime
---> 15 import rpy2.robjects as robjects
     16 from itertools import chain
     17 from rpy2.robjects.packages import importr

~/miniconda/envs/spacemonkey/lib/python3.6/site-packages/rpy2/robjects/__init__.py in <module>()
     14 import itertools
     15 from datetime import datetime
---> 16 import rpy2.rinterface as rinterface
     17 import rpy2.rlike.container as rlc
     18 

~/miniconda/envs/spacemonkey/lib/python3.6/site-packages/rpy2/rinterface/__init__.py in <module>()
     49 del(os)
     50 
---> 51 from rpy2.rinterface._rinterface import (baseenv,
     52                                          emptyenv,
     53                                          endr,

ImportError: dlopen(/Users/notarealuser/miniconda/envs/spacemonkey/lib/python3.6/site-packages/rpy2/rinterface/_rinterface.cpython-36m-darwin.so, 2): Library not loaded: /usr/local/opt/xz/lib/liblzma.5.dylib
  Referenced from: /Users/notarealuser/miniconda/envs/spacemonkey/lib/python3.6/site-packages/rpy2/rinterface/_rinterface.cpython-36m-darwin.so
  Reason: Incompatible library version: _rinterface.cpython-36m-darwin.so requires version 8.0.0 or later, but liblzma.5.dylib provides version 6.0.0

I wasn't able to get around this by updating with packages on the conda-forge repos, either. So, there is still a dependency that not being taken care of?

Unit Tests / CI?

Is there a plan to implement unit tests or continuous integration checks (e.g. TravisCI)? This will definitely ease development as the project grows.

I may be able to help with this if wanted.

Numpy 0.15

We need to check the package for issues that may pop up with the numpy upgrade, specifically the fact that it doesn't accept floats for indices.

Add api.py for upper function (not LiPD workflow)

@fzhu2e and @CommonClimate Feng proposed to do this for the functions that are workflows but don't use a LiPD file for the data.

I agree with him that it will make things cleaner for a user, who won't have to mess with modules if they don't want LiPD.

My only suggestion would be to not name this api.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.