Giter Site home page Giter Site logo

cheatcraft's People

Contributors

corb1999 avatar poupoungrey avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

poupoungrey

cheatcraft's Issues

function to write out versions of packages used

write a function/snippet that will identify all packages used in a script and their versions and then compile that information into a dataframe and write it out as metadata. this could probably be done with an existing package like packrat, so maybe look there for inspo, but would be good practice to try and build something proprietary. may ultimately be put into skelly repo/project instead of cheatcraft

design and build a date filter setup function

tired of having to type so much to alter my analysis scripts to correctly print a timeframe's title and to get the filter to adjust appropriately, and this can also create errors.

i would prefer to have a function that if supplied a year and month number it can then give me filter dates to pass to a filter function in a dplyr pipe, and will print me a nice quick text label of what timeframe i am looking at

maybe a function that takes years and months as args and then returns a list object, with one part of the list being the formated date values which can be passed to a dplyr pipe and the other part of the list a text value that summarizes the timeframe in a way that it can be included as a title/subtitle/caption that can be included in a ggplot or a table exhibit

prototype a synthetic data builder

create a snippet that helps generate synthetic data that can be used either to test other scripts or functions, or can be used as filler for visuals that are being designed. the snippet should help make different complex types of data and should be able to make datasets that resemble real world datasets that are encountered in industry

HHI calculation function

LINK

create a generic function that can accept a vector of nominal values and calculate the HHI. Can be useful for marketshare analysis or other distribution/concentration/fragmentation analysis

add median reference points and ref lines to simple regression function

want to add a little more information to the simple regression visualization function. want to add a layer to the plot that plots a single point which is the median x and median y value, and also add some reference vlines and hlines. think it could be another helpful layer in the visual. make it the first layer so it does not distract from the more important scatter plot and regression line.

Build the unionizer

Write a script template that can read and combine multiple disparate but similar files into one combined data object. @corb1999

Build bulk column selector script

Write a script that serves as a template for manually naming a number of columns from a very wide dataset without a helpful column naming schema

add better variable name mapping to simple regression visual function

right now the function would require the variables you want to plot to be renamed to the format that fits the function argument names. instead, i want to pass the dataframe, and name the variables that will be plotted, so that the function snippet does not have to be rewrittten in order to be useful.

create timestamper function

create a function for printing a timestamp to be included in a filepath, extract something like this from this fun:

qp <- function(pltname, pltpath_suffix = NA, plt_inch = 5) {
plt_timestamp <- paste(year(Sys.time()), month(Sys.time()),
day(Sys.time()), hour(Sys.time()), minute(Sys.time()),
floor(second(Sys.time())), sep = "-")
aa <- ifelse(is.na(pltpath_suffix), "", pltpath_suffix)
plt_filepath <- paste0(getwd(), aa)
plt_name <- paste0("plt_", pltname, "_", plt_timestamp, ".png")
ggsave(filename = plt_name, plot = last_plot(),
path = plt_filepath, scale = 1, device = "png",
height = plt_inch, width = plt_inch * 1.61803399, units = "in")}

Build data read and write code snippets

Create a script containing best practice snippets for reading data from different places and for common writing operations. The idea being that these can just be popped into any script, slightly adapted, and then run. This saves a few lines of typing each time and enforces consistent, repeated patterns in code. @corb1999

enhance my_gg with a render timestamp

play around and see if there is a way to add some kind of component to the function that will append a timestamp of when the plot was generated

just have to make sure it does not overwrite or cause problems with any of the other plot components, like if there is already a caption

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.