Coder Social home page Coder Social logo

roomba's People

Contributors

aedobbyn avatar christinestawitz-noaa avatar cstawitz avatar gvelasq avatar ivelasq avatar jimhester avatar ldecicco-usgs avatar wcsherb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

roomba's Issues

every time I read a Json I get internal error warning on R_decompress1

anytime I use roomba and using xml2 package without roomba (I had to uninstall to use xml2 properly):
Warning messages:
1: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
2: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
3: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
4: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1

Move hexsticker up to the level of the package name in README

Hello roomba team, excellent work!

This is a minor suggestion to move the hexsticker up to the level of the package name in the README, to match e.g. the janitor package (among others):

image

If there's support for this, I would be happy to put in a PR, along the lines of:

# roomba <img src="./img/sticker.png" height="200px" align="right" />

Create a working example with sample nested list

x <- '{
"stuff": {
"buried": {
"deep": [
{
  "goodstuff": "here",
  "name": "Bob Rudis",
  "secret_power": 5
},
  {
  "goodstuff": "here",
  "name": "Amanda Dobbyn",
  "secret_power": 4, 
  "more_nested_stuff": 4
  }
  ],
  "alsodeep": 2342423234,
  "deeper": {
  "foo": [
  {
  "goodstuff": 5,
  "name": "barb"
  }
  ]
  }
}
}}'

make shiny app plot not hardwired

Right now the shiny app is hardwired to work with specific values returned from the twitter data. Should eventually be smart about figuring out what's a date item.

error when installing roomba

Hi, thanks for a great package. I get the following error when installing roomba. @bretsw got the same error when doing this, too.

> devtools::install_github("ropenscilabs/roomba")
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo ropenscilabs/roomba@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                          
2: CRAN packages only           
3: None                         
4: dplyr (1.0.0 -> 1.0.1) [CRAN]

Enter one or more numbers, or an empty line to skip updates:
✓  checking for file ‘/private/var/folders/xd/xrgmmrv97355mcjtmjqcr72w0000gp/T/RtmpY8sBFU/remotes81353287bca2/ropenscilabs-roomba-ef3b84f/DESCRIPTION’ ...
─  preparing ‘roomba’:
✓  checking DESCRIPTION meta-information ...
   Warning in grepl(e, files, perl = TRUE, ignore.case = TRUE) :
     PCRE pattern compilation error
   	'unrecognized character follows \'
   	at 'images$'
   Error in grepl(e, files, perl = TRUE, ignore.case = TRUE) : 
     invalid regular expression '^\images$'
   Execution halted
Error: Failed to install 'roomba' from GitHub:
  System command 'R' failed, exit status: 1, stdout + stderr:
E> * checking for file ‘/private/var/folders/xd/xrgmmrv97355mcjtmjqcr72w0000gp/T/RtmpY8sBFU/remotes81353287bca2/ropenscilabs-roomba-ef3b84f/DESCRIPTION’ ... OK
E> * preparing ‘roomba’:
E> * checking DESCRIPTION meta-information ... OK
E> Warning in grepl(e, files, perl = TRUE, ignore.case = TRUE) :
E>   PCRE pattern compilation error
E> 	'unrecognized character follows \'
E> 	at 'images$'
E> Error in grepl(e, files, perl = TRUE, ignore.case = TRUE) : 
E>   invalid regular expression '^\images$'
E> Execution halted
> 

ability to rename columns?

This package is very exciting, great work! Our dataspice team was thrilled to see how nicely it already handles common requests on a dataspice.json file, e.g.:

library(roomba)
json <- jsonlite::read_json("https://raw.githubusercontent.com/ropenscilabs/dataspice/master/inst/metadata-tables/dataspice.json")

## Works nicely when all columns come from same level of nesting:
json %>% roomba(c("givenName", "familyName"))
json %>% roomba(c("value", "unitText", "description"))

It would be great if the cols argument could take a named list that could also rename the output columns on the fly:

json %>% roomba(c("value", units = "unitText", "description")),

Depending on roomba

I am writing an R API package and, playing with roomba, it will save me a bunch of thinking and lines of code to snarf the data I want. What is your reaction to me wanting to depend on roomba?

I guess that's a general question so more specifically, how likely is it that roomba would make it to CRAN some day and how far away from CRAN-ready is it?

And then other options I see are, I could build initially with roomba and then later replace with more explicit parsing of the nested data, or house roomba code internally to the package.

I love this package and value your opinions about how to appropriately make the most of it! 🙏

Reddit data not working

reddit <- jsonlite::fromJSON("data/topknitting.json", simplifyVector = FALSE)
y_reddit <- reddit %>% roomba:::replace_null()

y_reddit %>% dfs_idx(~ length(.x$title) > 0) %>%
  purrr:::map_dfr(~ y_reddit[[.x]])
Error in bind_rows_(x, .id) : Argument 39 must be length 1, not 2

Working across different levels of nesting?

This package is very exciting, great work! Our dataspice team was thrilled to see how nicely it already handles common requests on a dataspice.json file, e.g.:

library(roomba)
json <- jsonlite::read_json("https://raw.githubusercontent.com/ropenscilabs/dataspice/master/inst/metadata-tables/dataspice.json")

## Works nicely when all columns come from same level of nesting:
json %>% roomba(c("givenName", "familyName"))
json %>% roomba(c("value", "unitText", "description"))

But not clear how to get a repeated column from a different level of nesting:

json %>% roomba(c("value", "unitText", "description", "box"))

Probably requires some kind of notation to indicate the different levels, e.g. in this case maybe something like

json %>% roomba(c("variableMeasured.value", 
                                   "variableMeasured.unitText", 
                                   "variableMeasured.description", 
                                   "spatialCoverage.geo.box"))

would be possible?

When keep = any, keep rows that are completely null and assign them NA in all cols

Maybe this requires another argument like keep_all_rows.

In the example below, I think we should allow the user some way to end up with 4 rows instead of 3. The third row corresponding to baz should be all NAs.

It would be useful in cases I can imagine for the user to know that they got 4 distinct outputs back and that one of them was fully null.

library(magrittr)

some_json <- '
{
  "foo": [{
    "a": 1,
    "b": 2,
    "c": 3
  }],
  "bar":[{
    "a": 4,
    "b": null,
    "c": 6
  }],
  "baz": [],
  "bing":[{
    "c": 12
  }]
}
'

lst <- some_json %>% jsonlite::fromJSON()

lst %>% roomba::roomba(cols = c("a", "b", "c"), keep = any)
#>    a b c
#> 1  1 2 3
#> 2  4 NA 6
#> 3  NA NA 12

So what I think this should look like is:

#>    a  b  c
#> 1  1  2  3
#> 2  4  NA 6
#> 3  NA NA NA
#> 4  NA NA 12

Mostly useful when the user knows they're passing x number inputs to an API and expecting x outputs, even if some of those outputs are empty.

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.