Skip to content

jeronimoluza/code_samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

code_samples

Some code samples for various purposes and languages

  • samples/R/OSM_GADM.R: This R script retrieves highway data from OpenStreetMap (OSM) for a specified country and administrative region, processes it, and exports the results as a CSV and optional PNG visualization. It begins by downloading administrative boundary data using the geodata package, validates the selected region, and converts it into an sf object. The script then queries OSM for highways within the region’s bounding box, extracts relevant road segments, and filters them to ensure they intersect with the actual administrative boundary. The final dataset includes road type, geometry in WKT format, and segment length, which is saved as a CSV. If enabled, a map of the road network is generated and saved as a PNG using ggplot2.
  • samples/Python/ndvi: This project is designed for processing Earth observation data, specifically NDVI data from NASA's MODIS satellite. It provides functionality to retrieve, download, and process MODIS data stored in HDF format using the earthaccess API. Key features include extracting bounding box coordinates for geospatial regions, downloading MODIS data for a specified region and date range, constructing polygon geometries from grid coordinates, extracting metadata from HDF files, and cleaning numerical data arrays by applying scaling factors and handling missing values. The script leverages geospatial processing libraries (geopandas, shapely), numerical tools (numpy, pandas), and parallel computing (joblib) to efficiently handle large datasets.

About

Some code samples for various purposes and languages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published