Title: | Easily Visualize Geographic Data of Morocco |
---|---|
Description: | Tools to easily visualize geographic data of Morocco. This package interacts with data available through the 'geomarocdata' package, which is available in a 'drat' repository. The size of the 'geomarocdata' package is approximately 12 MB. |
Authors: | Amine Andam [aut, cre] |
Maintainer: | Amine Andam <[email protected]> |
License: | GPL |
Version: | 0.1.1 |
Built: | 2025-02-22 03:40:06 UTC |
Source: | https://github.com/cran/geomaroc |
Helps to plot the shape of districts within a province.
getDistrict(n_province = NULL, id = NULL)
getDistrict(n_province = NULL, id = NULL)
n_province |
The name of the province to plot. The notation should be respected.To get the notation: provinces() |
id |
the id of the province.To get the id of each province provinces() |
return a sf object
## Not run: #Use DISTRICT name prov=getDistrict("Casablanca") plot(prov$coordinates) #Use id prov=getDistrict(id=141) plot(prov$coordinates) ## End(Not run)
## Not run: #Use DISTRICT name prov=getDistrict("Casablanca") plot(prov$coordinates) #Use id prov=getDistrict(id=141) plot(prov$coordinates) ## End(Not run)
Helps to plot the shape of districts of multiple provinces.
getMultiDistrict(n_province = NULL, id = NULL)
getMultiDistrict(n_province = NULL, id = NULL)
n_province |
vector of The name of the province to plot. The notation should be respected.To get the notation: provinces() |
id |
vector of provinces id.Each province has an id. To get the id of each province : provinces() |
return a sf object
## Not run: prov=getMultiDistrict(c("Tanger-Assilah","Fahs-Anjra")) plot(prov$coordinates) prov=getMultiDistrict(id=c(227,511)) plot(prov$coordinates) ## End(Not run)
## Not run: prov=getMultiDistrict(c("Tanger-Assilah","Fahs-Anjra")) plot(prov$coordinates) prov=getMultiDistrict(id=c(227,511)) plot(prov$coordinates) ## End(Not run)
Helps to plot the shape of multiple regions.
getMultiProvince(n_region = NULL, id = NULL)
getMultiProvince(n_region = NULL, id = NULL)
n_region |
vector of the name of the regions to plot. The notation should be respected.To get the notation execute: regions() |
id |
vector of regions id.Each region has an id. To get the id of each region please execute : regions() |
return a sf object
## Not run: # Plot two regions :Casablanca-Settat and Rabat-Sale-Kenitra regions=getMultiProvince(c("Casablanca-Settat","Rabat-Sale-Kenitra")) plot(regions$coordinates) #Plot provinces of Oriental and Tanger-Tetouan-AL-Hoceima regions=getMultiProvince(id=c(1,2)) plot(regions$coordinates) ## End(Not run)
## Not run: # Plot two regions :Casablanca-Settat and Rabat-Sale-Kenitra regions=getMultiProvince(c("Casablanca-Settat","Rabat-Sale-Kenitra")) plot(regions$coordinates) #Plot provinces of Oriental and Tanger-Tetouan-AL-Hoceima regions=getMultiProvince(id=c(1,2)) plot(regions$coordinates) ## End(Not run)
Helps to plot the shape of multiple regions.
getMultiRegion(name = NULL, id = NULL)
getMultiRegion(name = NULL, id = NULL)
name |
vector of the name of the regions to plot. The notation should be respected.To get the notation execute: regions() |
id |
vector of regions id.Each region has an id. To get the id of each region please execute : regions() |
return a sf object
## Not run: #Plot two regions :Casablanca-Settat and Laayoune-Sakia-El-Hamra regions=getMultiRegion(c("Eddakhla-Oued-Eddahab","Laayoune-Sakia-El-Hamra")) plot(regions$coordinates) #Plot the map of Morocco mar=getMultiRegion(id=1:12) plot(mar$coordinates) ## End(Not run)
## Not run: #Plot two regions :Casablanca-Settat and Laayoune-Sakia-El-Hamra regions=getMultiRegion(c("Eddakhla-Oued-Eddahab","Laayoune-Sakia-El-Hamra")) plot(regions$coordinates) #Plot the map of Morocco mar=getMultiRegion(id=1:12) plot(mar$coordinates) ## End(Not run)
Internal function
getPathRegion(n_region = NULL, id = NULL)
getPathRegion(n_region = NULL, id = NULL)
n_region |
name |
id |
id of region |
Helps to plot the shape of provinces within a region.
getProvince(n_region = NULL, id = NULL)
getProvince(n_region = NULL, id = NULL)
n_region |
The name of the region to plot. The notation should be respected.To get the notation : regions() |
id |
Each region has an id. To get the id of each region : regions() |
return a sf object
## Not run: #Use region name region=getProvince("Tanger-Tetouan-Al-Hoceima") plot(region$coordinates) #Use id region=getProvince(id=1) #Don't forget getRegion(id=1) not getRegion(1) plot(region$coordinates) ## End(Not run)
## Not run: #Use region name region=getProvince("Tanger-Tetouan-Al-Hoceima") plot(region$coordinates) #Use id region=getProvince(id=1) #Don't forget getRegion(id=1) not getRegion(1) plot(region$coordinates) ## End(Not run)
plot the shape of each region
getRegion(name = NULL, id = NULL)
getRegion(name = NULL, id = NULL)
name |
The name of the region to plot. The notation should be respected.To get the notation execute: regions() |
id |
Each region has an id. To get the id of each region please execute : regions() |
return a sf object
## Not run: region=getRegion("Tanger-Tetouan-Al-Hoceima") #Use region name #plot(region$coordinates) region=getRegion(id=1) # use id plot(region$coordinates) ## End(Not run)
## Not run: region=getRegion("Tanger-Tetouan-Al-Hoceima") #Use region name #plot(region$coordinates) region=getRegion(id=1) # use id plot(region$coordinates) ## End(Not run)
Hepls to respect the notation and to get the id and the name of each province
provinces()
provinces()
return a dataframe
## Not run: province=provinces() province ## End(Not run)
## Not run: province=provinces() province ## End(Not run)
Hepls to respect the notation and to get the id and the name of each region
regions()
regions()
return a dataframe
## Not run: region=regions() region ## End(Not run)
## Not run: region=regions() region ## End(Not run)