Skip to content

Implement access to EU Pesticides Database - #467

Open
stitam wants to merge 12 commits into
ropensci:masterfrom
stitam:eup
Open

Implement access to EU Pesticides Database#467
stitam wants to merge 12 commits into
ropensci:masterfrom
stitam:eup

Conversation

@stitam

@stitam stitam commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Related to #460.

https://food.ec.europa.eu/plants/pesticides/eu-pesticides-database_en

Also known as DG SANTE Pesticide Database, the EU Pesticide Database contains "information on active substances used in plant protection products, Maximum Residue Levels (MRLs) in food products, and emergency authorisations of plant protection products in Member States." The data download and APIs page offers a number of pubic endpoints which is a clear sign that we are free to implement access to the database.

This PR adds the following functionality to webchem:

  • db_download_eup() downloads two data sets, the "Active Substances" data set and the "Residues and MRLs" data set and stores them as a single sqlite database which is subsequently queried by other functions.
  • eup_list_entries() lists all entries in the database.
  • eup_convert() converts between supported identifiers.
  • eup_query() queries the database.

Not an EU Pesticides specific functionality, but this PR also adds a new function db_connect() which webchem users can use to connect to downloaded offline databases and get e.g. direct access to the tables within the sqlite databases. webchem currently provides offline access to ChEMBL, EU Pesticides, FooDB, these are all supported by db_connect().

PR task list:

  • Update NEWS
  • Add tests (if appropriate)
  • Update documentation with devtools::document()
  • Check package passed

Extra tasks (more for maintainers, but feel free to do them if you want):

  • Set the environment variable RUN_ONLINE_TESTS to "true"
  • Test package locally (requires ~40 GB of local databases)
  • Update README with devtools::build_readme() to update test coverage badge

@stitam stitam added this to the 25-ISC-1-02.M2 milestone Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant