Code Monkey home page Code Monkey logo

lts's People

Contributors

lorentzben avatar

Watchers

 avatar

lts's Issues

Refactor Plots

The issue originated with the interval1 in the x axis, this is the updated one, but there are 2-3 calls per room so that is a couple blocks to update, a function that obfuscates this and saves a .png would be easier with the option to pass a room, filename, and dataframe/tibble in.

room_11_sb_night_plot <- ggplot(data = night_flat, aes(x = as.Date(ymd_hms(as.POSIXct.numeric(as.numeric(interval1),origin="1970-01-01"))), y=values, fill=ind)) + 
geom_bar(stat="identity") +
theme_bw() +  
xlab("Day of Study") + 
ylab("Prop. of Time Spent in Zone") +
scale_x_date(breaks= datebreaks, minor_breaks=all_datebreak) + 
theme(axis.text.x = element_text(angle = 45, hjust = 1)) + 
ggtitle("Daily Time Budget for Each Night for Room 8") + 
labs(fill = "Zone") +
scale_y_continuous(limits=c(0, y_lim))

Update R version to most recent

Currently the package is developed under R 4.1.0, but a more recent version of R 4.3.3 exists and the package should be migrated if possible.

Dependencies seem like they will be the most difficult part to migrate.

Bring in all tests from tests.R

I have pulled in one example test dataset but I have generated 3 previously. I want to bring them in to ensure code coverage.

Refactor get_time_budget_prop

The current get_time_budget_prop expects a column "Subzone" with the value of c("bottom","middle","top") and I want to extend functionality to use any named column and any number of zones, we just need to develop the logic that calculates each zone.

Refactor for Extensibility

In two functions (identify_duplicates, slice_tsibble) I reference columns like datetime, etc.
To fix this and make the package more useable I want to add two arguments:

identify_duplicates(record_table,datetime,value)
slice_tsibble(data,start,stop,datetime,value)

This should hopefully be a fairly straightforward refactor

Refactor datebreak and all_datebreaks

Refactor get_datebreaks to be a function and to standardize the use of as.date and as.POSIXct as opposed to YMD HMS because of the: data.frame(matrix(unlist(current_day_tb), nrow=length(current_day_tb), byrow=T)) which messes up the datetime

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.