Downloads and processes geospatial data from different countries, harmonizes their structures, applies currency conversions to regional time series metrics, and exports all data to MongoDB collections with appropriate indexing.
Value
None (invisible). Creates and uploads data to three MongoDB collections: - Regional boundary geometries (with 2dsphere index) - Regional time series metrics (currency-converted) - PDS track grid summaries
Details
This function performs several key operations:
**Geospatial Data Processing:** 1. Downloads GeoJSON files for Kenya, Mozambique and Zanzibar regions from cloud storage 2. Reads and combines the regional boundary data into a single dataset 3. Uploads combined geospatial data to MongoDB with 2dsphere indexing for spatial queries
**Regional Metrics Processing:** 4. Downloads monthly summary parquet files for both countries from cloud storage 5. Applies currency conversion factors to monetary metrics 6. Converts the following monetary fields: mean_rpue, mean_rpua, mean_price_kg 7. Uploads regional metrics to MongoDB without geospatial indexing
**PDS Track Grid Processing:** 8. Downloads PDS track grid summaries from cloud storage 9. Uploads grid summaries to a separate MongoDB collection
The function requires appropriate configuration parameters for cloud storage access and MongoDB connection details, typically loaded via `read_config()`.
See also
mdb_collection_push for MongoDB upload functionality
download_cloud_file for cloud storage operations
read_config for configuration management