├── LICENSE ├── README.md ├── flights.zip └── predict-accidents.zip /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 IBM Data Science Experience 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Shiny apps in Watson Studio 2 | 3 | Shiny Apps for ibm.com/cloud/watson-studio 4 | 5 | ## Predictions of car accident in NYC based on weather data: 6 | 7 | This shiny app shows how the IBM Watson Studio was leveraged to show the results of a car accident predictive model in New York City. The model was trained using historical data of car accidents and IBM's weather data. The weather conditions per zip code were used as features to train a logistic regression model, using Spark, that predicts the probability of a car accident at the zip code level, at an specific date and time of the day. 8 | 9 | ###### Running the Shiny App 10 | - Download the predict-accidents [zip file](https://github.com/IBMDataScience/watson-studio-shiny-apps/blob/master/predict-accidents.zip) to your laptop (no need to unzip!) 11 | - Open RStudio in [Watson Studio](https://www.ibm.com/cloud/watson-studio) from the left navigation bar 12 | - On the bottom right panel of RStudio, under "Files", click the "Upload" option 13 | - Click "Choose File" and browse for the "predict-accidents.zip" on your laptop (downloaded on the first step) 14 | - Click the "predict-accidents" directory 15 | - Click the global.R file to open it (will show up on the top left part of the screen) 16 | - Click the "Run App" button to run the shiny app 17 | 18 | You should get a really cool map that shows the probabilities of car accidents per zip code. On the right panel of the app you can interact with the app by choosing the desired date and time of interest. Click the circles to get information on the zip code and the probability of accident. 19 | 20 | For questions, please contact 21 | - Jorge Castanon, jorgecasta@us.ibm.com 22 | 23 | ## Analyzing flight delays: 24 | 25 | This shiny app shows how the IBM Watson Studio was leveraged to show an interactive map to analyze flight delays. The app can be used to explore the average flight delays (in minutes) for each airport. The user can interact with the app by choosing the month and year to be explored. In addition, the user can click on airport to get the airport name, code, state and city. The size of the circles depends on the volume of flights for each airport. 26 | 27 | 28 | ###### Running the Shiny App 29 | - Download the flights [zip file](https://github.com/IBMDataScience/watson-studio-shiny-apps/blob/master/flights.zip) to your laptop (no need to unzip!) 30 | - Open RStudio in [Watson Studio](https://www.ibm.com/cloud/watson-studio) from the left navigation bar 31 | - On the bottom right panel of RStudio, under "Files", click on the "Upload" option 32 | - Click "Choose File" and browse for the "flights.zip" on your laptop (dowloaded on the first step) 33 | - Click the "flights" directory 34 | - Open the server.R file by clicking it in RStudio 35 | - On the top left panel, open the shiny app by clicking the "Run App" button 36 | 37 | You should get a really cool map that shows the average flight delay (in minutes) for each airport. On the right panel of the app you can interact with the app by choosing the desired year and month of interest. Click on the circles to get the airport name and code, as well as the average delay of arriving flights. 38 | 39 | For questions, please contact 40 | - Jorge Castanon, jorgecasta@us.ibm.com 41 | 42 | -------------------------------------------------------------------------------- /flights.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBMDataScience/watson-studio-shiny-apps/926e54a2a2268db6fe90f502de81fdf8d468dc92/flights.zip -------------------------------------------------------------------------------- /predict-accidents.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBMDataScience/watson-studio-shiny-apps/926e54a2a2268db6fe90f502de81fdf8d468dc92/predict-accidents.zip --------------------------------------------------------------------------------