Coder Social home page Coder Social logo

w3ss / datareaders.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juliadatareaders/datareaders.jl

0.0 3.0 0.0 29 KB

A Julia library to get remote data via Requests.jl and get DataFrame (from DataFrames.jl) or TimeArray (from TimeSeries.jl)

License: MIT License

Makefile 0.63% Shell 1.12% Julia 98.25%

datareaders.jl's Introduction

DataReaders.jl

Build Status

Coverage Status

codecov.io

WORK IN PROGRESS!!!

A Julia library to get remote data via Requests.jl and get DataFrames thanks to DataFrames.jl.

Inspired by Pandas-DataReader.

Install

Pkg.clone("https://github.com/JuliaDataReaders/DataReaders.jl.git")

Usage

Import DataReaders

using DataReaders

Google daily finance

One symbol

julia> dr = DataReader("google");

julia> symb = DataSymbol("MSFT");

julia> dt_start = DateTime("2015-04-01");

julia> dt_end = DateTime("2015-04-15");

julia> response = get(dr, symb, dt_start, dt_end);

julia> df = DataFrame(response);

julia> println(df);
10x6 DataFrames.DataFrame
│ Row │ Date       │ Open  │ High  │ Low   │ Close │ Volume   │
┝━━━━━┿━━━━━━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━━━━┥
│ 12015-04-0140.640.7640.3140.7236865322 │
│ 22015-04-0240.6640.7440.1240.2937487476 │
│ 32015-04-0640.3441.7840.1841.5439223692 │
│ 42015-04-0741.6141.9141.3141.5328809375 │
│ 52015-04-0841.4641.6941.0441.4224753438 │
│ 62015-04-0941.2541.6241.2541.4825723861 │
│ 72015-04-1041.6341.9541.4141.7228022002 │
│ 82015-04-1341.442.0641.3941.7630276692 │
│ 92015-04-1441.842.0341.3941.6524244382 │
│ 102015-04-1541.7642.4641.6842.2627343581

Several symbols

julia> dr = DataReader("google");

julia> symbols = DataSymbol.(["IBM", "MSFT"])
2-element Array{DataReaders.DataSymbol,1}:
 DataReaders.DataSymbol("IBM")
 DataReaders.DataSymbol("MSFT")

julia> dt_start = DateTime("2015-04-01");

julia> dt_end = DateTime("2015-04-15");

julia> multi_symbol_response = get(dr, symbols, dt_start, dt_end);

julia> data = DataFrame(multi_symbol_response);

julia> println(data)
DataStructures.OrderedDict(DataReaders.DataSymbol("IBM")=>10x6 DataFrames.DataFrame
│ Row │ Date       │ Open   │ High   │ Low    │ Close  │ Volume  │
┝━━━━━┿━━━━━━━━━━━━┿━━━━━━━━┿━━━━━━━━┿━━━━━━━━┿━━━━━━━━┿━━━━━━━━━┥
│ 12015-04-01160.23160.62158.39159.183700791 │
│ 22015-04-02159.52162.54158.89160.454671578 │
│ 32015-04-06159.69162.8158.7162.043465682 │
│ 42015-04-07161.67163.84161.62162.073147975 │
│ 52015-04-08161.72163.55161.01161.852524323 │
│ 62015-04-09161.7162.47160.72162.342263490 │
│ 72015-04-10162.34163.33161.25162.862515703 │
│ 82015-04-13162.37164.0162.36162.383868911 │
│ 92015-04-14162.42162.74160.79162.32719287 │
│ 102015-04-15162.63164.96162.5164.133498756 │,DataReaders.DataSymbol("MSFT")=>10x6 DataFrames.DataFrame
│ Row │ Date       │ Open  │ High  │ Low   │ Close │ Volume   │
┝━━━━━┿━━━━━━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━━━━┥
│ 12015-04-0140.640.7640.3140.7236865322 │
│ 22015-04-0240.6640.7440.1240.2937487476 │
│ 32015-04-0640.3441.7840.1841.5439223692 │
│ 42015-04-0741.6141.9141.3141.5328809375 │
│ 52015-04-0841.4641.6941.0441.4224753438 │
│ 62015-04-0941.2541.6241.2541.4825723861 │
│ 72015-04-1041.6341.9541.4141.7228022002 │
│ 82015-04-1341.442.0641.3941.7630276692 │
│ 92015-04-1441.842.0341.3941.6524244382 │
│ 102015-04-1541.7642.4641.6842.2627343581 │)

Done / ToDo

Done:

  • Yahoo Finance daily DataReaders
  • Support several symbols for Google Finance daily DataReaders - return as OrderedDict
  • Google Finance daily DataReaders (only one symbol at a time)
  • Unit testing
  • Continuous Integration

ToDo:

datareaders.jl's People

Contributors

femtotrader avatar

Watchers

James Cloos avatar Wendel G. Santana avatar  avatar

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.