Welcome to the FEWSNET API Notebooks Repository!
This repository is a curated collection of Jupyter notebooks designed to serve as a practical resource for understanding and executing API calls. Our notebooks provide hands-on examples, required libraries and tutorials that guide you through various data queries and manipulations using APIs.
Comprehensive Guides:
Step-by-step notebooks on how to
interact with different public APIs, complete with detailed explanations.
Ready-to-Use Code:
Snippets that are fully executable and can
be easily adapted for various data analysis tasks.
Resource-Rich Documentation:
Markdown cells within notebooks
offer rich documentation and context for each step of the API interaction process.
Community-Driven:
Opportunities for the community to contribute and
enhance the repository with new examples and improved methods.
To get started:
- Clone the repository/download the notebook to your local machine.
- Create a virtual environment and Install the necessary dependencies listed in the requirements.txt file. (Each project folder has a requirements.txt file that lists the libraries used).
- Open the directory on Jupyter/Jupyterlab
- Explore the notebooks directory to find examples relevant to your needs and Follow the instructions within each notebook to run the code cells.
- Navigate to the main page of the repository. In this case here
- click on the
Code
button and copy the url under HTTPS. - Open a terminal window and navigate to your desired directory.
- On the terminal use the following commands:
git clone <your url here> {desired_local_repo_name}
This will clone the repository to your local machine.
PS. {desired_local_repo_name} is optional you can use a desired name or leave it.
When creating a virtual environment, navigate to the directory where the virtual environment will be created and on the terminal, enter the following commands:
python -m venv env_name
replace env_name with a preferred name for your virtual environment.
Next activate the virtual environment:
source 'path-to-env'/bin/activate
Once the virtual environment is activated, install the requirements:
pip install -r 'path-to-project-root-directory' requirements.txt
On the terminal, with the virtual environment activated. Run:
jupyterlab
This will instantiate a local server at port 8888 and open a tab on your browser where you can explore the notebooks and run them. Alternatively, you can open them on Jupyter rathr than jupyter lab. to do this, run:
jupyter notebook
This will also open a local server at localhost:8888 and open a new tab on your browser.
if the tab does not open automatically, check the output on the terminal and copy the provided url and open it on your browser.
- Pymarkdownlnt - Linting library for
.md
files - Pandas
- Numpy
- requests
- Jupyter
- nbdev2 - Suitable for managing notebooks with multiple contributors
We welcome contributions from the community! If you have suggestions or
improvements, please see our CONTRIBUTING.md
for guidelines on
how to make a pull request.