Animal Population in India

Deepti Chauhan

July 31, 2020

Introduction

This is a Shiny App which shows the population of elephants, tigers and leopards in different states of India. The side panel gives the option of selecting one or more of the animals On the main panel is a map drawn using Leaflet package to dynamically show the population. The size of the circle corresponds to the population. The color of circle corresponds to the animal selected. On clicking on the icons, the user can see the details - Name of the state, name of the animal and the population

Input

The app takes in input in terms of whether they want to see the population of elephants, tigers and leopards in Indian states. The user is provided a checkbox input type option in the side panel.

Output

library(shiny)
library(leaflet)
shinyUI(fluidPage(

    # Application title
    titlePanel("Animal Population in India"),

    # Sidebar with a slider input for number of bins
    sidebarLayout(
        sidebarPanel(
            h3("Choose Animals"),
            checkboxInput("elephant", "Elephants", value = TRUE),
            checkboxInput("tiger", "Tigers", value = FALSE),
            checkboxInput("leopard", "Leopards", value = FALSE),
        ),

        # Show a plot of the generated distribution
        mainPanel(
            h3("Population of Animals in Indian States"),
        leafletOutput("mapPlot"),
        )
    )
))

Animal Population in India

Choose Animals

Population of Animals in Indian States

Final Slide

Thank You!