India’s Population by City and State

AH

8/17/2019

Summary

India Cities Database

This document was rendered at August 18, 2019 at 12:19:36.

The shinyapp list down prominent cities in India. Each row includes a city’s latitude, longitude, state and population of each city. The data set was chosen for the assignment.

Description of ShinyApp

Three files are used

  1. reading the JSON file from India Cities Database

INmapdata <- fromJSON(“https://simplemaps.com/static/data/country-cities/in/in.json”, flatten = TRUE) 2. removing any NA

completerecords <- na.omit(INmapdata)

  • ui.R - defines user interface and have city, state and population as variables.

  • server.R - subsets that data for the city &/or, state &/or population selected.

  1. Condition 1 :if (input\(state_n != "All") {data <- data[data\)state == input$state_n,]}
  2. Condition 2 :if (input\(city_n != "All") {data <- data[data\)city == input$city_n,]}
  3. Condition 3 :if (input\(population_n != "All") {data <- data[data\)population >= input$population_n,]}