Giter VIP home page Giter VIP logo

algoskynet / macrodatabase Goto Github PK

View Code? Open in Web Editor NEW

This project forked from data-sources-exemples/macrodatabase

0.0 0.0 0.0 3.4 GB

This is a macro database of 570.000+ data series containing International Data (150+ countries), Interest Rates, Inflation, Monetary Data, U.S. (regional) data, Commodities, Real Estate and so much more. U.S. States and Countries curation is also included.

Home Page: https://openbb.co/

License: MIT License

macrodatabase's Introduction

Logo

Macro Database ๐ŸŒŽ

It's one thing to understand companies existing in countries, sectors and industries and another to understand movements within these categories due to macroeconomics. The former is attempted to be solved with FinanceDatabase and the MacroDatabase is an attempt to cover the latter.

Within this database of over 570.000 datasets, you are able to view an incredibly large amount of financial indicators (e.g. GDP, employment rates, interest & inflation rates), prices (e.g. commodities, CPIs and housing indices), an extensive variety of country data (e.g. government bond yields of the Netherlands, real consumption of households in Japan) and so much more.

Category Datasets
Prices 10,406
U.S. Regional Data 418,232
Money, Banking, & Finance 11,585
Production & Business Activity 3,777
Academic Data 14,880
National Accounts 12,448
International Data 95,706
Population, Employment, & Labor Markets 9,077
Total 576,111

Find an overview of the largest categories within the database here. The categorisation comes from the Federal Reserve Economic Data (FRED) database and this repository aims to make sense of all the data within these categories.

Table of Contents

  1. Using the Database
  2. Questions & Answers
  3. Contribution

Using the Database

To access the database you can download the entire repository, but I strongly recommend making use of the package closely attached to the database. It allows you to select specific json files as well as search through collected data with a specific query.

Installation

You can install the package with the following steps:

  1. pip install macrodatabase
  2. (within Python) import macrodatabase as md

Functions

The package has the following functions:

  • show_country_options(search=None, category=None, parameter=None) - gives curated country options. If no parameter is provided, gives all options. If search is provided, searches with this query and if category or parameter is provided, gives a specific selection.
  • show_states_options(search=None, category=None, parameter=None) - gives curated states options. If no parameter is provided, gives all options. If search is provided, searches with this query and if category or parameter is provided, gives a specific selection.
  • show_database_options(search=None, include_discontinued=False) - gives all options within the database given a certain search term or all if no search term is provided.
  • select_country_data(category, parameter, country=None, unit=None, period=None, seasonality=True) - gives a certain set of curated country data based on the parameters given. E.g. "GDP" and "Liquid Liabilities to GDP". You can also specify the unit, period and seasonality to get specific types of data. If not provided, the function returns all types.
  • select_states_data(category, parameter, state=None, unit=None, period=None, seasonality=True) - gives a certain set of curated state data based on the parameters given. E.g. "Real Estate" and "Housing Inventory: Average Listing Price". You can also specify the unit, period and seasonality to get specific types of data. If not provided, the function returns all types.
  • select_database_data(parameter) - grab data from the whole database. This follows the structure that can be obtained via show_database_options. E.g. to select Mortgage Rates you would use 'Interest Rates/Mortgage Rates'.
  • collect_data(ids, api_key, show_progress=True) - based on IDs, collect data via the FREDAPI package. This allows you to instantly collect all data for the curated list. For example, all countries you can find within 'Liquid Liabilities to GDP' (150+).

Questions & Answers

In this section you can find answers to commonly asked questions. In case the answer to your question is not here, consider creating an Issue.

  • How did you get your data?
  • Which countries and states are supported?
  • How can I find out which options exists?
    • For this you can use the show_country_options function for the Curated Countries, show_state_options for the Curated States and show_database_options function for general database querying.
  • How frequently does the Database get updated?
    • Every sunday this database gets refreshed via GitHub Actions. See Methodology for how this is done.

Contribution

Projects are bound to have (small) errors and can always be improved. Therefore, we highly encourage you to submit issues and create pull requests to improve the package.

macrodatabase's People

Contributors

actions-user avatar jerbouma 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.