Giter Site home page Giter Site logo

fredfetch's People

Contributors

mattcocci avatar micahjsmith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fredfetch's Issues

Refactor entire thing into Matlab class?

Some inefficiencies that stand out include:

  • needing to create a new GlobalOptions for every call
  • needing (further) to load the API key from the text file for every call
  • needing to call parseVarargin for many calls, whereas parworkers, pseudo, and units presumably should all be global options - that is, they are set once at the beginning of the session and the explicitly changed as desired

These behaviors can be achieved easily by having an object of class fred or of class FredFetch be created at the beginning of the session:

f = fred(MY_API_KEY,'defaultUnits','lin')
% alternately
f = FredFetch(MY_API_KEY)
set(f, 'defaultParWorkers',3) % one way to set/get fields of object
f.defaultOtherOption = 'hello' % another way to set/get fields of object

Then, a future call is made as:

latest(f, 'GDCP1')
% or, completely equivalent syntactically
f.latest('GDPC1')

The object f already has "embedded" all the relevant global options and the API key without needed to do everything from scratch. This is also what the actual Matlab Datafeed Toolbox fred routines (as for all other data sources) do.

See my bls interface
for a simple example of what this looks like/how it is implemented.

reshapeByVint not implemented

fred.latest({'GDPC1','PAYEMS'}) fails due to the missing method reshapeByVint. Until it is implemented, would comment out that line, replace with error('Not Implemented.'), and set the default toDatasetByVint in private/parseVarargin to 0.

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.