Populations
Data source: Page 1, District Development Indicators- 2
library(dplyr);library(stringr);library(ggplot2);theme_set(theme_bw())
library(ggthemes)
data.frame(
population= c(rep("male",3),
rep("female",3),
rep("rural",3),
rep("urban",3),
rep("sc",3),
rep("st",3)),
year= as.character(rep(c(2001,2011,2018),6)),
value= c(1612,1942,2220,1602,1970,2274,2993,3622,4148,211,289,346,700,858,
990,0.1,0.38,0.47)
-> pop
)$population <- str_to_title(pop$population)
popcolnames(pop) <- str_to_title(colnames(pop))
%>% ggplot(aes(Year, Value, col= Population, group= Population)) +
pop geom_line(size= 1.2) +
geom_point(size= 5) + scale_color_calc() +
labs(title = "Population in District",
subtitle = "District Development Indicators- 2",
y= "Numbers in Thousands")
Number of Literate Persons
Data Source: Page 1, District Development Indicators- 2
data.frame(
Literate= c(rep("Male",3),
rep("Female",3),
rep("Total",3)),
Year= as.character(rep(c(2001,2011,2018),3)),
Value= c(778,1170,1565,283,702,1166,1061,1872,2732)
-> lit )
%>% ggplot(aes(Year, Value, col = Literate, group= Literate)) +
lit geom_point(size= 5) +
geom_line(size= 1)+
labs(title = "Number of Literate Persons",
subtitle = "District Development Indicators- 2",
y= "Numbers in Thousands")+
scale_color_fivethirtyeight()+
geom_text(aes(label= Value),
col="black",
vjust=-1,
size=3)+
ylim(c(200,2800))
Police Station
Data source: Page 2, District Development Indicators- 2
data.frame(
Location= c(rep("Rural",3),
rep("Urban",3),
rep("Bus station",3),
rep("Railway station",3)),
Year= as.character(c(2001,2011,2018),4),
Value= c(17,17,15,10,11,13,142,147,136,34,35,34)
-> police )
%>% filter(Location %in% c("Rural","Urban")) %>%
police ggplot(aes(as.factor(Year), Value, fill= Location)) +
geom_col(position= "dodge", col= "black", size= 1) +
labs(x= "Year", y= "Numbers" ,
title = "Number of Police Station",
subtitle = "District Development Indicators- 2") +
scale_fill_excel_new()+
geom_text(aes(label= Value),
position= position_dodge(width = 1),
vjust= 1.3,
col= "yellow", size=3.5)
Note: Railway station including halts
%>% filter(!Location %in% c("Rural","Urban")) %>%
police ggplot(aes(as.factor(Year), Value, fill= Location)) +
geom_col(position = "dodge", col= "black", size= 1) +
labs(title = "Number of Bus & Railway Station",
subtitle = "District Development Indicators- 2",
y= "Numbers", x= "Year") +
scale_fill_excel_new()+
geom_text(aes(label= Value),
position = position_dodge(width = 1),
vjust=1.2,
size= 3.5, col="yellow")
Railway line length
Data source: Page 2, District Development Indicators- 2
data.frame(Line= c(rep("Big line", 3), rep("Short line",3)) ,
Year= rep(c(2001,2011,2018),2),
Length= c(203, 233, 233, 30, 0, 0)) -> line
%>% ggplot(aes(as.factor(Year), Length, fill= Line)) +
line geom_col(col= "black", size= 1, position = "dodge")+
labs(title = "Railway line length",
subtitle = "District Development Indicators- 2",
y= "Length in K.m", x= "Year") +
scale_fill_economist()+
geom_text(aes(label= Length),
position = position_dodge(width = 1),
vjust=1.2,
col="yellow",
size=3.4)
Post Office
Data source: Page 2, District Development Indicators- 2
Rural and Urban
data.frame(Location= c(rep("Rural",3), rep("Urban",3)),
Year= rep(c(2001,2011,2018)),
Number= c(400, 404, 394,24,24,27)) -> po
%>% ggplot(aes(as.factor(Year), Number, fill= Location)) +
po geom_col(position = "dodge", col= "black", size= 1) +
labs(title = "Number of Post Office",
subtitle = "District Development Indicators- 2",
y= "Numbers", x= "Year") +
scale_fill_excel_new()+
geom_text(aes(label=Number), position = position_dodge(width = 1),
vjust=1.2,
size=3.5,
col="white")
Telephone Connection over the years
data.frame(Year= c(2001,2011,2018),
Connection= c(4369,14671,2805)) -> tel
%>% ggplot(aes(as.character(Year), Connection, group=1)) +
tel geom_line(col= "darkblue", size= 1) +
geom_point(size= 5, col= "tomato2") +
scale_x_discrete(breaks= c(2001,2011,2018))+
labs(title = "Number of Telephone Connections over the Years",
subtitle = "District Development Indicators- 2",
y= "Numbers of Connection", x= "Year") +
ylim(c(0,15500))+
geom_text(aes(label= Connection),
vjust=3,
size= 3.2)
Or we can represent the same graph using Lollipop Plot
%>%
tel ggplot(aes(as.character(Year), Connection, group=1)) +
geom_segment(aes(x= as.character(Year), xend= as.character(Year),
y= 0, yend= Connection))+
geom_point(size= 6, col= "tomato2") +
scale_x_discrete(breaks= c(2001,2011,2018))+
labs(title = "Number of Teliphone Connections",
subtitle = "District Development Indicators- 2",
y= "Numbers of Connection", x= "Year") +
ylim(c(0,15500))+
geom_text(aes(label= Connection),
vjust=-1.1,
size=3)
Business Bank
Data source: Page 2, District Development Indicators- 2
Nationalized bank branches
data.frame(N.bank = c(99,114,213), Year= c(2001,2011,2018)) -> bank
$Year <- as.character(bank$Year)
bank%>% ggplot(aes(Year, N.bank)) +
bank geom_segment(aes(x= Year, xend= Year, y= 0, yend= N.bank)) +
geom_point(size= 6, col= "tomato2") +
labs(title = "Nationalized bank branches",
subtitle = "District Development Indicators- 2",
y= "Numbers of branches", x= "Year") +
ylim(c(0,225))+
geom_text(aes(label= N.bank),
vjust= -1.2,
size= 3)
<- data.frame(Bank= c(rep("Nationalized Bank",3),
bank rep("Rural Bank",3),
rep("Co-operative Bank",3),
rep("Other",3))) %>% as_tibble() %>%
mutate(Year= rep(c(2001,2011,2018),4),
Value= c(99,144,213,85,89,110,37,29,28,2,3,34))
$Year <- as.character(bank$Year) bank
%>% ggplot(aes(Year, Value, fill= Bank)) +
bank geom_col(position = "dodge", col= "black", size= 1) +
labs(title = "Bank business",
subtitle = "District Development Indicators- 2",
y= "Numbers of Bank branches", x= "Year") +
scale_fill_colorblind()+
geom_text(aes(label=Value),
position = position_dodge(width = 1),
vjust=1.2,
size=3.2,
col="white")
Cheap street store
Data source: Page 3, District Development Indicators- 2
Rural and Urban
data.frame(
Location= c(rep("Rural",3),
rep("Urban",3)),
Year= rep(c("2001","2011","2018"),2),
Value= c(1784,1858,2025,108,109,100)
-> storelocat
) $Year <- as.character(storelocat$Year) storelocat
%>% ggplot(aes(Year, Value, fill= Location)) +
storelocat geom_col(position = "dodge", col= "black", size= 1.2)+
scale_fill_fivethirtyeight() +
labs(title = "Banks",
subtitle = "District Development Indicators- 2",
y= "Numbers of Banks", x= "Year")+
geom_text(aes(label= Value),
position= position_dodge(width = 1),
vjust= -.8,
size= 3.3)+
ylim(c(0,2125))
Biogas Plant
data.frame(
storety= c(rep("Biogas plant",3)),
Year= rep(c(2001,2011,2018),2),
Value= c(7830,8499,12409)
-> bplant
) $Year <- as.character(bplant$Year) bplant
%>% ggplot(aes(Year, Value)) +
bplant geom_segment(aes(x= Year, xend= Year, y= 0, yend= Value), col= "darkblue")+
geom_point(col= "tomato2", size= 8)+
labs(title = "Biogas Plants",
subtitle = "District Development Indicators- 2",
y= "Numbers of Biologas Plants", x= "Year") +
ylim(c(0,14350))+
geom_text(aes(label=Value),
vjust=-1.6,
size=3)
Agriculture
Data source: Page 3, District Development Indicators- 2
data.frame(
Type= c(rep("Pure sown area",3), rep("Area sown more than once",3),
rep("Pure irrigated area",3), rep("Gross irrigated area",3)),
Year= rep(c(2001,2011,2018),4),
Value= c(291,279,277,158,183,192,252,244,248,346,382,390)
->aculture
) $Year <- as.character(aculture$Year) aculture
%>% ggplot(aes(Year, Value, fill= Type))+
aculture geom_col(col= "black", size= 1.2, position = "dodge")+
theme(legend.text = element_text(size= 10)) +
scale_fill_calc() +
labs(title = "Agriculture",
subtitle = "District Development Indicators- 2",
y= "Thousand hect.", x= "Year")+
geom_text(aes(label=Value),
position = position_dodge(width = 1),
vjust= -.5,
size= 2.8)
Agricultural production
Data source: Page 3, District Development Indicators- 2
Food Grains, Sugarcane, & Potato
data.frame(
Type= c(rep("Food grains",3), rep("Sugarcane",3), rep("Potato",3)),
Year= rep(c(2001,2011,2018),3),
Value= c(836.67,939.15,1155.91,611.99,525.34,551.29,246.58,216.86,176.55)
-> agriproduction
) $Year <- as.character(agriproduction$Year) agriproduction
%>% ggplot(aes(Year, Value, col= Type, group= Type)) +
agriproduction geom_line(col= "black", size= 1)+
geom_point(size= 6)+
scale_color_calc()+
ylim(c(0,1220))+
labs(title = "Agricultural Production",
subtitle = "District Development Indicators- 2",
y= "Thousand m. ton", x= "Year")+
geom_text(aes(label= round(Value)),
vjust= -1.3,
size= 3,
col="black")
Oil seed
data.frame(
Year= as.character(c(2001,2011,2018)),
Value= c(1.79,2.93,7.41)
%>% ggplot(aes(Year, Value, group= 1)) +
) geom_line(col="darkblue", size=1) +
geom_point(size=5, col="tomato2") +
labs(title = "Oil seed production",
subtitle = "District Development Indicators- 2",
y= "Thousand m. ton", x= "Year")+
ylim(c(1.5,8))+
geom_text(aes(label=Value),
vjust= -1,
hjust=1)
Irrigation
Data source: Page 3, District Development Indicators- 2
Canals length
data.frame(
Year= as.character(c(2001,2011,2018)),
Value= c(1458,1698,1705)
->canals )
%>% ggplot(aes(Year, Value, group= 1)) +
canals geom_line(size= 1, col= "steelblue") +
geom_point(size= 5, col= "tomato2")+
labs(title = "Canals length",
subtitle = "District Development Indicators- 2",
y= "K.m.", x= "Year")+
geom_text(aes(label= Value),
vjust=-1,
hjust=1)+
ylim(c(1450,1720))
State tube well
data.frame(
Year= as.character(c(2001,2011,2018)),
Value= c(93939,534,551)
-> tubewell )
%>% ggplot(aes(Year, Value, group= 1))+
tubewell geom_line(col="darkblue", size= 1)+
geom_point(col="tomato2", size= 5.5)+
labs(title = "State tube well",
subtitle = "District Development Indicators- 2",
y= "Number of tubewell", x= "Year")+
ylim(c(0,97000))+
geom_text(aes(label= Value),
vjust= -1,
size= 3.5,
hjust=-.08)
Animal husbandry
Data source: Page 3, District Development Indicators- 2
data.frame(
Husbandry= c(rep("Total livestock",3),
rep("Animal Hospital",3),
rep("Cattle service center",3),
rep("Artificial semination center",3)),
Year= as.character(rep(c(2001,2011,2018),4)),
Value= c(34,35,37,50,47,48,22,70,86,39,0,0)
->anihus )
%>% ggplot(aes(Year, Value, col= Husbandry, group= Husbandry)) +
anihus geom_point(size= 4) + geom_line(size= 1) +
labs(title = "Animal Husbandry",
subtitle = "District Development Indicators- 2",
y= "Numbers", x= "Year") +
scale_color_colorblind()+
geom_text(aes(label= Value),
vjust=-1.3,
size=2.8,
hjust=1.8)+
ylim(c(0,90))
Industry
Data source: Page 4, District Development Indicators- 2
Working person
data.frame(
Year= as.character(c(2001,2011,2018)),
Value= c(1560,1802,2612)
%>%
) ggplot(aes(Year, Value, group= 1)) +
geom_line(size= 1, col= "darkblue") +
geom_point(size= 5, col= "tomato2") +
labs(title = "Working Person",
subtitle = "District Development Indicators- 2",
y= "Numbers", x= "Year")+
geom_text(aes(label= Value),
size=3.5,
hjust=1.4,
vjust=-.2)+
ylim(1550,2650)
Education
Data source: Page 4, District Development Indicators- 2
data.frame(
type= c(rep("Primary school",3),
rep("High school",3),
rep("Secondary school",3)),
Year= rep(c(2001,2011,2018)),
Value= c(1539,2409,3796,81,93,1666,21,56,662)
-> edu
) $type <- as.character(edu$type) edu
Primary school, High School, & Secondary school
%>% ggplot(aes(Year, Value, col= type, group= type)) +
edu geom_line(size= 1)+
geom_point(size= 5)+
labs(title = "Education",
subtitle = "District Development Indicators- 2",
y= "Numbers", x= "Year") +
scale_color_colorblind()
College, Postgraduate college, University, Industrial training institute, Teacher training institute
data.frame(
Type= c(rep("College",3),
rep("PG college",3),
rep("University",3),
rep("ITI",3),
rep("TTI",3)),
Year= rep(c(2001,2011,2018),5),
Value= c(3,5,283,0,0,66,0,1,0,2,47,112,1,1,16)
-> education
) $Year <- as.character(education$Year) education
%>% filter(Type!= "College") %>%
education ggplot(aes(Year, Value, col= Type, group= Type)) +
geom_line(size= 1)+
geom_point(size=5)+
labs(title = "Educational Institutes",
subtitle = "District Development Indicators- 2",
y= "Numbers", x= "Year") +
scale_color_colorblind() +
ylim(c(-8,125)) +
theme(legend.position = "left")->g1
%>% filter(Type=="College") %>% ggplot(aes(Year, Value, group=1)) +
education geom_line(size=1, col= "darkblue") +
geom_point(size= 5, col= "tomato2") +
labs(title = "Universities",
y= "Numbers", x= "Year") +
scale_color_colorblind() +
ylim(c(-8,320)) ->g2
::grid.arrange(g1,g2) gridExtra
Public health, Hospital & Dispensary
Data source: Page 5 , District Development Indicators- 2
data.frame(
Medical= c(rep("Allopathic",3),
rep("Ayurvedic",3),
rep("Homeopathic",3),
rep("Hellenic",3),
rep("C.Health Center",3)),
Year= as.character(rep(c(2001,2011,2018),5)),
Value= c(25,9,9,33,36,38,34,40,40,8,9,9,0,13,17)
-> data )
Allopathic, Ayurvedic, Homeopathic, Community Health Center
%>%
data ggplot(aes(x= Year, y= Value, fill= Medical)) +
geom_col(col="black",size=1, position = "dodge")+
labs(title = "Medical",
subtitle = "District Development Indicators- 2",
y= "Numbers", x= "Year") + scale_fill_excel_new()+
geom_text(aes(label= Value),
position = position_dodge(width = 1),
vjust= 1,
hjust= .7,
size= 3,
col="white")
data.frame(
Medical= c(rep("Priamry Health.C",3),
rep("Maternal Welfare.C",3)),
Year= as.character(rep(c(2001,2011,2018),2)),
Value= c(90,83,79,23,25,25)
->med )
%>% filter(Medical== "Priamry Health.C") %>%
med ggplot(aes(Year, Value, group=1))+
geom_line(size=1, col= "darkblue")+
geom_point(size=8, col= "tomato2")+
ylim(c(78,92))+
labs(title = "Primary Health Centre",
subtitle = "District Development Indicators- 2",
y= "Numbers", x= "Year")->a1
%>% filter(Medical!= "Priamry Health.C") %>%
med ggplot(aes(Year, Value, group=1))+
geom_line(size=1, col= "darkblue")+
geom_point(size=8, col= "tomato2")+
labs(title = "Maternal Welfare Centre",
subtitle = "District Development Indicators- 2",
y= "Numbers", x= "Year")+
ylim(c(22.5,25.5))->a2
::grid.arrange(a1,a2) gridExtra
Paved roads length
Data source: Page 5, District Development Indicators- 2
data.frame(
Year= as.character(c(2001,2011,2018)),
Length= c(3832,5658,7420)
%>%
) ggplot(aes(Year, Length)) +
geom_segment(aes(x= Year, xend= Year, y= 0, yend= Length),
col="tomato2",
size= 1) +
geom_point(size= 8,col= "darkblue")+
ylim(c(0,8000))+
labs(title = "Road length",
subtitle = "District Development Indicators- 2",
y= "K.m.", x= "Year")+
geom_text(aes(label= Length),
vjust=-1.4,
size= 3.2)
Taps/ Hand pumps
data.frame(
Location= c(rep("Rural",3),
rep("Urban",3)),
Year= as.character(rep(c(2001,2011,2018),2)),
Value= c(3106,3290,3287,7,9,13)
-> taps )
%>% filter(Location=="Rural") %>%
taps ggplot(aes(Year, Value, group=1))+
geom_line(col= "darkblue", size=1)+
geom_point(col="tomato2", size= 5)+
labs(title = "Taps & Hand pumps",
subtitle = "District Development Indicators- 2",
y= "Number", x= "Year")+
geom_text(aes(label= Value),
vjust=2,
size= 3.3,
hjust=0)+
ylim(c(3095,3300))
Entertainment
Data source: Page 6, District Development Indicators- 2
Cinema house
data.frame(
Year= as.character(c(2001,2011,2018)),
Value= c(16,17,4)
%>% ggplot(aes(Year, Value, group= 1))+
) geom_line(col= "darkblue", size= 1)+
geom_point(col= "tomato2", size= 5)+
labs(title = "Cinema house",
subtitle = "District Development Indicators- 2",
y= "Number", x= "Year")+
ylim(c(3,18))+
geom_text(aes(label= Value),
vjust=-1,
size= 3.2)
Number of seats in the cinema house
data.frame(
Year= as.character(c(2001,2011,2018)),
Value= c(8270,6784,2729)
%>% ggplot(aes(Year, Value, group= 1))+
) geom_line(col= "darkblue", size= 1)+
geom_point(col= "tomato2", size= 5)+
labs(title = "Number of Seats in the Cinema",
subtitle = "District Development Indicators- 2",
y= "Number", x= "Year")+
geom_text(aes(label= Value),
size=3.2,
vjust=1.9,
hjust=1)+
ylim(c(2500,8300))
data.frame(
Year= as.character(c(2001,2011,2018)),
Value= c(205.17,2828.13,9168.72)
%>% ggplot(aes(Year, Value, group= 1))+
) geom_line(col= "darkblue", size= 1)+
geom_point(col= "tomato2", size= 5)+
labs(title = "District household Total Net Production",
subtitle = "District Development Indicators- 2",
y= "In corore", x= "Year")+
ylim(c(200,9800))+
geom_text(aes(label= round(Value)),
vjust=-1,
size= 3.5,
hjust= .8)
Regards
Please visit my profile
Alok Pratap Singh (Research Scholar)
Linkedin (Open in New TAB)
Department of Psychology
University of Allahabad
Without data you’re just another person with an opinion