Open-Data#
pyinaturalist_convert.odp
Download and convert observation, taxon, photo, and user metadata from inaturalist-open-data.
Extra dependencies: boto3
Example: Download everything and load into a SQLite database:
>>> from pyinaturalist_convert import load_odp_tables
>>> load_odp_tables()
Main function:
Download iNaturalist Open Data metadata and load into a SQLite database |
Helper functions:
Download and extract the iNaturalist Open Data metadata archive. |
|
Create or update a taxonomy SQLite table from the Open Data archive |
|
Create or update a photo metadata SQLite table from the Open Data archive. |
|
Create or update a user SQLite table from the Open Data archive |
- pyinaturalist_convert.odp.download_odp_metadata(dest_dir=PosixPath('/home/docs/.local/share/pyinaturalist'))#
Download and extract the iNaturalist Open Data metadata archive. Reuses local data if it already exists and is up to date.
- pyinaturalist_convert.odp.load_odp_observations(csv_path=PosixPath('/home/docs/.local/share/pyinaturalist/inaturalist-open-data/observations.csv'), db_path=PosixPath('/home/docs/.local/share/pyinaturalist/observations.db'), progress=None)#
Create or update an observation SQLite table from the Open Data archive
- pyinaturalist_convert.odp.load_odp_photos(csv_path=PosixPath('/home/docs/.local/share/pyinaturalist/inaturalist-open-data/photos.csv'), db_path=PosixPath('/home/docs/.local/share/pyinaturalist/observations.db'), progress=None)#
Create or update a photo metadata SQLite table from the Open Data archive.
- pyinaturalist_convert.odp.load_odp_tables(dest_dir=PosixPath('/home/docs/.local/share/pyinaturalist'), db_path=PosixPath('/home/docs/.local/share/pyinaturalist/observations.db'))#
Download iNaturalist Open Data metadata and load into a SQLite database
- pyinaturalist_convert.odp.load_odp_taxa(csv_path=PosixPath('/home/docs/.local/share/pyinaturalist/inaturalist-open-data/taxa.csv'), db_path=PosixPath('/home/docs/.local/share/pyinaturalist/observations.db'), progress=None)#
Create or update a taxonomy SQLite table from the Open Data archive
- pyinaturalist_convert.odp.load_odp_users(csv_path=PosixPath('/home/docs/.local/share/pyinaturalist/inaturalist-open-data/observers.csv'), db_path=PosixPath('/home/docs/.local/share/pyinaturalist/observations.db'), progress=None)#
Create or update a user SQLite table from the Open Data archive