Giter VIP home page Giter VIP logo

Comments (1)

luifrancgom avatar luifrancgom commented on July 25, 2024

Hello Nerd1ngxG

Please check out the data structure of the data set using:

OECD::get_data_structure(dataset = "TABLE2A") |> str()
data_set_structure <- OECD::get_data_structure(dataset = "TABLE2A")

data_set_structure$VAR_DESC |> tibble::as_tibble()
data_set_structure$RECIPIENT |> tibble::as_tibble()
data_set_structure$DONOR |> tibble::as_tibble()
data_set_structure$PART |> tibble::as_tibble()
data_set_structure$AIDTYPE |> tibble::as_tibble()
data_set_structure$DATATYPE |> tibble::as_tibble()

The variable filter_list that you create don't have the necessary dimensions to apply the filter expression to create a data query. If you want to see the necessary variables check the following link

For example this will work:

OECD::get_dataset(dataset = "TABLE2A", 
            filter = "10100.20001", 
            start_time = 2021, end_time = 2021,
            pre_formatted = TRUE)

Or in an equivalent way

new_filter_list <- list(c("10100"),
                        c("20001"))

OECD::get_dataset(dataset = "TABLE2A", 
                  filter = new_filter_list, 
                  start_time = 2021, end_time = 2021,
                  pre_formatted = FALSE)

Where you are getting the following information:

  • 10100 (Developing Countries, Total)
  • 20001 (DAC Countries, Total)

for the year 2021.

Also an alternative solution mention in #14 can be:

OECD::get_dataset(dataset = "TABLE2A", 
                  filter = ".20001", 
                  start_time = 2021, end_time = 2021,
                  pre_formatted = TRUE)

by leaving the first dimension empty in the query or in an equivalent way:

new_filter_list_2 <- list(c(""),
                        c("20001"))

OECD::get_dataset(dataset = "TABLE2A", 
                  filter = new_filter_list_2, 
                  start_time = 2021, end_time = 2021,
                  pre_formatted = FALSE)

Finally as it is mentioned in #6 a possible enhacement in the future will be to specify in your case OECD::get_dataset(dataset = "TABLE2A", DONOR = "20001") but this is not yet develop by the author.

I hope this will help you.

from oecd.

Related Issues (20)

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.