Skip to content

is readHFCweb function working? #27

@thiagocalm

Description

@thiagocalm

Hi Tim!

I was trying to import data from HFC for some countries and I noticed that this function is currently commented in the readHFD.R code.

I don't know if it is commented due to any specific reason, but I tried to adapt it to make it work for me. I noticed they changed the path to store the data and how to request it. Follow the two changes I made in your commented code, just in case you intend to add this function again to the package:

  • Path: from fileurl <- paste0("https://www.fertilitydata.org/data/", CNTRY, "/", CNTRY, "_", item, ".txt") to paste0("https://www.fertilitydata.org/File/GetFile/Country/", CNTRY, "/", CNTRY, "_", item, ".txt")
  • Requesting statement: from httr::HEAD(fileurl)$all_headers[[1]]$status == 200 to httr::GET(fileurl)$all_headers[[1]]$status == 200

Thank you for this package!

Best,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions