Blogs

MANIPULATING SURVEYCTO TIMESTAMPS USING PANDAS

Hey guys! In this blog post, we will take a step-by-step tour to learn how we can manipulate the timestamps using the Python data analysis library - Pandas. Pandas is a fast, flexible, and easy to use open-source data analysis and manipulation tool built on top of the Python programming language.

 

At Outline India (hereafter, OI), we extensively use the SurveyCTO data collection platform to code our paper-based tools in digital format to conduct various field surveys. After each completed survey, OI researchers use the raw dataset file (in .csv document format) with multiple variables to perform the analysis using Pandas. Every raw dataset generated using SurveyCTO contains 3 mandatory timestamp variables – Submission Date, start time, and end time.

 


In this blog post, we will enquire about the various steps involved, from installing the pandas to carrying out the need-based data-time manipulation using in-built timestamp functions in the Pandas library.

 

So let's get started. 

Step 1: Install the Pandas and Tabulate package

Before you go any further, make sure you have installed the Python and PIP package. Carry out the following command on the windows default command-line interpreter to install the Pandas and tabulate package,

pip install pandas
pip install tabulate

Step 2: Import the Pandas and Tabulate library

We will import the Pandas and tabulate library and use this to read the raw dataset file and perform manipulations,

import pandas as pd
from tabulate import tabulate
VIEW RAWIMPORT_PANDAS.PY hosted with ❤ by GITHUB

Step 3: Read the dataset file with timestamps

Now, it's time to read the raw dataset (.csv file) using Pandas to perform the various timestamp manipulations.

import pandas as pd
from tabulate import tabulate
# read the csv file
df = pd.read_csv("raw_data.csv")
# displaying the DataFrame
print(tabulate(df, headers = 'keys', tablefmt = 'psql'))
VIEW RAWREAD_CSV_FILE.PY hosted with ❤ by GITHUB
Read More

भारत में बाल श्रमिकों पर COVID - 19 का प्रभाव

कोरोनावायरसकेफैलनेसेलगेलॉकडाउननेदुनियाऔरभारतमेंमानवजीवनऔरआजीविकाकोगंभीररूपसेप्रभावितकियाहै।हालांकि, लोगबेहतरभविष्यकीउम्मीदकेलिएसामाजिकदूरीकेमानदंडोंकापालनकररहेहैं, फिरभीविशेषज्ञोंकेअनुसारऐसीसंभावनाहैकिकुछबच्चेलॉकडाउनकेनिवारकउपायोंकेकारणबालश्रमकेशिकारहोसकतेहैं। विभिन्न अंतर-जुड़े कारक बाल श्रम को बढ़ावा देते हैं। बाल श्रम आवश्यकता का एक कारण और परिणाम दोनों ही है। गरीबी वह मूल कारण है जो बच्चों को पैसे कमाने के लिए किसी भी गतिविधि में शामिल होने के लिए मजबूर करता है। कुछ बच्चे पारिवारिक आय को बढ़ाने के लिए बाल श्रम करते हैं जबकि कई जीवित रहने के लिए।

अंतर्राष्ट्रीय श्रम संगठन 2016 के आंकड़ों (ग्लोबल एस्टिमेट्स ऑफ चाइल्ड लेबर : रिजल्ट्स एंड ट्रेंड्स, 2012-2016) के अनुसार, यह दर्शाता है कि विश्व में  5-17 वर्ष के बीच के 152 मिलियन बाल श्रमिक हैं, जिनमें से 23.8 मिलियन बाल श्रमिक भारत में हैं, मतलब इस आयु वर्ग में 16% बाल श्रमिक (या प्रत्येक छठवें बाल श्रमिक) भारत में हैं। हालांकि, भारत में बाल श्रम से जुड़े कुल मामलों में कमी देखी गई है। 2001 और 2011 की जनगणना के आंकड़े विशेष रूप से 14 साल से कम उम्र के बच्चों के श्रम की कुल संख्या में भारी कमी को दर्शाते हैं। जनगणना आंकड़े के अनुसार, 5-14 आयु वर्ग के 1.26 करोड़ कामकाजी बच्चों की संख्या (2001) से घटकर 43.53 लाख (2011) हो गए हैं।  हाल के दशकों के दौरान, भारत ने बाल श्रम की समस्या को दूर करने के लिए कई कानूनों और कार्यक्रमों को लागू किया है, जो 2001 और 2011 के बीच बाल श्रम मामलों की संख्या में कमी को दर्शाता  है।         

भारत सरकार ने महामारी के बाद से देशव्यापी स्कूल बंद करने की घोषणा की है। विशेषज्ञों के अनुसार यह बंद उन बच्चों को बुरी तरह प्रभावित किया है जो पहले से ही शिक्षा का लाभ नहीं ले रहे है। इस स्थिति ने अनेक कमजोर वर्ग के बच्चों को बाल श्रम में धकेल दिया है। एक सर्वे के दौरान एक बच्चे की माँ ने हमें स्कूल खुलवाने का आग्रह किया , उन्होंने कहा "स्कूल खुलवा दीजिये , बच्चे लोग दिन भर धमा चौकड़ी मचा रखते है " भारत में किसानों और खेतिहर मजदूरों के बच्चों पर भी इसका प्रभाव पड़ा है। घर पर होने से उनके बच्चे खेतों में बुआई और कटाई के दौरान माता-पिता की मदद कर रहे है। कारखानों, खेती या अन्य काम काज में लगे दिहाड़ी मजदूर, पैसा कमाने में असमर्थ थे। उन्हें परिवार का पालन पोषण करने में काफी कठिनाई का सामना करना पड़ रहा था। अपने माता-पिता की नौकरियों को खोने से, बच्चों को परिवार को चलाने के लिए काम करना पड़ रहा है। विशेषज्ञों के अनुसार सामान्य स्थिति फिर से स्थापित होने के बाद भी बड़ी संख्या में बच्चे अपनी शिक्षा जारी नहीं रख सकेंगे और ऐसे स्कूली बच्चों में से  एक बड़ी संख्या में बाल श्रम में लिप्त होने की एक उच्च संभावना है। उनके अनुसार हमारी विभिन्न श्रम कार्यो में बाल श्रम बहुत सस्ता है।

महामारी के कारण अनेक क्षेत्र में नौकरियों में तेजी से बेरोजगारी की संख्या में वृद्धि और आर्थिक नुकसान हुआ है। इसलिए इन स्थितियों को दूर करने के लिए और कंपनियों द्वारा वित्तीय संकट को पूरा करने के लिए वे बच्चे को श्रम के रूप में शामिल कर सकते हैं। वे बच्चों को मजदूर के रूप में नियुक्त करके इसकी भरपाई करने की कोशिश कर सकते हैं। ऐसी स्थिति में बच्चो का शारीरिक, मानसिक और यौन शोषण की अधिक संभावना होगी। कम उम्र की लड़कियों को शादी करके वेश्यावृत्ति में बेच दिए जाने की भी आशंका है।

Read More

COVID-19 DISRUPTS FOOD SECURITY FOR MILLIONS

Amongst the several disruptions spurred by COVID-19, the rise in hunger has been one of the most tangible and hard-hitting for the vulnerable. This blog highlights the reasons for food insecurity heightened by the pandemic. It also delves into the plight of the marginalized bearing the brunt of this double whammy.

Lockdown, restricted trade and travel have made headlines in the last few months consequently altering our regular social and economic patterns. While these governmental measures are seen as imperative steps to curb the spread of the disease, they have compounded the pre-covid food security crisis.   The struggle to achieve the UN’s second SDG “NO HUNGER”, was an already exacting task  before the pandemic and now, it’s become inexplicably difficult. Data suggests that the problem of food security has worsened over the past 5 years with the Global report on food crisis  (published every year by the UN WFP) stating that the unfortunate stuck in the turmoil of ‘Food Crisis’ reached 135 million, highest in the past four years dedicated to monitoring this problem.  

Moreover, internal conflicts, climate change, and economic instability have proven to be the most significant drivers of the food crisis. The calamity has worsened in key conflict areas, notably the Democratic Republic of the Congo and South Sudan as well as Haiti, Pakistan, and Zimbabwe. 61% of the total population in South Sudan faced food insecurity in 2019.  The World Food Programme (WFP) has estimated that, in all the countries where it operates, between April 2020 and April 2021, around 111 million people have become victims of food insecurity.

According to the UN, ‘Food Security’ means “that all people, at all times, have physical, social, and economic access to sufficient, safe, and nutritious food that meets their food preferences and dietary needs for an active and healthy life.” There are six pillars of food security - availability, access, utilization, stability, agency and sustainability and expectedly, Covid-19 took a toll on all six of them. The figure below illustrates the same, highlighting the damage to the humanitarian projects undertaken in each area.  Even though during the initial phase of the lockdown the food availability was not extremely hampered, its accessibility to the poor was drastically impacted.


Having developed an overview of it all, let’s delve further into How really did the Virus impact Security?

For the first time, the ‘Food Crisis’ has been driven by the Supply and Demand side both. As the Virus started spreading rapidly across the globe, supply and demand for food was simultaneously being chipped off all over the globe due to lockdowns and trade restrictions.

With the lockdown in effect in more than 100 countries in April 2020, the global supply chain was profoundly affected. “Right now, we have ample global stocks of food to feed everybody. The problem is the movement of those commodities”, said Arif Hussain, the director of research at WFP, in an interview with The Newyorker. The restriction on the movement of products across borders left the countries dependent on food imports completely defenceless.

From 2016 - 2018, the African continent imported almost 85% of its food, depicting their dependence on other countries with regard to food security. Due to the pandemic, last year acute food insecurity in Africa increased by over 60 percent.  Additionally, food producers reliant on selling their crops via distant export markets were highly vulnerable, particularly producers of perishable food and agricultural products. For instance in Bangladesh, shrimp farmers were fighting to eat due to 80% cancellation of export orders for shrimp amounting to  $54m (£39m)

As business activities came to a halt with the mandate of lockdown, unemployment started increasing and there was a dramatic loss of income on a global scale. The resulting drop in the purchasing power among those who lost their jobs had a severe impact on food security, especially for those who were already vulnerable. In India, 91% of the total workforce comprises informal workers.  Out of this about 80% workers lost their jobs during the lockdown and 63% percent survived on two meals per day. The global recession exacerbated social inequality in most countries and affected their access to basic needs such as healthcare, food, sanitation, water, etc, all of which have an impact on food security and nutrition.

Food security was also affected because of rising food prices. Last year, Global food prices rose around 20%  propelling a significant number of people to reduce their food consumption. A survey conducted in the Carribeans by CARICOM showed that around 71% of the respondents observed higher than usual food prices, with lowest income groups more commonly reporting increases. In Brazil, the food prices shot up by more than 15% last year. Rising food prices with people losing their incomes led more and more people to reduce their food consumption.

IMPACT OF COVID ON FOOD SECURITY IN INDIA:

Even though India is one of the world's largest food producers, the weakened supply chain operations during Covid-19, had a drastic impact on the accessibility of food for millions in the country. As the 94th rank holder in the Global Hunger Index, the serious problem of food security in India was aggravated by the pandemic.

Accessibility of food became extremely strenuous as the purchasing power of the society declined while food inflation spiked up to 11.7% last October. A study conducted in the rural area of UP suggested that household food insecurity (HFI) increased drastically from 21% in December 2019 to 80% in August 2020.

Moreover, food safety nets such as Mid Day Meal, which serve as a lifeline for children studying in government schools came to a halt in some states and left its beneficiaries defenseless. Thus, with high food prices, rising unemployment, inoperative food safety nets, distorted supply chain the country’s vulnerability to food insecurity compounded immensely last year.

Way Forward

The pandemic has not only challenged the health system but also the other sectors such as Education, Agriculture, etc. However, in terms of Hunger and Poverty, there are certain goals that governments should formulate in order to prevent such a crisis.

Supply chains should be bolstered and strengthened.

Governments need to strengthen their food safety nets and provide financial support to their beneficiaries in times of crisis.  When on one hand India announced a USD 22.6 billion relief package to take care of food security for the poor, the Brazilian President took a back foot and left the people to decide their own fate. The hunger Index in Brazil has increased to its highest in the past 16 years. People living under chronic hunger increased from 10 million to 19 million in Brazil last year.

It’s an obvious action on the part of international organizations and governments to enhance preparedness and prevention. As food insecurity was already increasing before the pandemic and has only now worsened, indicates that this will be the new normal. Thus, it's important for us to not get caught off guard by such a crisis and prevent food insecurity from economical and environmental changes.


Read More

SEX WORKERS IN INDIA - VIRUS AND WOES

The covid-19 pandemic over the last year and a half has cast a looming shadow on the lives of the marginalized communities. Sex Workers, one such community, already face widespread taboo and stigma in Indian society. They are looked down upon for their livelihood choices and are often cornered even amongst the informal workers. The pandemic has pushed them into further poverty and marginalization, increasing their hardships by many folds.

Read More

COVID 19 AND INDIA’S HERITAGE CULTURE

The rich cultural diversity of India is well reflected in the vivid, distinct, and enchanting folk art and crafts. The subcontinent has served as an epicenter for art, heritage, and culture for eons. Our latest blog underscores the significance of vibrant heritage that usually attracts 10 million global travelers almost every year and the challenges faced by it in the wake of the pandemic.

Read More

HARNESSING INDIA’S DEMOGRAPHIC DIVIDEND

The demographic dividend is defined as an advantage in terms of economic growth that a country acquires due to a shift in its demography as more people fall into the labor force. To put it simply, when a large part of a country’s population starts entering the age gap of 5-64, a potential demographic dividend is possible. This shift is valued as during this time there are more people who can contribute to the economy and are independent when compared to children and elders who depend on the working class for survival. While Thailand and South Korea can be cited as recent examples that have been able to reap the benefits of the same, nations like India and Bangladesh are still struggling.

Read More

Newsletters