Closed CarolineMarkMortensen closed 9 years ago
Hi Caroline and co,
Good assignment. You write clean and effective R code, that's very nice to see. I would recommend using the ggplot2
package to do all the plotting (then you only need to learn one syntax) but that's ultimately up to you.
APPROVED
title: "Assignment 2" author: "Gruppe 17: Anna Møller, Tamara Møller-Hastrup, Michal Mróz and Caroline Mortensen" date: "9. nov. 2015"
output: html_document
We have scraped data from the website www.ipaidabribe.com and we collected a 1,000 observations. As the website only shows 10 reports per page we have to collect our data by scraping the last 100 pages.
The figure shows which department receives most bribes in the given period. Public Works Department, Revenue, Airports, Education, Labour, Stamps and Registration received a small amount of bribes so we cathegorized these deparments in Others. In this time period the bribes to "Municipal Services" and "Others" increased significantly more than the other departments.
The plot below shows how many bribes were reported on the certain dates. That you can see no apparent patterns in the distribution of the bribes given. Also no apparent fluctuations in terms of a certain day of the week.
The table below shows which day of the week the most posts are posted.
The plot below shows the correlation between the size of the bribes and the views per day. Observations below 500 and above 1,000,000 is removed from the data.
The correlation is calculated to be:
We therefore conclude that the result is not significant.
This bar plot shows the mean number of views per day for bribes given in each state.
People who uses the website are more likely to look at the post about Arunachal Pradesh than the other states.
The next section shows different maps of India. The first map depicts the number of bribes paid in each state, the second map shows the total size of all bribes paid in each state and the last map shows the average value of a bribe per state in India.
That as you can see on the map, the highest number of bribes was given in Karnataka, note that this state reports triple number of bribes as any other state.
In the map below we observe the total size of all bribes in each state. The map depicts map that there are significant differences between states in the size of bribes.
We see in the table above that the state Karnataka have reported the highest amount on bribes, which makes sense, as Karnataka also had the most reported bribes. What is more interesting is that even though Uttar Pradesh only reported a third of the total number of bribes than in Karnataka, the total value of the reported amount of the bribes is only 235,271 rupees smaller.
The figure below shows the average size of the bribes paid in each state, and the table shows the name of the states where the average bribes are the biggest.
It is hard to tell the different states of India apart we construct a table to better look at the results. This table shows that the average size of a bribe is biggest in Assam.
All in all, we found out that www.ipaidabribe.com post most posts on Saturdays and that there is no correlation between the size of a bribes and views. At the same time it is seen that the visitors to this webpage is more interested in the corruption in the state of Arunachal Pradesh than in the rest of the states. Furthermore, we found that the most recevied brib is paid to Municipal Services and "others" in the given time period, while the other departements is very stablie in the time period. In the last part of your assignment we had made three maps where we can see respectively the number of bribes, the total values of bribes and the average size of bribes. In the first maps only one state is is very conspicuous and that state is Karnataka. In the second map there are 5 very distinctly States exactly Karnataka, Uttar Pradesh, Madhya Pradesh, Maharashtra and Assam. In the last map the state with the biggest average bribes i Assam.