mattcocci / fredfetch Goto Github PK
View Code? Open in Web Editor NEWFor pulling current and vintage date from FRED and ALFRED API
For pulling current and vintage date from FRED and ALFRED API
Some inefficiencies that stand out include:
GlobalOptions
for every callparworkers
, 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 desiredThese 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.
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
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.