Python: Reading the ACLED data curated for Russia-Ukraine War using Xonsh and Google Colaboratory ver. 4

Last Updated on October 26, 2022 by shibatau

VII is added.

I. Xonsh

You can create a chart quickly and easily using Xonsh. See my post about Xonsh:

Get started with xonsh (Python + Shell)

II. The data

We can get the data at ACLED:

Ukraine Crisis Hub

East Asia Pacific

III. Creating a virtual environment

You should create a virtual environment. See my post:

How to use Pyenv + Pyenv-virtualenv\

IV. The codes

pip install pandas
pip install --upgrade xlrd
pip install plotly-express
import pandas as pd
df = pd.read_excel('Ukraine_Black_Sea_2020_2022_Oct14-1_copy.xlsx')
import plotly.express as px
fig = px.bar(df, x='EVENT_DATE', y='FATALITIES')
fig.show()

This is the table shown when you run df.info() on Xonsh

V. Creating a bar chart using Neovim + Xonsh

VI. Using Google Colaboratory

This is the easiest way to run the Python codes. You don’t have to create a virtual environment for yourself and you can also create a chart quickly enough. See the codes on Google Colaboratory:

https://colab.research.google.com/drive/18PIB1V66sSqR9N3nFjs7nO44iYRgm9zb?usp=sharing

VII. Assassination of Shinzo Abe

About shibatau

I was born and grown up in Kyoto. I studied western philosophy at the University and specialized in analytic philosophy, especially Ludwig Wittgenstein at the postgraduate school. I'm interested in new technology, especially machine learning and have been learning R language for two years and began to learn Python last summer. Listening toParamore, Sia, Amazarashi and MIyuki Nakajima. Favorite movies I've recently seen: "FREEHELD". Favorite actors and actresses: Anthony Hopkins, Denzel Washington, Ellen Page, Meryl Streep, Mia Wasikowska and Robert DeNiro. Favorite books: Fyodor Mikhailovich Dostoyevsky, "The Karamazov Brothers", Shinran, "Lamentations of Divergences". Favorite phrase: Salvation by Faith. Twitter: @shibatau

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.