osl-incubator / satellite-weather-downloader

GNU General Public License v3.0
4 stars 4 forks source link

Including Argentina climate data on Mosqlimate engine #69

Open lsbastos opened 2 weeks ago

lsbastos commented 2 weeks ago

I would like to include in the mosqlimate pipeline the Argentina (and also to consider other Latin America countries). So one could easily download treated climate data for a municipality-like for Argentina (and maybe other countries).

I will discuss today with a partner about the better option to get a geocode, lat and long for municipality-like regions in Argentina. As soon as I get, I point it here.

lsbastos commented 1 day ago

I think we could try to use as a reference the geoAR package. From that I can extract the centroids of each department (there are 506, that is the equivalent to our municipalities) from 24 provinces (equivalent to our states).

library(geoAr)
library(sf)
library(tidyverse)

AR <- get_geo(geo = "ARGENTINA", level = "departamento")

AR.coordinates <- st_centroid(AR) %>%
  mutate(long = st_coordinates(.)[,1],
         lat = st_coordinates(.)[,2]) |> 
  st_drop_geometry()

plot(AR.coordinates$long, AR.coordinates$lat)

ggplot(AR) + 
  geom_sf() + 
  geom_point(data = AR.coordinates, mapping = aes(x = long, y = lat))

image