27 de octubre de 2020

php-inaturalist: first step

iNaturalist provides a rich and flexible application programming interface for data management. This provides extensive opportunities for creating applications to interact with the iNaturalist site. However, there are only a few open source software implementations of the iNaturalist API client. Thus, I could not find any implementation of such client in PHP.

With the large amount of data on biodiversity collected over the years, I would sincerely like to make it freely available to the scientific community. iNaturalist provides great opportunities for this, but the standard web interface of the site is not well suited for uploading large numbers of observations with a non-standard set of parameters.

Practically, the only way to solve this problem is to develop an own application to interact with iNaturalist using the API. And the main problem on this way for me was the absence of available implementation of the client in the most ordinary and well-known programming language.

Well: if no one has done it before, it is necessary to do it myself. I have prepared a small set of tools to interact with iNaturalist, including:

- php client for the iNaturalist API (just some endpoints are implemented, but most important for observation uploading: POST/observations, POST/observation_field_value, POST/observation_photos, GET/taxa).

- some useful tools for data processing: function for parsing exif data from geotagged photo and time zone server for determine the time zone by geographic longitude and latitude (both returns the data in in iNaturalist API compatible format).

All these tools are freely available under GPL v.3 in the GitHub repository.

In despite of still limited possibilities, the current implementation of php-inaturalist allows to fully automate the creation of observations. Thus, the observation https://www.inaturalist.org/observations/63307123 was created using only the php client for the iNaturalist.

I hope this is only the first step in developing a php client for the iNaturalist API. The next goal is to create a PHP application to upload observations on the iNaturalist, primarily data on digitized collection samples.

Ingresado el 27 de octubre de 2020 por kgrebennikov kgrebennikov | 0 comentarios | Deja un comentario