This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(shinydashboard) | |
library(dplyr) | |
library(tidyr) | |
library(plotly) | |
library(DT) | |
library(rPython) | |
library(pdftools) | |
python.load("helperP3.py") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Sat Aug 13 21:12:30 2016 | |
@author: Diego | |
""" | |
from selenium import webdriver | |
#from bs4 import BeautifulSoup # For HTML parsing | |
from time import sleep # To prevent overwhelming the server between connections | |
from collections import Counter # Keep track of our term counts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_analytics(): | |
""" | |
Created on Tue Aug 16 22:48:18 2016 | |
@author: Diego | |
""" | |
import pandas as pd | |
from collections import Counter # Keep track of our term counts | |
from helperP3 import load_obj, skills_info | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
def glassdoorScrape(get_short = False): | |
""" | |
Created on Tue Aug 16 22:41:30 2016 | |
Scrape Glassdoor website using SELENIUM | |
@author: Diego De Lazzari | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shinyUI( | |
fluidPage( | |
titlePanel('Tracking migration paths from the Middle East'), | |
dashboardPage( | |
dashboardHeader(title = "Navigation"), | |
dashboardSidebar( | |
sidebarMenu( | |
menuItem("About", tabName = "about", icon = icon("info")), | |
menuItem("Balkan route", tabName = "destination", icon = icon("map")), | |
menuItem("Stats", tabName = "stats", icon = icon("bar-chart")), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Map | |
output$map <- renderPlotly({ | |
sel.data <- filter(balkanRoute.map, Date == input$slider.map) | |
# light grey boundaries | |
l <- list(color = toRGB("grey"), width = 0.5) | |
# specify map projection/options | |
g <- list( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
observe({ | |
# data frames | |
if(input$whichData == 'Daily Arrivals'){ | |
data_stat = balkanRoute} | |
else if(input$whichData == 'Gender'){ | |
data_stat = dataGender2016} | |
else {data_stat = dataOrigin2016} | |
# Column indexes | |
if(input$whichData == 'Daily Arrivals'){ |