Monday, December 2, 2013

Creating Latex-Beamer slides in Indic scripts

It was only recently I came across xelatex which lets you create latex-documents in Indic scripts. The unique thing about xelatex was the fact that one can use Unicode characters in source file. This makes life so easy, unlike the alternatives of encoding the script with a transliteration scheme, one can just type the text using an input method like iBus or even google transliterator tool.

Here is an example in Malayalam script :




I must say that latex-beamer slides are by far the best aesthetically appealing slides that I've seen so far in Malayalam.

\documentclass[12pt,red]{beamer}
\usepackage{fontspec}
\usepackage{polyglossia}
\usetheme{Warsaw}

\TeXXeTstate=1
\usepackage{fontspec,xltxtra,xunicode}

\setmainlanguage{malayalam}

\newfontfamily\malayalamfont[Script=Malayalam]{Rachana}
\newfontfamily\malayalamfontsf[Script=Malayalam]{Rachana}
\newfontfamily\malayalamfonttt[Script=Malayalam]{Rachana}
\setmonofont[Scale=MatchLowercase]{Rachana}
\setromanfont{Rachana}



\title{കാൺപൂരിന്റെ കണ്ണുനീർ}
\author{രോഹിൺ നാരായൺ}
\begin{document}
\maketitle

\begin{frame}{ആമുഖം}
\tableofcontents
\end{frame}

\section{1857 ലെ സമരം}
\begin{frame}{1857 ലെ സമരം}

\begin{block}{ആരംഭം }
ഇന്ത്യൻ സ്വാതന്ത്ര സമര ചരിത്രത്തിലെ ആദ്യത്തെ സമരം എന്നു പറയാവുന്നത് 1857 സമരമാണ്. ഒരു ശിപായി ലഹളയായി പുറപ്പെട്ടതാണെങ്കിലും പിന്നീടത് പലപ്രദേശങ്ങളിലേക്കും സിവിൽ സമരങ്ങളായി വ്യാപിക്കപ്പെട്ടു. 
\end{block}

ശിപായി ലഹളയുടെ കാരണങ്ങൾ പലതായിരുന്നെങ്കിലും സമരം പൊട്ടിപ്പുറപ്പെടാൻ പ്രധാനകാരണം പാറ്റേൺ 1853 എൻഫീൽഡ് റൈഫിളും അതിന്റെ കാറ്റ്രിഡ്ജിൽ ഉപയോഗിച്ചിരുന്ന ഗ്രീസിൽ അടങ്ങിയിരിക്കുന്ന മ്രിഗക്കൊഴുപ്പിനെ ചൊല്ലിയാണെന്ന കാരയം എല്ലാവർക്കും അറിയാമല്ലോ. അതായത് പശുവിന് കൊഴുപ്പ് കടിച്ചാൽ ജാതി ഭരഷ്ട് സംഭവിക്കുമെന്ന ആകുലത ഉന്നത കുലജാതരായ ഹിന്ദുക്കൾകും, പന്നിയുടെ കൊഴുപ്പ് വായിലകപ്പെടുന്നതിലെ ബുദ്ധിമുട്ട് മുസ്ലിംഗൾക്കും.

\end{frame}


\section{വ്യാപനം}
\begin{frame}{പരിപാടികൾ}
1857 മാർച്ച് 29 ആം തീയതി കൽക്കട്ടയിലെ ബരക്പൂരിൽ ആരംഭിച്ച ലഹള ക്രമേണ ഈസ്റ്റ് ഇന്ത്യാ കമ്പനിയുടെ പല സൈനിക ആസ്താനങ്ങളിലേക്കും വ്യാപിച്ചു. 

കാണ്‍പൂർ ഈസ്റ്റിന്ത്യാ കമ്പനിയുടെ ഒരു ശക്തി  കേന്ദ്രമായിരുന്നു. കാണ്‍പൂരിനു ചുറ്റുവട്ടത്തുള്ള ഇതര സ്ഥലങ്ങളിൽ (മീററ്റ് , ആഗ്ര, മഥുര, ലക്നൗ) ശിപായി ലഹള പൊട്ടിപ്പുറപ്പെട്ടെങ്കിലും കാൺപൂരിലെ ശിപായികൾ ആദ്യമൊക്കെ ബ്രിട്ടീഷുകാർക്ക് കൂറുള്ളവരായി നിന്നു. അവരുടെ ജനറൽ ഹഗ് വീലർ, പ്രാദേശികരുമായി കൂടുതൽ ഇടപഴകി ജീവിച്ചിരുന്ന ആളായിരുന്നു . അദ്ദേഹത്തിന്റെ ഭാര്യ ഒരു പ്രാദേശിക വനിതയായിരുന്നു. കൂടാതെ അദ്ദേഹത്തിനു നല്ലപോലെ ഹിന്ദുസ്താനി സംസാരിക്കാനുമറിയാമായിരുന്നു. സ്വാഭാവികമായും ശിപായികൾക്ക് അദ്ദേഹത്തോട് പ്രത്യേകിച്ച് വെറുപ്പോ വിദ്വേഷമോ ഇല്ലായിരുന്നു. ഈ ഒരു ഊഷ്മളത വീലർ പ്രതീക്ഷിക്കുകയും ചെയ്തിരുന്നു. മാത്രമല്ല വീലറുടെ ഒരു സുഹ്രുത്തുമായിരുന്നു നാനാ സാഹേബ് എന്ന പ്രാദേശിക ഭരണാധികാരി. 
\end{frame}

\begin{frame}{സയൻസും}

\end{frame}

\end{document}


Wednesday, March 27, 2013

India GDP growth: Data from planning commision

Thanks to Google docs now it is easy to visualize the data and display it on the web. The user can make comparisons by choosing the necessary variables by clicking on the axis. The following is a tool which helps you to understand the performance of various Indian states as a function of time. The data is retrieved from National planning commission data tables

http://planningcommission.nic.in/data/datatable/index.php?data=datatab

Defintions

  1. GSDP: Gross State Domestic Product

Only two parameters are included in the plots at the moment. This is a work in progress. There is more to come. It would be quite revealing to know how the GSDP correlates with hunger index and other poverty indicators.

What you should do 

Click on the play button of the interactive plotter. You can see how the parameters vary or correlate as a function of time.

When more data are available, the user can play find out how the correlations of two indicators vary as a function of time.. and a lot more.. 

If anybody can supply a python code to extract tables from pdf files, please support me. Drop me an email at rohin<DOT>tn<at>gmail.com



If you want to play with it, I will give you some guidelines.

On right panel 

  1. Click on the color menu and change "same color" to "unique color" 
  2. Next click on the size and change it to whatever you want. For instance if you click on the GSDP growth rate the blob would increase in size as the GSDP growth rate increase. 
  3. Next you can select the states that you are interested in. The blobs corresponding them will be highlighted 
  4. Uncheck the trail button if you don't want to see the trail of the blob (recommended) 
  5. Alternatively you can click on the tabs on the top right hand corner to see a bar chart. It's very nice feature check it out. 

The axes 

  1. On the x and y axes you may select the variables that you want to study as a function of time
  2. For example if you want to know if the GDSP growth of a state affect the hunger index or infant mortality rate, you may choose GDSP growth rate on x-axis and  the other variable on the y-axis. Click on the play icon (>) and you can see how these variables affect the other as function of time
  3. Now sit back and do your research :)