Git Product home page Git Product logo

datos's People

Contributors

d4tagirl avatar darh78 avatar edgararuiz avatar edgararuiz-zz avatar jbkunst avatar kant avatar maurolepore avatar pachadotdev avatar paocorrales avatar rivaquiroga 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

datos's Issues

estructura de `mtautos`

¡Hola!
En mtautos se pierden los nombres de los modelos de los autos porque en mtcars no están guardados en una columna. Eso hace que:

select(mtcars, mpg, cyl, disp) %>% 
  head()

tenga un output distinto que:

select(mtautos, millas, cilindros, cilindrada) %>% 
  head()

Add badges

Possibly useful badges include experimental, cran, travis, ...

problem with gapminder

When running install.packages("datos") in a fresh R installation on Windows, gapminder is not installed, but datos still installs but the table paises fails unless you type install.packages("gapminder").
This did not happen during Dec, 2019 while we where in the middle of R4DS translation.

Add the dataset stringr::sentences

Just a reminder that stringr::sentences has not yet been added to data/ (despite #43). There are already may datasets in data/ -- suggesting there is a procedure already in place. Is there anything I can do?
I would add the following line in data-raw/data.R

oraciones <- stringr::sentences
usethis::use_data(oraciones, overwrite = TRUE) 

And I would do that for all datasets. That way data-raw/data.R clearly shows where each dataset comes from and the data is efficiently compressed during save into data/.

Suggest e Imports

Hola, vengo con más dudas 😅

  1. En un ambiente limpo (rstudio.cloud) instalo tidyverse y datos, todo ok 😄.
  2. Quiero usar los datos datos::vehiculos los cuales no encontró dado que no existía la dependencia fueleconomy pues no estaba en los Imports.
  3. Vi que estaba en los Suggest junto a otros, por lo que ingenuamente intenté install.packages("datos", dependencies = "Suggests")
  4. Pero, pero, peeero no noté que en dicha lista existían testthat y covr y comenzó con a instalar una gran lista de paquetes que no necesito, ni tampoco deseo descargarlos.

Dado que que estos dos últimos son -de forma general- para desarrolladores , creen que es mejor removerlos del suggest? O en su alternativa, cambiar todo lo referente de paquete de datos a imports?

datos using old format for grouped data frames

This shows up as part of our reverse dependency checks for dplyr 1.0.0.

I have not looked in details yet, but it looks like a grouped data frame that was saved previously in the data/ directory before we changed how grouped data frames are structured in dplyr 0.8.0

The format is no longer supported in dplyr 1.0.0, and so we get this:

[master] 96.7 MiB ❯ revdepcheck::revdep_details(revdep = "datos")
══ Reverse dependency check ═════════════════════════════════════ datos 0.2.0 ══

Status: BROKEN

── Still failing

✖ checking data for non-ASCII characters ... NOTE

── Newly failing

✖ checking for missing documentation entries ... ERROR
✖ checking tests ...
✖ checking S3 generic/method consistency ... WARNING
✖ checking for code/documentation mismatches ... WARNING
✖ checking Rd \usage sections ... NOTE

── Before ──────────────────────────────────────────────────────────────────────
❯ checking data for non-ASCII characters ... NOTE
    Note: found 259 marked UTF-8 strings

0 errors ✔ | 0 warnings ✔ | 1 note ✖

── After ───────────────────────────────────────────────────────────────────────
❯ checking for missing documentation entries ... ERROR
  Error: Corrupt grouped_df data using the old format
  Backtrace:
       █
    1. ├─tools::undoc(package = "datos")
    2. │ └─base::Filter(...)
    3. │   ├─base::unlist(lapply(x, f))
    4. │   └─base::lapply(x, f)
    5. │     └─tools:::FUN(X[[i]], ...)
    6. └─base::eval(...)
    7.   └─base::eval(...)
    8.     └─tools:::translate("common.yml")
    9.       ├─base::suppressWarnings(dplyr::group_vars(df))
   10.       │ └─base::withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
   11.       ├─dplyr::group_vars(df)
   12.       └─dplyr:::group_vars.data.frame(df)
   13.         ├─dplyr::setdiff(names(group_data(x)), ".rows")
   14.         ├─dplyr::group_data(x)
   15.         └─dplyr:::group_data.grouped_df(x)
   16.           └─dplyr::validate_grouped_df(.data)
  Execution halted

❯ checking tests ...
  See below...

❯ checking S3 generic/method consistency ... WARNING
  Error: Corrupt grouped_df data using the old format
  Backtrace:
       █
    1. ├─tools::checkS3methods(package = "datos")
    2. │ └─base::Filter(function(f) is.function(code_env[[f]]), objects_in_code)
    3. │   ├─base::unlist(lapply(x, f))
    4. │   └─base::lapply(x, f)
    5. │     └─tools:::FUN(X[[i]], ...)
    6. └─base::eval(...)
    7.   └─base::eval(...)
    8.     └─tools:::translate("common.yml")
    9.       ├─base::suppressWarnings(dplyr::group_vars(df))
   10.       │ └─base::withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
   11.       ├─dplyr::group_vars(df)
   12.       └─dplyr:::group_vars.data.frame(df)
   13.         ├─dplyr::setdiff(names(group_data(x)), ".rows")
   14.         ├─dplyr::group_data(x)
   15.         └─dplyr:::group_data.grouped_df(x)
   16.           └─dplyr::validate_grouped_df(.data)
  Execution halted
  See section ‘Generic functions and methods’ in the ‘Writing R
  Extensions’ manual.

❯ checking for code/documentation mismatches ... WARNING
  Error: Corrupt grouped_df data using the old format
  Backtrace:
       █
    1. ├─tools::codoc(package = "datos")
    2. │ └─base::Filter(...)
    3. │   ├─base::unlist(lapply(x, f))
    4. │   └─base::lapply(x, f)
    5. │     └─tools:::FUN(X[[i]], ...)
    6. │       └─base::get(f, envir = code_env)
    7. └─base::eval(...)
    8.   └─base::eval(...)
    9.     └─tools:::translate("common.yml")
   10.       ├─base::suppressWarnings(dplyr::group_vars(df))
   11.       │ └─base::withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
   12.       ├─dplyr::group_vars(df)
   13.       └─dplyr:::group_vars.data.frame(df)
   14.         ├─dplyr::setdiff(names(group_data(x)), ".rows")
   15.         ├─dplyr::group_data(x)
   16.         └─dplyr:::group_data.grouped_df(x)
   17.           └─dplyr::validate_grouped_df(.data)
  Execution halted

❯ checking Rd \usage sections ... NOTE
  Error: Corrupt grouped_df data using the old format
  Backtrace:
       █
    1. ├─tools::checkDocStyle(package = "datos")
    2. │ └─base::Filter(...)
    3. │   ├─base::unlist(lapply(x, f))
    4. │   └─base::lapply(x, f)
    5. │     └─tools:::FUN(X[[i]], ...)
    6. │       └─base::get(f, envir = code_env)
    7. └─base::eval(...)
    8.   └─base::eval(...)
    9.     └─tools:::translate("common.yml")
   10.       ├─base::suppressWarnings(dplyr::group_vars(df))
   11.       │ └─base::withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
   12.       ├─dplyr::group_vars(df)
   13.       └─dplyr:::group_vars.data.frame(df)
   14.         ├─dplyr::setdiff(names(group_data(x)), ".rows")
   15.         ├─dplyr::group_data(x)
   16.         └─dplyr:::group_data.grouped_df(x)
   17.           └─dplyr::validate_grouped_df(.data)
  Execution halted
  The \usage entries for S3 methods should use the \method markup and not
  their full name.
  See chapter ‘Writing R documentation files’ in the ‘Writing R
  Extensions’ manual.

❯ checking data for non-ASCII characters ... NOTE
    Error loading dataset 'comunes':
     Error : Corrupt grouped_df data using the old format

    Note: found 259 marked UTF-8 strings

── Test failures ───────────────────────────────────────────────── testthat ────

> library(testthat)
> library(datos)
>
> test_check("datos")
── 1. Error: Load from spec works for:comunes (@test-translations.R#25)  ───────
Corrupt grouped_df data using the old format
Backtrace:
 1. datos:::translate(x$file)
 5. dplyr:::group_vars.data.frame(df)
 8. dplyr:::group_data.grouped_df(x)
 9. dplyr::validate_grouped_df(.data)

══ testthat results  ═══════════════════════════════════════════════════════════
[ OK: 153 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
1. Error: Load from spec works for:comunes (@test-translations.R#25)

Error: testthat unit tests failed
Execution halted

2 errors ✖ | 2 warnings ✖ | 2 notes ✖

Release datos 0.3.0

Relates to #108

Prepare for release:

Status: 1 NOTE
* New submission
* Package was archived on CRAN
  • rhub::check_for_cran():

2020-06-02, branch remote-checks:

https://builder.r-hub.io/status/datos_0.2.0.9000.tar.gz-8592b3e7079d455ca960414aeee26cb2
https://builder.r-hub.io/status/datos_0.2.0.9000.tar.gz-bc4490152da84b8eb26f11c94e3501ad
https://builder.r-hub.io/status/datos_0.2.0.9000.tar.gz-acbc755df10e41c1b301bf57744d5723

I see a problem on rhub with r-devel running on windows that I don't see with devtools::check_win_devel(). The problem may relate to rhub only. translate() errors on rhub with Windows and R-devel. The error refers to vctrs and is likely caused vctrs 0.3.0 is required by some package we depend on (likely dplyr) but vctrs 0.3.0 may not be on rhub right now. But we had no problem with devtools::check_win_devel() -- which is what CRAN will test. I would submit anyway.

> rhub::check(platform = "windows-x86_64-devel")


Build ID:	datos_0.2.0.9000.tar.gz-55eebba3fe624d43b20add2f431cd3d7
Platform:	Windows Server 2008 R2 SP1, R-devel, 32/64 bit
Submitted:	4 minutes 11.1 seconds ago
Build time:	4 minutes 9 seconds
ERRORS:
* checking for missing documentation entries ... ERROR
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'vctrs' 0.2.4 is already loaded, but >= 0.3.0 is required
Calls: <Anonymous> ... unlist -> lapply -> FUN -> eval -> eval -> translate
Execution halted
* checking tests ...
  Running 'testthat.R'
 ERROR
Running the tests in 'tests/testthat.R' failed.
Last 13 lines of output:
   10. base::loadNamespace(name)
   12. base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
  == testthat results  ===========================================================
  1. Error: Load from spec works for:tabla1 (@test-translations.R#25) 
  
  2. Error: Load from spec works for:tabla2 (@test-translations.R#25) 
  [ OK: 125 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 7 ]
  3. Error: Load from spec works for:tabla3 (@test-translations.R#25) 
  4. Error: Load from spec works for:tabla4a (@test-translations.R#25) 
  5. Error: Load from spec works for:tabla4b (@test-translations.R#25) 
  6. Error: Load from spec works for:tabla5 (@test-translations.R#25) 
  7. Error: Load from spec works for:oms (@test-translations.R#25) 
  
  Error: testthat unit tests failed
  Execution halted
  • Update cran-comments.md

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • Update install instructions in README

Tabla con información del dataset original

Este es el plan que tenía para la tabla de la sección "Traducción" del Readme. Es decir, agregar una columna con la variable source para que quede claro cuál es la versión original de cada dataset traducido:

Nombre Título Dataset original
aerolineas Nombres de aerolíneas nycflights13::airlines
aeropuertos Datos de aeropuertos nycflights13::airports
atmosfera Datos atmosféricos nasaweather::atmos
etc. ... ...

Y casi me resulta, pero tengo dos problemas:

  1. Como la variable source (línea 45) la lee desde los archivos YAML, no está la información sobre datos-strings.
  2. Como tuvimos que hacer un arreglo en mtautos, en ese caso source no es datasets:mtcars, sino tibble::rownames_to_column(datasets::mtcars, \"model\"), por lo que no se ve bien en la tabla.

Se me ocurren varias formas de resolverlo, pero ninguna es demasiado elegante. Así que dejo esto por acá mientras sigo pensando en una solución más simple.

R CMD check results with problematic platforms

CRAN check results showed warnings with r-devel on platforms debian-gcc, debian-clang, fedora-gcc, and fedora-gcc. Since then we fixed some problems. On rhub I now see the the same warnings and notes on all platforms.

Code and links to results for each platform:

# https://builder.r-hub.io/status/datos_0.2.0.tar.gz-97c6d8bc5a614966a0ea908d5021662e
rhub::check(platform = "debian-gcc-devel")

# https://builder.r-hub.io/status/datos_0.2.0.tar.gz-5a32095bdec540e0bbb661e1e771200f
rhub::check(platform = "fedora-gcc-devel")

# https://builder.r-hub.io/status/datos_0.2.0.tar.gz-0472638c1bfc4ef7919db99a9055dda8
rhub::check(platform = "debian-clang-devel")

# https://builder.r-hub.io/status/datos_0.2.0.tar.gz-02fc7ebaf90c4ab58c7b8d1a61989c34
rhub::check(platform = "fedora-clang-devel")

WARNING

  Note: significantly better compression could be obtained
        by using R CMD build --resave-data
           old_size new_size compress
  data.rda   22.8Mb   14.3Mb       xz

NOTE

* checking installed package size ... NOTE
  installed size is 24.2Mb
  sub-directories of 1Mb or more:
    data  23.7Mb
* checking data for non-ASCII characters ... NOTE
  Note: found 54160 marked UTF-8 strings

I hope to explore them soon and hopefully submit PRs fixing the warning and fixing the notes or explaining in (cran-comments.md) why they are acceptable.

ayuda con lahman

dejé un draft de las traducciones para relational data, eso si hay muchos términos de baseball que no entiendo y requiero ayuda en su traducción

Add examples section

The plan is to first see if we can have datalang use the same examples from the original package. If not we may need to make a change yaml structure

cc @maurolepore

Convertir a tibble los datos de gapminder (dataset paises)

En el capítulo "Many Models" se explora el dataset poniendo directamente gapminder, porque es un tibble. Como paises es un data frame, cuando pongo paises imprime todas las filas. Me parece más prolijo cambiar el dataset que escribir as.tibble(paises), pero podría también dejarlo así.

traducción datasets de práctica de stringr

@edgararuiz,
Finalmente, en el capítulo sobre strings se utilizan los tres datasets de práctica que vienen en stringr, no solo sentences 😦.

  • stringr::sentences > oraciones: quedó conformado por una selección de las oraciones que tradujimos con Pacha, más un par que inventé para que funcionaran los ejemplos del libro.

  • stringr::fruit > fruta: también es una muestra del original. Traduje las suficientes como para que funcionen los ejemplos 🍏.

  • stringr::words > palabras: el dataset original contiene ~1000 palabras. No tiene sentido traducirlo, porque los datos originales provienen de listas de frecuencias del inglés. Así que extraje las 1000 palabras más frecuentes del español de uno de los corpus de la RAE 🤓. Funciona para los ejemplos del libro.

Aquí está la descripción de los datos para la documentación:

Muestra de vectores de caracteres para practicar la manipulación de cadenas (strings)

`oraciones` es una selección y adaptación al español de los datos de práctica contenidos en stringr::sentences. 
`fruta` es una selección y adaptación al español de los datos de práctica contenidos en stringr::fruit. 
`palabras` es una selección de las 1000 palabras más frecuentes del Corpus de Referencia del Español Actual (CREA) de la RAE, disponible en github.com/rivaquiroga/frecuencias-crea

palabras.txt
oraciones.txt [lo actualicé]
fruta.txt

Should we fix "found XXX marked UTF-8 strings"

@rivaquiroga and @pachamaltese,

We see a note similar to this:

Version: 0.2.0
Check: data for non-ASCII characters
Result: NOTE
     Note: found 259 marked UTF-8 strings
Flavors: r-patched-solaris-x86, r-release-osx-x86_64, r-oldrel-osx-x86_64

-- CRAN checks

Have you seen it before? (I don't see that note in cran-comments.md). If so, how did you address it?

@jonkeane is helping me and he sees it in other packages so it might be fine:

That one note might be fine, I see at least a few packages on CRAN that do have it as a note and they seem to be published just fine: ftp://stat.ethz.ch/pub/Software/R-CRAN/web/checks/check_results_isdparser.html

datos CRAN

Do you need help getting datos back on CRAN?

bateadores: missing columns

Hi

as_tibble(bateadores) returns a tibble with three columns, while the translation includes more columns than that.

Here is the output:

> as_tibble(bateadores)
> bateadores
# A tibble: 19,428 x 3
   ID_jugador     ba    ab
   <fct>       <dbl> <int>
 1 aardsda01  0          4
 2 aaronha01  0.305  12364
 3 aaronto01  0.229    944
 4 aasedo01   0          5
 5 abadan01   0.0952    21
 6 abadfe01   0.111      9
 7 abadijo01  0.224     49
 8 abbated01  0.254   3044
 9 abbeybe01  0.169    225
10 abbeych01  0.281   1756
# … with 19,418 more rows

update citation

I want to cite this R package, but I noticed that the citation is a little out of data (e.g. old version, missing authors), compared to what is in the DESCRIPTION file. I looked for a CITATION file, but I could not find one. I'm happy to update it if you point me to where the changes need to be made.

> citation("datos")

To cite package ‘datos’ in publications use:

  Edgar Ruiz, Riva Quiroga, Mauricio Vargas and Mauro Lepore (2019). datos: Traduce al
  Español Varios Conjuntos de Datos de Práctica. R package version 0.1.0.
  https://CRAN.R-project.org/package=datos

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {datos: Traduce al Español Varios Conjuntos de Datos de Práctica},
    author = {Edgar Ruiz and Riva Quiroga and Mauricio Vargas and Mauro Lepore},
    year = {2019},
    note = {R package version 0.1.0},
    url = {https://CRAN.R-project.org/package=datos},
  }

actualiza gapminder.yml

Hice pequeñas modificaciones en el archivo YAML para traducir Gapminder: agregué tilde faltante en el nombre de algunos países (Afganistán, Túnez) y simplifiqué el nombre de Bolivia para que esté tal como en el dataset original (es decir, solo Bolicia, sin "Estado plurinacional de"). El problema del nombre completo es que hace más difícil trabajar con los datos y al final uno termina editándolo a mano para que quepa en las etiquetas de los gráficos.

gapminder.txt

yaml dataset faltante (iris)

Chequeando el código de los capítulos descubrí que nos faltó traducir iris 😭
El uso que se le da es mínimo (solo para mostrar cómo se imprime un tibble), pero se usa. Sospecho que por eso el traductor del capítulo ni siquiera notó que estaba en inglés.
Los nombres de las variables no están en snake case, sino con puntos y mayúscula inicial. Los dejé así, porque en general se utiliza iris para mostrar cómo arreglar eso. Así no le quitamos ese potencial uso.

iris.txt

DONE. Add GitHub URL

Add a GitHub URL to DESCRIPTION to help browse pull requests from the console. Now this link is missing.

> browse_github_pulls()
✔ Setting active project to 'C:/Users/LeporeM/Documents/Dropbox/git/ml/datos'
Error: Package does not provide a GitHub URL.
Call `rlang::last_error()` to see a backtrace

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.