This demo provides a comprehensive guide on how to:
- Load data into Elasticsearch using Python.
- Write effective queries in Elasticsearch.
- Create insightful dashboards in Kibana.
The focus is on utilizing Celtics and Timberwolves data to showcase these processes.
-
This demo uses Elasticsearch version 8.13; if you are new, check out our Quick Starts on Elasticsearch and Kibana.
-
Download the latest version of Python if you don’t have it installed on your machine. This example utilizes Python 3.12.1.
-
You will use the nba_api package to get recent statistics about the Boston Celtics, Jupyter Notebooks, and the Elasticsearch Python Client. While testing this code, I got an error unless I had pandas installed since
nba_data
creates pandas DataFrames.To install these packages, you can run the following command.
pip3 install nba_api jupyter elasticsearch pandas
-
You will want to load a Jupyter Notebook to work with your data interactively. To do so, you can run the following in your terminal.
jupyter notebook
In the right-hand corner, you can select where it says “New” to create a new Jupyter Notebook.
- How to analyze data using Python, Elasticsearch and Kibana
- Create a data view
- Create your first dashboard
- Dashboard and visualizations
- What is an Elasticsearch index?
- Intro to Elasticsearch
- Beginner's Crash Course to Elastic Stack
Let us know if you need if this demo inspires you to build anything or if you have any questions on our Discuss forums and the community Slack channel.