08 July 2013

Creating a Business Intelligence Dashboard with R and ASP.NET MVC: Part 1

It is possible to use the R statistical package to extract Business Intelligence from the data in a SQL Server database, and render graphs and tables in HTML to give you a BI Dashboard in an ASP.NET MVC website. Sergei gives you a step-by-step guide.

Introduction

In this article, I will be showing you, step-by-step, how to create a web-based Business Intelligence Dashboard using ASP.NET MVC and Twitter Bootstrap that uses R to get data from a SQL Server database and do transformations on it that are then rendered on the dashboard. In the subsequent article, I will go on to show you how to use R visualization libraries to transform the data into graphs that highlight the trends in the data and show some statistical measures. I’ll also show how to update the presentation layer when the data source changes, and move on to other ways to make the application more versatile.

1830-clip_image001-630x414.png

Figure 1. BI Dashboard built with R, ASP.NET MVC and Bootstrap

Why use R?

R popularity as a data mining and statistical software continuously grows. Here is a quotation from the blog ‘Companies using Open Source R in 2013‘:

  •  The New York Times routinely uses R for interactive and print data visualization.
  • Google has more than 500 R users.
  • The FDA supports the use of R for clinical trials of new drugs.
  • John Deere uses R to forecast crop yields and optimize tractor manufacturing.
  • The National Weather Service uses R to predict the extent of flooding events.
  • Zillow uses R to model housing prices.
  • The Consumer Financial Protection Bureau uses R and other open source tools.
  • Twitter uses R for data science applications on the Twitter database.
  • FourSquare uses R to develop its recommendation engine.
  • Facebook uses R to model all sorts of user behaviour.

Why Use ASP.NET MVC?

The Internet is an effective way of delivering and maintaining at least some software applications, including BI applications. ASP.NET MVC is not the only option for creating a web-based application capable of delivering this sort of functionality. Another choice, for example, could be the Shiny server. It is a promising technology for R users, although at the moment it is very limited as far as the UI development is concerned.

I eventually chose ASP.NET MVC because it is the latest manifestation of Microsoft’s web strategy, and it is technically superior to its predecessor ASP.NET Web Forms. According to Dr. Dobb’s magazine ASP.NET MVC addresses the business and technology changes that have occurred during the intervening period – testability, separation of concerns, ease of modification. It is also enjoying a rapid growth of popularity. Here is the Interest over ‘Time Comparison and Forecast’ chart from Google Trends that support this.

1830-clip_image002-630x243.png

Figure2. Recent popularity trend for ASP.NET MVC and ASP.NET Web Forms.

Getting Started

This application uses the following tools and technologies

  1. R – a free software environment for statistical computing and graphics,
  2. ASP.NET MVC4 – a free framework for building web applications,
  3. Twitter Bootstrap – a free collection of CSS-based design templates for interface components, as well as JavaScript extensions,
  4. a well-known demo Northwind database as source of the data,
  5. Microsoft® SQL Server 2012 Express – a free database server, and
  6. Visual Studio Express 2012 for Web – a free widely used Integrated Development Environment.

Please use the web links I’ve provided here  for these software components if you’d like to follow along. Although it might sound obvious, the sequence of the installation is important. Please, therefore, install ASP.NET MVC after VS Express, and install Northwind database after MS SQL 2012 Express. How to: Install Sample Databases page provides the instructions on how to make the Northwind database compatible with MS SQL Server 2012.

Some Key Performance Indicators (KPIs) that are calculated by the application require a product cost that does not exist in the original Northwind database. Click on this link to download a SQL script that recreates and populates the Product table with the added UnitCost field and updates the UnitCost field added to the Order Details table as well.

You also need to download and install these R packages: RODBC and R2HTML. The following command install.packages(c ("RODBC","R2HTML")) executed from the command prompt in the R console does the trick.

Data Extraction and Transformation

The Figure 3 below illustrates the application architecture and the data flow.

1830-clip_image003-630x218.png

Figure 3. The application architecture and data flow.

The main component of the application is the R engine (a collection of R routines). The engine extracts the data required for each report from the Northwind database, performs necessary analytic calculations and data transformations and passes the results to the Web server that brings it to the end-users.

Implementing the Common Retail KPIs report

Let us begin with the Common Retail KPIs report that is located in the top left corner of the above dashboard page. The Listing 1 shows the code of the routine that does the “R bit” of the report.

Listing 1. CommonKPI.r R procedure

The above routine

  1. opens the Northwind ODBC connection (it is named as NW in the code),
  2. runs the Ch1_Core_KPIs_vw view (see Listing 2) that returns the data set shown in the Table 1 and saves it in the coreKPI data frame variable,
  3. adds a new calculated vector tmp and applies rounding and formatting to it,
  4. appends the last column of the coreKPI data frame that holds the HTML code for the Bootstrap icons (I explain this later), and finally
  5. saves the updated version of the coreKPI data frame as an HTML snippet (see Listing 4)

Listing 2. Ch1_Core_KPIs_vw view.

I assume that the reader has some experience with R language, but if you forgot some R functions, type help(functionName) at the R console command prompt to see the corresponding help.

 1830-clip_image004.png

Table 1. Data set returned by the Ch1_Core_KPIs_vw.

 Each line in the Table 1 is generated by a separate view. One of them is shown in the Listing 3. This and four other views were combined into the Ch1_Core_KPIs_vw view using SQL UNION Operator. For simplicity I hardcoded the filter values, but it would be a minor hurdle to use parameterized stored procedures instead of the views. You can try it on your own.

Listing 3. An SQL view that generates first line in the Table 1.

The CommonKPI.r R routine generates the following HTML fragment.

Listing 4. The HTML snippet generated by the CommonKPI.r R routine.

Now we are ready to build the “ASP.NET bit” of the application.

Tackling the Presentation Layer

Open Visual Studio (VS) and create a blank solution named R-2-ASP. Right click on the solution name in the Solution Explorer, select Add New Project from the context menu, and select the ASP.NET MVC 4 template from the Visual C# Web template group. Type Reporting as a name of the project. Select Empty template from the New ASP.NET MVC project template dialog box; make sure that Razor is selected as a View Engine and click OK.

1830-clip_image005-630x566.png

Figure 4. Creating the ASP.NET MVC project.

If the Package Manager Console is not visible at the bottom of the Visual Studio window, select the ‘VIEW\Other Windows\Package Manager Console’ menu to make it visible, and then type Install-Package twitter.bootstrap.mvc4. After that, run Install-Package twitter.bootstrap.mvc4.sample command.

This installation does a lot of work for you. It ‘blends’ Bootstrap package into our MVC4 project, creates navigation menus and default views (although we don’t need them all as we are not implementing any CRUD views) and more. Here is how the VS project’s structure should look like if the installation completed successfully.

1830-clip_image006.png

Figure 5. ASP.NET MVC project structure.

To create a folder where the R engine will load the HTML files right click on the ‘Content’ folder, select ‘Add\New Folder’ from the context menu, and name it as ‘html’. The HTML files, generated by R (see Listing 4 e.g.) require some post-processing to remove some redundant mark-up and change the HTML table CSS class to enable the Bootstrap styling and navigation. A custom ASP.NET MVC Helper class would a good option for that. A static method of that class will read our HTML snippet, process it and returns a new HTML string.

Add a new folder named ‘Helpers’ to the project. Right-click on the new folder and select ‘Add\New Class’ from the context menu. Name the class as ‘HtmlHelpers.cs’. Make this class static and create a static method ‘LoadHtml’, which is shown in the Listing 5.

Listing 5. Custom HTML Helper class.

Next, we need to modify the Home Controller by removing some redundant code generated during the Bootstrap package installation. Make sure that the home controller looks like on the Listing 6 below.

Listing 6. Modified HomeController.cs file.

The last step is to edit the default Index View as follows (see Listing 7).

Listing 7. Index View code.

CSS classes ‘container-fluid’, ‘row-fluid’, ‘span6’, ‘lead’, ‘span12’, ‘pull-right’ that you can see inside the Index view are used by bootstrap.css to set up a fluid Bootstrap grid and to style the content. In this case, the grid contains two rows and two columns. The ‘span6’ CSS class specifies the grid column size. The default Bootstrap grid system utilizes 12 columns and span6 indicates that each of the columns uses 50% of the space. For more information, open this link.

Now return into R console and from the command prompt type source("CommonKPI.r"). This command reads and parses CommonKPI.r procedure, which is evaluated sequentially. As the result of the evaluation, the CommonKPI.html snippet is created and saved it in the ‘Content\html’ folder of the ASP.NET MVC Reporting project.

Return to Visual Studio and hit F5 key to see the first report as shown below.

1830-clip_image007-630x419.png

Figure 6. First Report.

The icons next to the Growth values in the last column of the report are inserted by bootstrap.css. Type of the icon (thumbs-up or thumbs-down) is defined by the CSS class name inserted in every data set row by  the Ch1_Core_KPIs_vw view (see Listing 2).

The Bootstrap icon files can be found in the ‘Content\images’ folder of the VS project. The library of these beautiful icons was developed by Glyphicons.com and available free because of an arrangement between Bootstrap and the Glyphicons. They are suitable for other UI elements such as toolbars, navigation bars and buttons.

Now let us add the second report that displays some retail transactional KPIs such as sales volume per transaction (TransValue), average price (AvgPrice), etc. The R procedure that extracts data from the database and transforms it for the reporting is shown below

Listing 8. transKPI.r procedure.

The second statement of the above code loads the R function getTransKPI. Here is the definition of this function.

Listing 9. getTransKPI.r function.

This function requires two input parameters named kpiName and query. The second parameter is a name of an SQL Server view. For example when this function is executed first time in the third line of Listing 8, it takes Ch1_TransQty_Base_vw as a value of the second parameter. Here is the T-SQL code of that view.

Listing 10. Ch1_TransQty_Base_vw view.

This view as well as five others (see lines 5 to 9 in the Listing 8) returns only two rows. In this case (see Table 2), it is an average sales volume per transaction during this (TYtd) and the previous (LYtd) years.

This set of rows (a matrix to be precise) is pivoted (see the third line in the getTransKPI.r definition) using t() function, than values in the 2nd row are converted to numbers.

1830-clip_image008.png

Table 2. Data set returned by the Ch1_TransQty_Base_vw view.

The remaining four lines of the code, including the return statement, perform some transformations and the matrix is converted into a data frame. Its columns are renamed, reshuffled and returned back to the calling procedure transKPI.r. Although it may not be clear what and how this function works, but as it contains only a few lines of code, I would recommend executing every line of the procedure sequentially in the R console. It will help understanding how the procedure works.

A construction of the views that are passed to getTransKPI.r function follows the same pattern, e.g. the Ch1_TransValue_Base_vw view calculates an average sales amount per transaction as (ROUND(SUM((1.0 - dbo.[Order Details].Discount) * dbo.[Order Details].UnitPrice * dbo.[Order Details].Quantity) / COUNT (DISTINCT dbo.[Order].OrderID),2).

The rbind() function combines six data frames generated with the help of getTransKPI function into one data frame transKPI. The next after rbind() call statement adds a new calculated column Growth.

To append an icon to each value in the Growth column transKPI.r loads another R function getIcon.r. Here is the definition of that function

Listing 11. getIcon.r function.

This function is simply set to return an HTML mark-up containing CSS class that is used by bootstrap to add a thumbs-up or thumbs-down icons to the Growth values.

The name of the CSS class depends on the Growth value (second input parameter of the getIcon function) and the measure name – the first input parameter.

The remaining few lines of the transKPI procedure …  (Listing 8)

  1. append thumbs-up / thumbs-down icons to the last column of the transKPI data frame,
  2. generate the transKPI.html snippet,
  3. write it into the Content\html folder, and
  4. restore the R console working directory

     … to get ready for processing of the next report, but this is a subject of the following article.

Execute the transKPI.r procedure and return to the Visual Studio to make some minor change to the Index view shown below in bold.

Listing 12. Index View code after addition of the second report.

Getting data extraction and transformation working

Now hit the F5 key to see the second report in top right corner of the page.

1830-clip_image009-630x421.png

Figure 7. The Transactional Retail KPIs report was added to the first row.

You might have noticed a dotted line under abbreviation ‘KPIs’ in the report titles. This is the result of the enclosing those abbreviations between the <abbr title=”key performance indicators”>KPIs</abbr> tags. It enables the display of the title attribute value when the user hovers the mouse pointer over the abbreviation.

The CSS class ‘lead’ makes the report titles stand out and be consistent across the page without changing the font attributes. Three other CSS classes ‘error’, ‘warning’, and ‘successes were applied to the table row tag to enable conditional highlighting effect. I’ll leave you to find out the details of this implementation.

Summary

In this article, we looked at the integration of the R statistical framework and ASP.NET MVC 4 for developing web based business intelligence applications.

In the following articles, we introduce R visualisation libraries that demonstrate the R power to “transform the data to most effectively support decision making” as well as touch upon changes to the presentation layer when the data source changes and passing parameters to R routines in batch execution mode to enable the application interactivity.

Below is a link to the source to the SQL script that recreates and populates the Product table with the added UnitCost field and updates the UnitCost field added to the Order Details table as well.  In addition, There is a zipped-up copy of the altered NORTHWIND database that contains all the views. With it inside the zip file are detailed instruction how to attach the database .

Keep up to date with Simple-Talk

For more articles like this delivered fortnightly, sign up to the Simple-Talk newsletter

Downloads

This post has been viewed 107339 times – thanks for reading.

Tags: , , , , , , , , ,

  • Rate
    [Total: 102    Average: 4.2/5]
  • Share

Sergei Dumnov

View all articles by Sergei Dumnov

  • odeddror

    Source Code
    Sergei,

    Nice article, can you please email me all the views that you created I got lost creating them.

    Thanks,
    Oded Dror

  • Andrew Clarke

    Re: Source Code
    These are now all in the zipped-up copy of the altered NORTHWIND database that is included. It is at the head of the article in the ‘Downloads’ section below the ratings. I hope that this makes it easier to follow along.

    Editor

  • Sergei Dumnov

    Source Code
    northwind.zip contains also products.sql, so you do not to download it separately.

  • Anonymous

    Drill down
    As far as I can see, there is no drilldown options for this.

    Making it useful in some situations, but wouldn’t the option of drilldown be required for any general use?

  • Sergei Dumnov

    Drill down
    Thank you for the comment…, anonymous. I do agree with it and the drillability will be addressed in the following articles.

  • celinsmith111

    RE: Creating a Business Intelligence Dashboard with R and ASP.NET MVC: Part 1
    The thing i like this community is his technical author, great and easy way to create BI Dashboard, good and helpful, all steps cover snapshots.

  • Anonymous

    its very interest Article with Unique combination of technologies.
    its very interest Article with Unique combination of technologies.

    please send Me step in creating this app.
    I got lost in which comes first and which step come NEXT.

    thanks

  • Sergei Dumnov

    RE the last comment: its very interest Article with …
    1) Download the file northwind.zip that contains the database, all the necessary T-SQL view, and the instruction how to attach the database. then
    2) follow the article from start to finish. It contains all the steps.

  • Sunny

    Simple Mr Magic …Great technicla know how
    Awesome.. Will like to read it many times for years to come and practilize it.

  • Sergei Dumnov

    the author’s reply
    Thank you all for the encouraging comments.

  • Rob Kraft

    Good Article
    Good Article, I look forward to the subsequent articles!

  • Anonymous

    thanks Sergei Dumnov
    I will try again today and see if I can create anything.

  • NJ

    Thanks!!
    Great Info Sergei.

  • odeddror

    dbo.Ch1_GP_KPI_vw
    Sergei,
    Where is dbo.Ch1_GP_KPI_vw?
    Can you post your SQL code please?

    Thanks,
    Ed Dror

  • Sergei Dumnov

    Create Ch1_GP_KPI_vw DDL statement
    CREATE VIEW [dbo].[Ch1_GP_KPI_vw]
    AS
    WITH Base AS (
    SELECT TOP (100) PERCENT CASE WHEN YEAR(dbo.Orders.OrderDate) = 1997 THEN ‘LYtd’ ELSE ‘TYtd’ END AS Period,
    SUM(((1.0 – dbo.[Order Details].Discount) * dbo.[Order Details].UnitPrice – dbo.[Order Details].UnitCost) * dbo.[Order Details].Quantity) AS Profit
    FROM dbo.[Order Details] INNER JOIN
    dbo.Orders ON dbo.[Order Details].OrderID = dbo.Orders.OrderID
    WHERE (dbo.Orders.OrderDate BETWEEN ‘19970101’ AND ‘19970506’) OR
    (dbo.Orders.OrderDate BETWEEN ‘19980101’ AND ‘19980506’)
    GROUP BY CASE WHEN YEAR(dbo.Orders.OrderDate) = 1997 THEN ‘LYtd’ ELSE ‘TYtd’ END
    ORDER BY Period
    )
    SELECT ‘Profit’ AS Measure, * FROM (
    SELECT * FROM Base t PIVOT (SUM([Profit]) FOR Period IN ([LYtd],[TYtd])) AS p
    ) AS d

  • tmainmtl

    twitter bootstrap
    the link does not exist anymore do you have another one ?

  • Sergei Dumnov

    twitter bootstrap
    Here is the updated link
    http://getbootstrap.com/

  • ipsa

    dbo.Ch1_Core_KPIs_vw
    dbo.Ch1_Qty_KPI_vw
    dbo.Ch1_Cost_KPI_vw
    dbo.Ch1_Sales_KPI_vw

    Can you post your SQL code please?

  • bobsr

    Thnaks
    thanks !!!

  • snehbeta

    dbo.Ch1_Qty_KPI_vw
    great tutorial and insights!

    Could you please share the sql code for

    dbo.Ch1_Qty_KPI_vw
    dbo.Ch1_Cost_KPI_vw
    dbo.Ch1_Sales_KPI_vw

    as the zipped .mdf is throwing errors while attaching in sql server 2008 R2.

    Many Thanks

  • snehbeta

    dbo.Ch1_Qty_KPI_vw

    Thank you, Could you please share the scripts on snehlatasukhwal@gmail.com

    Many Thanks

  • veve

    Need help for following the steps
    Hello,

    First of all thank you for the tutorial!

    I’m new in BI and all data visualisation and I’m having some troubles with folowing the step:
    trying to execute the products.sql script.

    The first error (I think the most important one) is:
    Could not drop object ‘dbo.Products’ because it is referenced by a FOREIGN KEY constraint.

    What should I change in the script?

    Thank you in advance!

  • Sergei Dumnov

    RE: Need help for the following steps
    You tried to drop the table Products that references the other table in the database. To resolve this use northwind.zip that contain the entire data with the instruction how to attach it to the server.

  • danielkrudolf

    R Errors
    In Listing 1. CommonKPI.r R procedure I get error in row "setwd(htmldir)"

    Error is: Error in setwd(htmldir) : cannot change working directory

    please help, I realy need this solution, and it is realy usefull article.

    Thanks

  • danielkrudolf

    R Errors
    In Listing 1. CommonKPI.r R procedure I get error in row "setwd(htmldir)"

    Error is: Error in setwd(htmldir) : cannot change working directory

    please help, I realy need this solution, and it is realy usefull article.

    Thanks

  • danielkrudolf

    R Errors
    In Listing 1. CommonKPI.r R procedure I get error in row "setwd(htmldir)"

    Error is: Error in setwd(htmldir) : cannot change working directory

    please help, I realy need this solution, and it is realy usefull article.

    Thanks

  • Sergei Dumnov

    R Errors
    Daniel,

    Thanks for your comment. Please check if you can write into that directory: a) write click on the folder and choose Properties from the pop-up menu, b) select Security tab and check permissions for your account
    (I assumed that you use Windows)
    Good luck, Sergei

  • danielkrudolf

    Sys.getenv (path)
    If I am understanding corectly this row (Sys.getenv("HOME"), "\R Analytics\R-2-ASP\Reporting\Content\html\", sep="") says where do I whant to save my (html) file. Is this path of Visual Studio project? Can I change this path and where in asp.net code row you must make modification.

    Please help, And realy thanks for respons.

    Daniel

  • danielkrudolf

    Sys.getenv (path)
    This article helps me: http://www.bigre.ulb.ac.be/courses/statistics_bioinformatics/practicals/configuration.html

    Sergei, you are the best !!!!

  • Sergei Dumnov

    Sys.GetEnv
    1) Yes "\R Analytics\R-2-ASP\Reporting\Content\html\" is part of VS project.
    2) You can keep your content where you like, but it is much more convenient and easier to manage when it is within the project structure.
    3) If you like to keep html files in a different folder, you have to update each statement like @Html.LoadHtml("~/Content/html/coreKPI.html") this one.
    I hope this helps.

  • danielkrudolf

    Asp.net MVC problem
    Hello again, Sergei thanks for your help in last post thing in R works fine, but, when I came to building MVC code in Listing 5 (String rawHtml = new WebClient().DownloadString(HttpContext.Current.Server.MapPath(file)).ToString();)

    I got this Error: ‘System.Net.WebClient.DownloadString(string)’ is a ‘method’ but is used like a ‘type’

    Any Idea to solve this problem, realy thanks.

  • danielkrudolf

    Asp.net MVC problem
    Hello again, Sergei thanks for your help in last post thing in R works fine, but, when I came to building MVC code in Listing 5 (String rawHtml = new WebClient().DownloadString(HttpContext.Current.Server.MapPath(file)).ToString();)

    I got this Error: ‘System.Net.WebClient.DownloadString(string)’ is a ‘method’ but is used like a ‘type’

    Any Idea to solve this problem, realy thanks.

  • gsaray101

    passing user controls to R code
    This is great. As far as I understand, this is the process:

    1. create R scripts to receive, aggregate the data, place the data into an html format
    2.from .net, reference to html files to show the data, graphics etc.

    I would like to know these:

    1. if there are user controls, for example to pick the date, category, etc.
    2. From UI, how would you pass the user controls data to R fuction in the backend and run the r scripts and create the update the html files for the UI.
    3. I also like to know if any javascript libraries can be used to show the data once data collection and processing done by the R engine?

    Regards,

    Mike

  • Sergei Dumnov

    RE: passing user controls to R code
    Mike,

    In the 3rd part of this series I am using GoogleVis for R Library that has some GUI controls
    Another option is to use Shiny Server.
    Otherwise you need to save input from ASP.NET MVC controls and pass it to R via your custom code,

    Regards,

  • yogesh013

    How to make statistics report using BootStrap
    Hello sir,
    I want some information regarding to BootStrap.
    i want to make statistics report using bootstrap ? I have idea of making chart in bootstrap but i want report like crystal report in bootstrap.
    so is it possible to make report using bootstrap.
    is yes then please provide me some information related to this.

    thank you..

  • kas325

    connection to sql Northwind
    Hello Sergei,
    I am having trouble connecting to the Northwind mdf for sqlserver 2008 R2 .Could you please advise.
    Thanks!

  • Andrew Clarke

    Re: connection to sql Northwind
    This question has nothing to do with Sergei’s article. Please phrase your questions with as many details as possible on ASK.SQLServerCentral.com where there are plenty of experts to help you with your connection problem.

  • Gjerome5

    Forecasting
    Hello,

    I want to create a dashboard with forecasting, but in SQL i am not aware of that, is it possible to do foecasting in R software and show the forecasted values and output in dashboard? Can i use it like as Macro which is mainly used in excel

  • McGlen

    Please Help
    > setwd(htmldir)
    Error in setwd(htmldir) : cannot change working directory

  • McGlen

    Having trouble on this part
    > source("CommonKPI.r")
    Error in file(filename, "r", encoding = encoding) :
    cannot open the connection
    In addition: Warning message:
    In file(filename, "r", encoding = encoding) :
    cannot open file ‘CommonKPI.r’: No such file or directory

  • Sergei Dumnov

    Having trouble on this part
    source("CommonKPI.r") assumes that you are reading the file from working directory.Check if it is using
    >getwd()

  • McGlen

    Having trouble on this part
    Thanks for your help.

  • McGlen

    Trouble Again
    Easy Twitter Bootstrap for ASP.Net MVC 4

    Package Homepage:
    https://github.com/erichexter/twitter.bootstrap.mvc

    Twitter Bootstrap Homepage:
    http://twitter.github.com/bootstrap/

    See the introduction blog post http://lostechies.com/erichexter/2012/11/20/twitter-bootstrap-mvc4-the-template-nuget-package-for-asp-net-mvc4-projects/

    Warning: After installing the package, you may get build errors.
    Compiling transformation: The type or namespace name ‘Web’ does not exist in the namespace ‘Microsoft.VisualStudio’ (are you missing an assembly reference?)
    Compiling transformation: The type or namespace name ‘MvcTextTemplateHost’ could not be found (are you missing a using directive or an assembly reference?)

    To resolve these build errors simply close and reopen the solution

  • Sergei Dumnov

    Trouble Again
    Try this
    http://www.pluralsight.com/courses/bootstrap-3
    It explains how to use Bootstrap in great details

  • anilksingh

    Error when trying access views
    Hi There,

    First of all want to say, its really brill article. I was looking for something similar since long time. It really did help me understaning how to use R and visual studio together.

    Though im getting some error. I ave copied database you have provided so I have all view etc. I getting error at coreKPI<-sqlFetch(cn,’Ch1_Core_KPIs_vw’). it is saying Error in odbcTableExists(channel, sqtable) :
    ‘Ch1_Core_KPIs_vw’: table not found on channel

    though I have checked I ave all views and working fine.

    Please help me.

    Thanks

    Anil

  • fatosxh

    Error when trying access views
    I am the same problem as Anilksingh. Please help!
    And thank you for the great article.

  • Tom@CentricSites.com

    You have helped us all, thanks!!
    Sergei, I cant thank you enough for a very complete, extremely well written article. I am involved in BI dashboards in other technologies and wanted to come up to speed with R. This was my springboard. You have helped us all, thanks!!
    Tom

  • Tom@CentricSites.com

    You have helped us all, thanks!!
    Sergei, I cant thank you enough for a very complete, extremely well written article. I am involved in BI dashboards in other technologies and wanted to come up to speed with R. This was my springboard. You have helped us all, thanks!!
    Tom

  • Emma

    This is not a step by step regarding how to create the application in question. There is no description regarding how to install the Content folder contents, the scripts folder contents. The articles talks about modifying home controller without describing how to even create it and many more. I was trying to follow the tutorials but I needed to stop.
    Sergio, can you please send a real step by step procedure to me! thanks in advance

  • Emma

    There is no step by step procedure regarding how the setup are really connected ie how is the connection between the R code, the ASP.NET, and the database talk to themselves. These have been described in isolation. How do you set all these up to get the application running ?????