Opened 9 months ago

Last modified 12 days ago

#22423 assigned enhancement

Refactor R code to use modern R packages and methods

Reported by: johnbwilliams Owned by: iwakeh
Priority: Medium Milestone:
Component: Metrics/Website Version:
Severity: Minor Keywords: plot_networksize()
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

plot_networksize() has been refactored to use modern R packages & methods,
resulting in readable, maintainable code. Details here: http://rpubs.com/johnbwilliams/refactor. Minor adjustments are needed to drop in place. Package dependencecy considerations apply.

Child Tickets

Change History (5)

comment:1 Changed 5 months ago by karsten

Summary: plot_networksize() refactorRefactor plot_networksize() to use modern R packages and methods

Tweak summary.

comment:2 Changed 2 weeks ago by karsten

Owner: changed from metrics-team to karsten
Status: newaccepted
Summary: Refactor plot_networksize() to use modern R packages and methodsRefactor R code to use modern R packages and methods

I'll pick this up and extend it to all R code we have, after writing more recent R code with help of dplyr and tidyr.

johnbwilliams, if you're still around, maybe you'd like to review the changes?

comment:3 Changed 2 weeks ago by karsten

I started making changes and pushing them to master. No need to do the full review process before merging here, it's just presentation. I'll make more changes over the next few days.

comment:4 Changed 12 days ago by karsten

Owner: changed from karsten to metrics-team
Status: acceptedassigned

I made more changes, but I need to pause for a while and do other stuff now. In the meantime I'm giving this ticket back to the metrics-team pool.

If somebody feels like reviewing some R code, please take a look at the three functions at the end of graphs.R, namely plot_relays_ipv6, plot_bridges_ipv6, and plot_advbw_ipv6: https://gitweb.torproject.org/metrics-web.git/tree/src/main/R/rserver/graphs.R#n1097 ; these would then serve as blueprints for the other graphs.

comment:5 Changed 12 days ago by iwakeh

Owner: changed from metrics-team to iwakeh

Grabbing the review to also push #24707 a little.

Note: See TracTickets for help on using tickets.