Some mysteries in life can only be answered by data. For example, if you have questions about your Twilio usage, there’s a few ways to dig into the data. There’s prebuilt summaries and graphs of your activity in the Twilio console, and if you’re handy with a spreadsheet, you can export the data. There’s also third-party providers with out-of-the-box analytics and visualizations.

If nothing answers your particular question, this tutorial shows you how to make custom reports using the Twilio REST API to access your data and drive your own insights.

Tutorial requirements

  • Python version 3
  • A free or paid Twilio account with a history of activity

Set up the Python virtual environment

Make a new project directory, and change into the directory from the command line.

$ mkdir twilio-jupyter
$ cd twilio-jupyter

Create a virtual environment called venv. If you’re on Unix or Mac operating systems, enter these commands in a terminal to create and activate the virtual environment.

$ python -m venv venv
$ source venv/bin/activate

If you’re on a Windows machine, enter these commands in a command prompt window.

$ python -m venv venv
$ venv\Scripts\activate

#code #tutorials and hacks #pandas

Visualize Twilio Usage Data with Python, Pandas and Jupyter Notebooks
1.25 GEEK