FAVELAS
The most complete list of all favelas of brazil by states
USAGE
import Favelas from "favelas";
const favelas = new Favelas();
favelas.getAll();
TYPES
type Favela = {
id: number,
name: string,
complex: string,
zone: Zone,
neighborhoods: string,
};
type State = "rj" | "sp";
type Zone = "sul" | "oeste" | "central" | "norte";
API
getAll(): Favela[]
Returns all favelas - full info
getById(favelaId: number): Favela
Returns a favela by the favelaId
getByName(name: string): Favela[]
A list of all favelas that match the name.
getAllNames(): string[]
The Name of all favelas
getFavelasByComplex(complex: string): Favela[]
Returns all favelas that are part of the complex matched.
getFavelasByZone(zone: Zone): Favela[]
Returns all favelas by the zone.
getByNeighborhood(neighborhood: string): Favela[]
Returns all favelas from the neighborhood passed.
total(): number
Return the amount of favelas in that state.