Skip to main content

Nigeria Geodata

Temporary logo

A Python library for fast and efficient access to geospatial data for Nigeria.

PyPI open_in_colab python_versions


Documentation: https://jeafreezy.github.io/nigeria_geodata/

Source Code: https://github.com/jeafreezy/nigeria_geodata


Nigeria Geodata is a fast and efficient Python client for accessing geospatial data for Nigeria.

The key features are:

  • High Performance: Offers exceptional speed with both synchronous and asynchronous support to cater to different use cases and performance needs
  • Map Visualization: Provides smooth map visualization using the fast lonboard library.
  • Lightweight: Minimal dependencies—just one required (httpx), with optional extras available for additional features.
  • User-Friendly: Easy to use and learn; set up quickly with just a few lines of code.
  • CLI Support: Intuitive command-line interface built with Typer.
  • Real-Time Data: Fetches up-to-date data directly from the GRID3 database (more to come!), ensuring you always work with the latest information.
  • Advanced Filtering: Allows for precise filtering based on state names (e.g FCT, Lagos), bounding boxes (bbox), and areas of interest (AOI).

Dependency

nigeria_geodata depends on only one core package:

  • Httpx - for the api requests.

Additional Optional Dependencies

There are some additional dependencies you might want to install.

  • Typer - for cli support.
  • Lonboard - for map visualization.
  • Geopandas - to return the data as a geodataframe.
  • Pandas - to return the data as a dataframe.

Installation

Create and activate a virtual environment and then install nigeria_geodata:

To install the lightweight version using pip:

pip install nigeria-geodata
---> 100%

This version will return all the data as Python objects, mostly as a list, and list of dicts.

To install it with typer, lonboard and geopandas:

pip install nigeria-geodata['standard']
---> 100%

This version will allow you to get the data as a dataframe, geodataframe, or an interactive map.

pip install nigeria-geodata['cli']
---> 100%

This version provides CLI support for the package. It is also lightweight -- It will return the data as pure Python objects.

Get Started

For the simplest usecase, search for all the available health care data in Nigeria.

from nigeria_geodata import Grid3, AsyncGrid3
# Sync
search_results = Grid3().search("health")
print(search_results)
# this will return a dataframe with all the available health care datasets.

# Async
search_results = await AsyncGrid3().search("health")
print(search_results)
# this will return a dataframe with all the available health care datasets.

Under the hood, this makes an api request to the GRID3 database to get the datasets. Refer to the documentation and examples for more use cases.

Acknowledgment

In addition to the great libraries we're resting upon, we would also like to thank GRID3 for providing real-time and comprehensive geospatial data that powers this library.

License

This project is licensed under the terms of the MIT license. See LICENSE.MD.

Release files for nigeria-geodata 0.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nigeria-geodata 0.0.0
File Size Uploaded
nigeria_geodata-0.0.0.tar.gz 25.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nigeria-geodata 0.0.0
File Interpreter ABI Platform
nigeria_geodata-0.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 57.2 kB

Release files / nigeria_geodata-0.0.0.tar.gz

Download URL nigeria_geodata-0.0.0.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d063b09a801445b89638c483d9ad76ef0e405e5d61dad625fa0d2a8454c53d26
BLAKE2b-256 checksum
How to use checksums
28ca01be2c14d1bd1f5e5827a3fe2af8088eaea1a7990fcbdf98711121abbbad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.5

Release files / nigeria_geodata-0.0.0-py3-none-any.whl

Download URL nigeria_geodata-0.0.0-py3-none-any.whl
Size 31.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7b65434b3488d42bdcd3a78a9cbf58f7bb4b5a4c48957751d7aa6a2b8745bb0
BLAKE2b-256 checksum
How to use checksums
92b3b26eb2acd1e2c1273168b0efbe0eba32c578fda018fa5b2aeecc91a2ada5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

0.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page