Machine Learning

For the final project, the ultimate goal was to determine whether it was possible to determine food prices, depending on the type of food, year and rainfall that was received that year. Throughout the process, there was a lot of data exploration that was needed to be done, to determine how to model the machine learning technique to solve the problem.

Furthermore, it was important to research how the food prices can be affected by rainfall. For the country of India, further research about the places where crops are grown, the types of food, and its correlation to weather or climate patterns. For example, an abundance of water was crucial to the rice plants, meaning that high rainfall meant lower prices for the market. However, for certain plants, high rainfall did not necessarily mean high returns on crops.

For this project, I used the random forest supervised learning algorithm and Decision trees to solve the regression problem. When the two different technique was applied to the model, it was clear that the decision tree was a better method once the features were cleared out for easier processing.

Originally, the idea for the project was to determine how food prices for each region in India was affected by the rainfall in that district throughout the year. This soon became extremely difficult to manipulate and clean the data. One of the first reasons for this was because the areas of India can be divided into several ways, according to district, state, city and more. With this information, the other data sets had to be matched accordingly based on the region. However more problems arose as the data was not fully available for the same range of years/timeframe.

Although I was not able to fully achieve my goal of predicting the food prices based upon the rainfall of the region, I learned countless data science skills throughout the process. It is my humble regard to honestly say that this project was one of the most interesting project, simply because it did not just require excellent coding skills, but also critical thinking and problem solving to handle, read and understand the figures and data that was given to me.

Research sources: 1. http://www.yourarticlelibrary.com/crops/crop-regions-in-india/74996

2. https://www.mapsofindia.com/top-ten/india-crops/

3. https://www.povertyactionlab.org/evaluation/impact-rainfall-insurance-farmer-behavior-india

4. http://agricoop.nic.in/all-india-crop-situation

Data Exploration, Hypothesis Formation

Previously, the project had two source of data, which was world food prices, and the import and export prices of food in India. However, throughout the course of the project, there have been additional datasets that have been added including the rainfall rates and the crime rates. These data have been added in order to build a machine learning model that takes more than two inputs of data to predict the outcome. With two datasets, it was clear that only a linear correlation could be shown, which did not allow any room for improvement with the machine learning model.

The rainfall in India was added to determine the potential growth of local crops and the production rate of farmed goods, which will affect the basic supply and demand of the food market and therefore the import and export prices. In addition, the crime rates dataset was included to determine whether there was any relationship between the food prices and the crime rates, specifically theft, ransom, burglary and more. Naturally, it is expected that when food prices rise, crime rates may also increase.

With the addition of these four data sets, the implementation of the machine learning model may prove to be more useful. One of the biggest challenge so far is to clean the data and pull the necessary information to compare and form a hypothesis.

For example, the crime rate datasets had more than 20 different csv files, each with countless unique data structures and information. The time consuming filtering process was crucial to extract the information that was relevant and useful to this project.

Furthermore, with the abundance of data for each dataset, data exploration and manipulation was quite extensive, along with the data description for the four different datasets.

For the additional datasets:

https://www.kaggle.com/rajanand/rainfall-in-india

https://www.kaggle.com/rajanand/crime-in-india

Import & Export affecting Food Prices in India

Members of the project: Samuel Lee

Proposal

Throughout the course of the semester, learning to use the tools and techniques of data science to analyze data and apply into real-life situations has been the primary goal of the class. Although there are several areas and different fields that caught my interest, I chose to focus on a specific geographical location. In this project, I will be looking at the country of India, where I will combine a dataset that reveal the prices of essential foods throughout the years and the import and export of India.

One of the motivations for choosing a project related to fields of economy is because of the effectiveness of using data science for analyzing data for future forecasts and predictions. If there is any potential links or correlations with the amount of import and export of India and the food prices of the country, then food prices may become predictable based upon the import and exports of the country and vice versa. Although it is generally known that import and export directly affects the economy of the country, it is uncertain whether it will affect food prices of the country. It may also be important to note that the effects of the economy from imports and exports may not appear immediately, especially to food prices.

Another motivation for choosing this project is the abundance of dataset. The dataset for the food prices are quite extensive, and is available to countries all around the world. Furthermore, the data which indicates export and import specifically reveal the amount of money and the location to which the import or export was made, meaning that complex models and algorithms may be implemented to extend to a bigger project, although it is highly unlikely to do this in this course.

At the moment in the course, we are discussing the possible uses of machine learning in data science. Once the combination of the datasets are complete, machine learning may become important to forecast possible food prices, and perhaps import and export amounts to and from India.

Below are some of visual description of the dataset, represented as bar graphs and pie charts.

For a basic bar graph showing the top 10 foods that were sold in India in the database, and the scatterplot of the general food prices, showing the range of the prices, see below.


The links for the data sources are:

  1. https://www.kaggle.com/rajanand/import-and-export-by-india#PC_Export_2014_2015.csv
  2. https://www.kaggle.com/jboysen/global-food-prices#wfp_market_food_prices.csv