Code Monkey home page Code Monkey logo

microdatoses's People

Contributors

cjgb avatar jlopezper avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

microdatoses's Issues

error loading census microdata

The current CRAN version of the package cannot load the full 2011 Census microdata file, or even the example file that comes with the package:

install.packages("MicroDatosEs")
#> package 'MicroDatosEs' successfully unpacked and MD5 sums checked
  library(MicroDatosEs)
#> Warning: package 'MicroDatosEs' was built under R version 4.2.2
#> Loading required package: readr
#> Warning: package 'readr' was built under R version 4.2.2
  x <- censo2010(system.file("extdata/sampleCenso2010.txt", package = "MicroDatosEs"))
#> Error in if (!tipo %in% c("D", "N", "HHMM")) stop("Column types can only be D (key-value), N (numeric) or HHMM (hour-minute)."): argument is of length zero

Created on 2023-01-05 with reprex v2.0.2

This is due to the relatively new error-checking code introduced in commit
46e9583ba74ebb79c8c36a2d7bba1c264232efc7.

The problem is that the new error-checking code does not allow missing variable descriptions. Since the 2011 census microdata is static and the new 2021 census may have a different format of microdata (we'll see when it is published), a quicker fix, for now, would probably be to add those missing variable encodings to metadata files.

The missing variable in question is TDESP, which is not found in censo_2010_mdat2.txt.

multiple errors due to incomplete metadata files

Following the issue #6 , I have found a few more problems:

if ("remotes" %in% installed.packages()[,'Package'] == FALSE) install.packages("remotes")
if ("MicroDatosEs" %in% installed.packages()[,'Package'] == FALSE) remotes::install_github("rOpenSpain/MicroDatosEs")
library(MicroDatosEs)

raw <- defun2011(system.file("extdata/sampleDEFUN2010.txt", package = "MicroDatosEs"))
#> Error in assign.labels(dat[[colname]], mdat.2[mdat.2$var == colname, ]): A column cannot have more than a single type: check metadata file for inconsistencies.

raw <- epf.2011.gastos(system.file("extdata/sample_gastos_a2011.txt", package = "MicroDatosEs"))
#> Error in if (!tipo %in% c("D", "N", "HHMM")) stop("Column types can only be D (key-value), N (numeric) or HHMM (hour-minute)."): argument is of length zero

raw <- epf.2011.miembros(system.file("extdata/sample_miembros_a2011.txt", package = "MicroDatosEs"))
#> Error in if (!tipo %in% c("D", "N", "HHMM")) stop("Column types can only be D (key-value), N (numeric) or HHMM (hour-minute)."): argument is of length zero

Created on 2023-04-21 with reprex v2.0.2

This is due to minor errors and some missing lines in metadata files.

Invalid URL

From R CMD check --as-cran:

Found the following (possibly) invalid URLs:
  URL: http://www.ine.es/en/prodyser/micro_mnp_defun_en.htm
    From: man/defun2011.Rd
    Status: 404
    Message: Not Found

MicroDatosES - rostemplate project

https://github.com/orgs/rOpenSpain/projects

Dear developers,

I have created a fork including the deploy of your package on your gh-pages branch using the rostemplate (see Slack channel and https://ropenspain.github.io/rostemplate/). See a live preview of your pkgdown site here:
https://dieghernan.github.io/MicroDatosEs/

An additional GitHub Action check-standard.yaml has been included. That action would check your package (AS CRAN) on several platforms on every push, pull request and every first day of the month. The goal is to provide CI on your package.

Note that this action could be redudant with your _travis current configuration, but you can still keep both without interferences between them.

I have noticed that this PR would fail on TRAVIS, given the current configuration of the build. Please note that the ERROR is not related with the modification made on the PR.

Actions on your package:

  • Check locally and rebuild documentation (upgrade Roxygen version)

  • Fix links \link[read_fwf]{readr} to \link[readr]{read_fwf}, as Roxygen was trying to link with read_fwf::readr instead of readr::read_fwf

  • Implementation of github-actions and related .gitgnore and .Rbuildignore

Next steps

You should receive a Pull Request with these modifications.

After your review and in case you consider merging, consider to deploy Github Pages on your settings (gh-pages branch).

Once it is done, I would appreciate if you move this issue to the Deployed tab on the Project panel (see also Projects tab on this website)


LOG

Fork: https://github.com/dieghernan/MicroDatosES/
Live preview: https://dieghernan.github.io/MicroDatosEs/

TODO: Open issue and pull request. Final deployment up to repo owners

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.