TidierOrg / TidierData.jl

Tidier data transformations in Julia, modeled after the dplyr/tidyr R packages.
MIT License
86 stars 7 forks source link

Extending clean_name macro #97

Closed CyuHat closed 6 months ago

CyuHat commented 7 months ago

Hi! First of all, I wanted to take a moment to express my gratitude for creating the Tidier.jl package suite. As someone transitioning from R, it has made my entry into Julia much smoother and more comfortable. Your work is truly impressive!

Now, onto my query: I've been using the nice @clean_names() macro in TidierData.jl and was comparing it to the janitor::clean_names() function from R. While both serve a similar purpose, there are some additional features that I believe could enhance its functionality (like converting "%" in "percent" or removing quotation marks). For instance, the following code:

using Tidier

@chain DataFrame("can't pronounce é (%)" => 1) begin
    @clean_names()
    names()
end

prints the following column name: can't_pronouce_é_(%) while the R version gives cant_pronounce_e_percent.

Looking at the source code, it seems you are leveraging Cleaner.jl for this task. I was curious if you had any plans to expand upon these improvements and if so, where you might choose to implement them? Would you consider doing the changes directly within TidierData.jl or perhaps in Cleaner.jl itself? I woud be open to help in any way I can, should you wish to collaborate on this effort together.

Thank you for your work!

kdpsingh commented 7 months ago

Thanks @CyuHat. Indeed, we have been wrapping the Cleaner.jl package's polish_names() function within TidierData to provide the janitor-like functionality within the @clean_names macro.

@TheRoniOne, the developer of Cleaner.jl, has been very open to making updates to the package to bring it more in line with janitor and has already addressed a handful of issues reported by TidierData users. He is open to PRs on Cleaner.jl.

If you would like to collaborate on this functionality, my recommendation would be to open issues over at Cleaner.jl and to work on PRs addressing those issues for @TheRoniOne to review.

We will make sure that TidierData dependencies are updated to support any updates to Cleaner.jl.

CyuHat commented 7 months ago

Hi @kdpsingh, thank you so much for taking the time to help me out. I really appreciate it! I will reach out to TheRoniOne now to follow up.

kdpsingh commented 6 months ago

Thanks @CyuHat! That's great to hear. Going to close this issue for now. Feel free to open another one if you run into any bumps while using the package.