Package 'geomaroc'

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

Help Index


Plot districts within a province

Description

Helps to plot the shape of districts within a province.

Usage

getDistrict(n_province = NULL, id = NULL)

Arguments

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()

Value

return a sf object

Examples

## Not run: 
#Use DISTRICT name
prov=getDistrict("Casablanca")
plot(prov$coordinates)
#Use id
prov=getDistrict(id=141)
plot(prov$coordinates)

## End(Not run)

Plot districts of multiple provinces

Description

Helps to plot the shape of districts of multiple provinces.

Usage

getMultiDistrict(n_province = NULL, id = NULL)

Arguments

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()

Value

return a sf object

Examples

## Not run: 
prov=getMultiDistrict(c("Tanger-Assilah","Fahs-Anjra"))
plot(prov$coordinates)
prov=getMultiDistrict(id=c(227,511))
plot(prov$coordinates)

## End(Not run)

Plot multiple regions

Description

Helps to plot the shape of multiple regions.

Usage

getMultiProvince(n_region = NULL, id = NULL)

Arguments

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()

Value

return a sf object

Examples

## 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)

Plot multiple regions

Description

Helps to plot the shape of multiple regions.

Usage

getMultiRegion(name = NULL, id = NULL)

Arguments

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()

Value

return a sf object

Examples

## 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

Description

Internal function

Usage

getPathRegion(n_region = NULL, id = NULL)

Arguments

n_region

name

id

id of region


Plot provinces within a region

Description

Helps to plot the shape of provinces within a region.

Usage

getProvince(n_region = NULL, id = NULL)

Arguments

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()

Value

return a sf object

Examples

## 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 regions

Description

plot the shape of each region

Usage

getRegion(name = NULL, id = NULL)

Arguments

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()

Value

return a sf object

Examples

## 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)

Notation : provinces

Description

Hepls to respect the notation and to get the id and the name of each province

Usage

provinces()

Value

return a dataframe

Examples

## Not run: 
province=provinces()
province

## End(Not run)

Notation : regions

Description

Hepls to respect the notation and to get the id and the name of each region

Usage

regions()

Value

return a dataframe

Examples

## Not run: 
region=regions()
region
## End(Not run)