Giter Site home page Giter Site logo

Comments (3)

rfhb avatar rfhb commented on July 30, 2024 1

"Location" is a complex lookup system in the webinterface of CTGOV2. For example, it maps user entries to combinations of facility name, city, state, country. The translation by ctrdata of a search URL to an API call for this register may not readily work for all cases. An update will be provided to cover more use cases.

from ctrdata.

rfhb avatar rfhb commented on July 30, 2024 1

Implemented with further user information. Closed with 3b90892.

# example showing that an error will be raised when a user's search
# in CTGOV2 does not have have relevant details for an API query:

q <- "https://clinicaltrials.gov/search?locStr=Gustave%20Roussy,%20Rue%20Edouard%20Vaillant,%20Villejuif,%20France&lat=48.7955043&lng=2.3485255&distance=50"
ctrLoadQueryIntoDb(queryterm = q, verbose = F, only.count = TRUE)
# Error: Parameter 'locStr' provided, but no 'country', 'state' or 'city'; 
# please check in CTGOV; e.g., the name of a trial site should go into 
# Facility Name in the webinterface or parameter 'locn' in the search URL.

# series of examples showing correct translation:

q <- "https://clinicaltrials.gov/search?locStr=Portugal&country=Portugal"
ctrLoadQueryIntoDb(queryterm = q, verbose = TRUE, only.count = TRUE)
# 3203

q <- "https://clinicaltrials.gov/search?country=Portugal"
ctrLoadQueryIntoDb(queryterm = q, verbose = TRUE, only.count = TRUE)
# 3203

q <- "https://clinicaltrials.gov/search?locStr=Lissabon,%20Portugal&country=Portugal&state=Lisbon&city=Lisbon"
ctrLoadQueryIntoDb(queryterm = q, verbose = TRUE, only.count = TRUE)
# 497

q <- "https://clinicaltrials.gov/search?country=Portugal&state=Lisbon&city=Lisbon"
ctrLoadQueryIntoDb(queryterm = q, verbose = TRUE, only.count = TRUE)
# 497

q <- "https://clinicaltrials.gov/search?country=Portugal&city=Lisbon"
ctrLoadQueryIntoDb(queryterm = q, verbose = TRUE, only.count = TRUE)
# 497

q <- "https://clinicaltrials.gov/search?country=Portugal&state=Lisbon"
ctrLoadQueryIntoDb(queryterm = q, verbose = TRUE, only.count = TRUE)
# 21 noting there is no such state

q <- "https://clinicaltrials.gov/search?locStr=Bavaria,%20Germany&country=Germany&state=Bavaria"
ctrLoadQueryIntoDb(queryterm = q, verbose = TRUE, only.count = TRUE)
# 911 but CTGOV2 webinterface erroneously shows 25632 trials for all of the country

q <- "https://clinicaltrials.gov/search?locStr=Maine&country=United%20States&state=Maine"
ctrLoadQueryIntoDb(queryterm = q, verbose = TRUE, only.count = TRUE)
# 2273

q <- "https://clinicaltrials.gov/search?locStr=Paris,%20France&country=France&state=%C3%8Ele-de-France&city=Paris"
ctrLoadQueryIntoDb(queryterm = q, verbose = TRUE, only.count = TRUE)
# only 104 returned by API but CTGOV2 webinterface shows 12647 trials 
# for the same parameters, indicating that state is not useful here with API

q <- "https://clinicaltrials.gov/search?locStr=Paris,%20France&country=France&city=Paris"
ctrLoadQueryIntoDb(queryterm = q, verbose = TRUE, only.count = TRUE)
# 12654

q <- "https://clinicaltrials.gov/search?locn=Charité Campus Virchow Klinikum"
ctrLoadQueryIntoDb(queryterm = q, verbose = TRUE, only.count = TRUE)
# 207

q <- "https://clinicaltrials.gov/search?locn=Gustave%20Roussy"
ctrLoadQueryIntoDb(queryterm = q, verbose = TRUE, only.count = TRUE)
# 1643

from ctrdata.

machado-t avatar machado-t commented on July 30, 2024

Great work!

from ctrdata.

Related Issues (20)

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.