GithubHelp home page GithubHelp logo

faers.db's People

Contributors

corradolanera avatar nicolaguidone avatar pietrobelloni avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

kalamri2

faers.db's Issues

FAERS raw data

Functions to work with the on-line side of FAERS

  • download a (single) specific FAERS db Quarterly Data Extract (QDE), in the preferred format:
retrieve_qde(
    year = format(Sys.Date(), "%Y"),
    quarter = c("q1", "q2", "q3", "q4"),
    type = c("ascii", "xml")
)
  • retrieve the list (only) for the current FAERS db's index/names/ref (on-line):
fetch_remote()
  • retrieve the list (only) for the current FAERS db's index/names/ref (on-line):
fetch_local(path = here::here("faers))
  • download all the locally missing FAERS dbs, in the preferred format:
update_local(
    path = here::here(faers),
    type = c("ascii", "xml")
)

Read XML FAERS in R

Functions to read FAERS XML DBs in R

Table-specific read_*()er

Create a suitable function getting the file path in input and return a (list of) tibble(s), correctly formatted (w/ each column in the preferred type). We do not provide a default path for these functions.

  • read_xml(path)

NOTE: we use the functions in the {tidyverse} (in particular in the {xml2}), and in the {janitor} packages to implement our read_*() functions.

Read _any_ FAERS in R

Table-agnostic read_*()ers

Define a generalized function that can infer the correct type of file and internally call the appropriate read_*() function.

  • read_faers(path)

warning after update_local

get this message

Warning message:
`xml_node()` was deprecated in rvest 1.0.0.
Please use `html_element()` instead.
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated. 
> lifecycle::last_lifecycle_warnings()
[[1]]
<deprecated>
message: `xml_node()` was deprecated in rvest 1.0.0.
Please use `html_element()` instead.
Backtrace:
  1. faers.db::update_local("C:\\Users\\corrado.lanera\\Unit of Biostatistics Epidemiology and Public Health\\FAERS VAERS - FAERS data - FAERS data")
 10. rvest::xml_node(., css = "#accordion")

develop `set_basepath`

It could be helpful to set a function set_basepath to set a default base "faers_raw_data" path in the system.

Consider a default to Sys.getenv("FAERS_RAW_PATH"), or similar.

Update README and vignette(s)

  • It should be useful to include in the readme the instruction and examples to use the package, in a very simple way.
  • It could be important to provide vignettes with complete use-cases scenarios.

Read ASCII FAERS in R

Functions to read FAERS ASCII DBs in R

Table-specific read_*()ers

For each kind of ASCII file/table, create a suitable function getting the file path in input and return a tibble, correctly formatted (w/ each column in the preferred type). We do not provide a default path for these functions.

  • read_demo(path)
  • read_drug(path)
  • read_reac(path)
  • read_outc(path)
  • read_rpsr(path)
  • read_ther(path)
  • read_indi(path)

NOTE: we use the functions in the {tidyverse} (in particular in the {readr}), and in the {janitor} packages to implement our read_*() functions.

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.