Skip to content

Instantly share code, notes, and snippets.

@loiyumba
loiyumba / Hospital_Ranking_2016.r
Last active September 1, 2016 18:13
Hospital ranking shiny app for 2016
library(shiny)
setwd("..\\shiny_app\\Nat_Hos_Ranking\\hospital_ranking")
# Read the data
hosp_ranking <- read.csv("cleaned_data3.csv", stringsAsFactors = FALSE)
hosp_ranking$Name <- enc2native(hosp_ranking$Name)
hosp_ranking$Address <- enc2native(hosp_ranking$Address)
hosp_ranking$Telephone <- enc2native(hosp_ranking$Telephone)
### Fatalities in Terrorist Violence in India's Northeast 1992-2016 ###
## Date: 16-Aug-16
# Set working directory
setwd("..\\manipur\\terror\\Data")
# Load the packages
require(rvest)
require(dplyr)
require(ggplot2)
@loiyumba
loiyumba / studentDashboard.R
Created May 16, 2016 04:11
Dashboard for school students
require(shiny)
require(shinydashboard)
require(ggplot2)
require(ggthemes)
require(magrittr)
sample <- read.csv("new_sample4.csv", stringsAsFactors = FALSE)
header <- dashboardHeader(title = "XYZ School Student Dashboard", titleWidth = 370)
@loiyumba
loiyumba / Indian_cities_temp.R
Created April 8, 2016 17:54
dygraphs for indian cities
library(shiny)
library(xts)
library(dygraphs)
library(data.table)
india <- fread("india.csv")
# Define UI for application that draws a histogram
ui <- fluidPage(
@loiyumba
loiyumba / Airlines_emotion.R
Created April 1, 2016 15:49
Twitter emotions on major airlines in India
# To extract tweets from twitter
# Load the required libraries
require(twitteR)
require(stringr)
require(syuzhet)
# Set working directory
setwd("..\\tweet_analysis\\Airlines")
@loiyumba
loiyumba / interactive_map.R
Created March 30, 2016 05:37
mapping indian subcontinent earthquake
## Major earthquake in Indian Sub-continent
## Load the libraries
library(shiny)
library(leaflet)
# Attach the data
quake_data <- read.csv("india.csv", stringsAsFactors = FALSE)
# UI side
## Shiny app for Hospital Directory
# Load the package
require(shiny)
# Data is cleaned and reloaded
hosp <- read.csv("cleaned2.csv", stringsAsFactors = FALSE)
# Define the overall UI
ui <-
@loiyumba
loiyumba / cities_temp.r
Created March 18, 2016 04:53
Heatmap of selected Indian Cities
### Temperature of Indian Cities ###
# Load the require libraries
require(data.table)
require(ggplot2)
require(ggthemes)
# Set working directories
setwd("..\\Global Temperature")
### Religious Population Map of India and Northeast India
# Load the the necessary packages
require(choroplethrAdmin1)
require(choroplethr)
# Set working directory
setwd("..\\Data\\census")
# Load the data
rel_pop <- read.csv("pop_rel_com_2011.csv")
# Drop not-require observations and variables
### Words count of Bhagavadgita text ###
# Load the necessary packages
require(wordcloud)
require(tm)
# Set working directory
setwd("..\\Words Cloud for Bhagavadgita")
# Get the data from the site - www.gutenberg.org where all the texts are available for free