Skip to content
/ ONS.jl Public

Julia interface to the Office of National Statistics API

License

Notifications You must be signed in to change notification settings

ZacLN/ONS.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ONS

Build Status

Coverage Status

codecov.io

Exported functions

search_datasets(q, start = 0)

Search for timeseries on string q, returns 100 results. For the next page of 100 results increase start. Returns a Record of MetaData objects whose items can be selected using array access.

get_data(md::MetaData)

Returns a Data object whose data can be accessed at :yearly, :quarterly or :monthly where available.

Example

using ONS
md = search_datasets("8102000200")
ts = get_timeseries(md[1])

display(md)

Total items: 1
Displaying: 1:50

1.
8102000200: Processed & Preserved Fish, Crustaceans & Molluscs - Non EU Imports
  dataset    : MM22
  timeseries : K3G9

display(ts)

"8102000200: Processed & Preserved Fish, Crustaceans & Molluscs - Non EU Imports"
  Annual data from 1998 to 2016
  Quarterly data from 1998:Q1 to 2017:Q2
  Quarterly data from 1996:January to 2017:June

ts[:monthly]

258-element Array{Float64,1}:
   0.0
   0.0
   0.0
   0.0
   0.0
   ⋮
 150.9
 153.0
 151.5
 155.1
 156.7

About

Julia interface to the Office of National Statistics API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages