Giter Club home page Giter Club logo

Comments (8)

andykrause avatar andykrause commented on July 21, 2024

The package itself doesn't have a 'partitioning function', but you should be able to do something like:

cities_list <- split(transactions_df, transactions_df$city_name)
cities_hpi <- purrr::map(.x = cities_list,
                                          .f = rtIndex,
                                          ... (your other parameters))

Let me know if you need a more in depth example.

from hpir.

gcasamat avatar gcasamat commented on July 21, 2024

This looks great. Thank you!

from hpir.

gcasamat avatar gcasamat commented on July 21, 2024

Hi.
I tried what you suggest and got the error message : Error: Can't convert a hpiindex object to function
Moreover, I have also an error message when executing plot() with an annual periodicity (it works fine with a monthly periodicity) :

Error in data.frame(x = x$numeric, y = as.numeric(x$value), imp = x$imputed,  : 
  arguments imply differing number of rows: 0, 10

from hpir.

gcasamat avatar gcasamat commented on July 21, 2024

I'm sorry. The first error message was due to a misunderstanding on my side. I corrected, but now get the following error:

"mod_spec" argument must be of class "formula"
Error in hpiModel.hed(model_type = "hed", hpi_df = hed_trans, mod_spec = hed_spec,  : 

from hpir.

gcasamat avatar gcasamat commented on July 21, 2024

I managed to get an output by using .f = modelToIndex. What I don't understand however is that I get the same index series for the two regions in my data (my dataset has been split on these two regions).

from hpir.

gcasamat avatar gcasamat commented on July 21, 2024

I managed to get it work with .f = hedIndex, sorry for all these messages.
So the only remaining error concerns plot() with an annual periodicity.
Thank you.

from hpir.

andykrause avatar andykrause commented on July 21, 2024

@gcasamat. Sorry for all the trouble here. Can you give me a bit more details on the issue you are having with plot()?

from hpir.

andykrause avatar andykrause commented on July 21, 2024

Closing due to lack of response from reporter.

from hpir.

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.