This file contains hidden or 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
| #r "../packages/FSharp.Data.2.1.1/lib/net40/FSharp.Data.dll" | |
| #r "../packages/Microsoft.Azure.Documents.Client.0.9.2-preview/lib/net40/Microsoft.Azure.Documents.Client.dll" | |
| #r "../packages/Newtonsoft.Json.4.5.11/lib/net40/Newtonsoft.Json.dll" | |
| #r "C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/.NETFramework/v4.5.1/System.Net.Http.dll" | |
| open System | |
| open System.IO | |
| open FSharp.Data | |
| open System.Linq | |
| open Newtonsoft.Json |
This file contains hidden or 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 Wake County Scores From NC State Scores | |
| WakeCountyScores <- NCScores[NCScores$District == 'Wake County Schools',] | |
| #Join SchoolNameMatch to Wake County Scores | |
| WakeCountyScores <- merge(x=WakeCountyScores, y=SchoolNameMatch, by.x="School", by.y="WCPSS") | |
| #Join Property Values | |
| WakeCountyScores <- merge(x=WakeCountyScores, y=SchoolValuation, by.x="Property", by.y="SchooName") | |
| #Remove Property column |
This file contains hidden or 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
| namespace Newtonsoft.Json.Converters | |
| open Microsoft.FSharp.Reflection | |
| open Newtonsoft.Json | |
| open System | |
| type IdiomaticDuConverter() = | |
| inherit JsonConverter() | |
| [<Literal>] |
This file contains hidden or 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
| #r "~/packages/Sendgrid.5.1.0/lib/SendGridMail.dll" | |
| #r "~/packages/SendGrid.SmtpApi.1.2.1/lib/net40/SendGrid.SmtpApi.dll" | |
| open System | |
| open System.Collections.Generic | |
| open System.Net | |
| open System.Net.Mail | |
| open SendGrid |
This file contains hidden or 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
| type Painting = {id:int;name:string;tags:string} | |
| type ArtShow = {id:int;name:string;expectedAttendance:int;paintings:Painting list} | |
| let painting0 = {id=0; | |
| name="Starry Night"; | |
| tags="Impressionism;Nature"} | |
| let painting1 = {id=1; | |
| name="Sunday Afternoon on the Island of La Grande Jatte"; | |
| tags="Impressionism;Nature;LeisureActivities"} | |
| let painting2 = {id=2; |
This file contains hidden or 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
| #r "../packages/FSharp.Data.2.2.2/lib/net40/FSharp.Data.dll" | |
| open System.IO | |
| open System.Text | |
| open FSharp.Data | |
| [<Literal>] | |
| let sample = "..\Data\TAMUHttpGet.json" | |
| type Context = JsonProvider<sample> |
This file contains hidden or 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
| #r "../packages/FSharp.Data.2.2.2/lib/net40/FSharp.Data.dll" | |
| open System | |
| open System.IO | |
| open System.Text | |
| open FSharp.Data | |
| [<Literal>] | |
| let geoLocationSample = "..\Data\TAMUHttpGet.json" | |
| type GeoLocationServiceContext = JsonProvider<geoLocationSample> |
This file contains hidden or 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
| the.counted <- read.csv("./Data/TheCountedWithGeo.csv") | |
| summary(the.counted) | |
| #http://stackoverflow.com/questions/13420700/r-ggplot2-ggmap-concentric-circles-as-points | |
| library(ggplot2) | |
| library(maps) | |
| all.states <- map_data("state") | |
| plot <- ggplot() | |
| plot <- plot + geom_polygon(data=all.states, aes(x=long, y=lat, group = group), |
This file contains hidden or 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
| #r "WindowsBase.dll" | |
| #r "System.Net.Http.dll" | |
| #r "PresentationCore.dll" | |
| #r "../packages/FSharp.Data.2.3.2/lib/net40/FSharp.Data.dll" | |
| open System | |
| open System.IO | |
| open System.Web | |
| open System.Net |
This file contains hidden or 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
| open System | |
| let getNewDate dayOfYear = | |
| ["Jan";"Feb";"Mar";"Apr";"May";"Jun";"Sep";"Oct";"Nov";"Dec"] | |
| |> Seq.mapi(fun i m -> if i%2=0 then m, [1..36] else m, [1..37]) | |
| |> Seq.map(fun (m,ad) -> ad |> Seq.map(fun d -> m,d)) | |
| |> Seq.collect(fun a -> a) | |
| |> Seq.mapi(fun i d -> i, d ) | |
| |> Seq.tryFind(fun (i,d) -> i = dayOfYear) |