Code Monkey home page Code Monkey logo

Comments (4)

zross avatar zross commented on September 24, 2024

It reports an error for other countries

from hhs_dashboard.

zross avatar zross commented on September 24, 2024

@Court78 below is Abel's code. See where it says HND_hhs? In every other question it uses selectedData() as the input data and selectData() is based on what users select.

So I'm not sure if using just the data for HND_hhs is leftover from, say, error testing and if it should be the selectedData() or if there is a reason why he limited to HND_hhs.

In the old version of the app, other countries generate an error and in the new version, if I use the selectedData() equivalent it seems to work for other countries.

OK to use selectedData() or is there a reason for only Honduras?

else if (input$hhs_question == "70a. What is your households’ average monthly income from all activities, including salaried and non-salaried labor?") {
         ### Currency conversions (USD)
         if (input$Country == "IDN") {
            conversion <- quantmod::getQuote("IDRUSD=X")$Last
         }
         else if (input$Country == "HND") {
            conversion <- quantmod::getQuote("HNLUSD=X")$Last
         }
         else if (input$Country == "PHL") {
            conversion <- quantmod::getQuote("PHPUSD=X")$Last
         }
         else if (input$Country == "MOZ") {
            conversion <- quantmod::getQuote("MZNUSD=X")$Last
         }
         else if (input$Country == "BRA") {
            conversion <- quantmod::getQuote("BRLUSD=X")$Last
         }
         else if (input$Country == "FSM") {
            conversion <- getQuote("USDUSD=X")$Last
         }
         else if (input$Country == "PLW") {
            conversion <- getQuote("USDUSD=X")$Last
         }
         
         ### Q70 What is your households' average monthly income from all activities, including salaried and non-salaried labor? ####
         
         hhs_Q70 <- HND_hhs #%>%
                    # filter (between(
                     #        as.numeric(as.character(`70_hh_average_income`)), 
                    #          10, 1.00e+20)) %>%
                      #           droplevels()

from hhs_dashboard.

Court78 avatar Court78 commented on September 24, 2024

@zross I am not sure why it would be limited to HND_hhs. It shouldn't be.... If this is the case, is the tool returning Honduras data for all countries?

from hhs_dashboard.

zross avatar zross commented on September 24, 2024

No, it generates an error for other countries (but shows up as blank in the tool. This is updated, in image new is on the left, old on the right

image

from hhs_dashboard.

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.