Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
260 changed files
with
181,574 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<solution> | ||
<add key="disableSourceControlIntegration" value="true" /> | ||
</solution> | ||
</configuration> |
Binary file not shown.
136 changes: 136 additions & 0 deletions
136
Talks 2013/F# for the Web (NYC)/code/.nuget/NuGet.targets
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir> | ||
|
||
<!-- Enable the restore command to run before builds --> | ||
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages> | ||
|
||
<!-- Property that enables building a package from a project --> | ||
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage> | ||
|
||
<!-- Determines if package restore consent is required to restore packages --> | ||
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent> | ||
|
||
<!-- Download NuGet.exe if it does not already exist --> | ||
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition=" '$(PackageSources)' == '' "> | ||
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used --> | ||
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list --> | ||
<!-- | ||
<PackageSource Include="https://www.nuget.org/api/v2/" /> | ||
<PackageSource Include="https://my-nuget-source/nuget/" /> | ||
--> | ||
</ItemGroup> | ||
|
||
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'"> | ||
<!-- Windows specific commands --> | ||
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath> | ||
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'"> | ||
<!-- We need to launch nuget.exe with the mono command if we're not on windows --> | ||
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath> | ||
<PackagesConfig>packages.config</PackagesConfig> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<!-- NuGet command --> | ||
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath> | ||
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources> | ||
|
||
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand> | ||
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand> | ||
|
||
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir> | ||
|
||
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch> | ||
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch> | ||
|
||
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir> | ||
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir> | ||
|
||
<!-- Commands --> | ||
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand> | ||
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand> | ||
|
||
<!-- We need to ensure packages are restored prior to assembly resolve --> | ||
<BuildDependsOn Condition="$(RestorePackages) == 'true'"> | ||
RestorePackages; | ||
$(BuildDependsOn); | ||
</BuildDependsOn> | ||
|
||
<!-- Make the build depend on restore packages --> | ||
<BuildDependsOn Condition="$(BuildPackage) == 'true'"> | ||
$(BuildDependsOn); | ||
BuildPackage; | ||
</BuildDependsOn> | ||
</PropertyGroup> | ||
|
||
<Target Name="CheckPrerequisites"> | ||
<!-- Raise an error if we're unable to locate nuget.exe --> | ||
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" /> | ||
<!-- | ||
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once. | ||
This effectively acts as a lock that makes sure that the download operation will only happen once and all | ||
parallel builds will have to wait for it to complete. | ||
--> | ||
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" /> | ||
</Target> | ||
|
||
<Target Name="_DownloadNuGet"> | ||
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" /> | ||
</Target> | ||
|
||
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites"> | ||
<Exec Command="$(RestoreCommand)" | ||
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" /> | ||
|
||
<Exec Command="$(RestoreCommand)" | ||
LogStandardErrorAsError="true" | ||
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" /> | ||
</Target> | ||
|
||
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites"> | ||
<Exec Command="$(BuildCommand)" | ||
Condition=" '$(OS)' != 'Windows_NT' " /> | ||
|
||
<Exec Command="$(BuildCommand)" | ||
LogStandardErrorAsError="true" | ||
Condition=" '$(OS)' == 'Windows_NT' " /> | ||
</Target> | ||
|
||
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll"> | ||
<ParameterGroup> | ||
<OutputFilename ParameterType="System.String" Required="true" /> | ||
</ParameterGroup> | ||
<Task> | ||
<Reference Include="System.Core" /> | ||
<Using Namespace="System" /> | ||
<Using Namespace="System.IO" /> | ||
<Using Namespace="System.Net" /> | ||
<Using Namespace="Microsoft.Build.Framework" /> | ||
<Using Namespace="Microsoft.Build.Utilities" /> | ||
<Code Type="Fragment" Language="cs"> | ||
<![CDATA[ | ||
try { | ||
OutputFilename = Path.GetFullPath(OutputFilename); | ||
Log.LogMessage("Downloading latest version of NuGet.exe..."); | ||
WebClient webClient = new WebClient(); | ||
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename); | ||
return true; | ||
} | ||
catch (Exception ex) { | ||
Log.LogErrorFromException(ex); | ||
return false; | ||
} | ||
]]> | ||
</Code> | ||
</Task> | ||
</UsingTask> | ||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2012 | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Interactive", "Interactive\Interactive.fsproj", "{C2D43076-78DC-4D69-8347-CE70AE7CBBB1}" | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WorldBank", "WorldBank\WorldBank.fsproj", "{A4799ED1-4228-4B1D-8ACB-61293F90B07E}" | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MovieDatabase", "MovieDatabase\MovieDatabase.fsproj", "{C743294F-BA81-473B-A9F1-D95F5356D37A}" | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WorldData.Api", "WorldDataWeb\WorldData.Api\WorldData.Api.fsproj", "{A999575F-C66E-42BF-A70F-655D4C3F0069}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorldData.Web", "WorldDataWeb\WorldData.Web\WorldData.Web.csproj", "{C4891C29-68CB-41D6-A5AA-47017B057878}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1 Data", "1 Data", "{A3ABCF70-E950-44B2-866A-8C643DC397A1}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2 Server", "2 Server", "{A7A76175-589C-4020-ADAA-E45B3021F8AA}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3 Client", "3 Client", "{A9580ACF-521B-45ED-9621-277FBC7DA18F}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{BF710158-914B-4DD5-90E0-3F6E4AFDC980}" | ||
ProjectSection(SolutionItems) = preProject | ||
.nuget\NuGet.Config = .nuget\NuGet.Config | ||
.nuget\NuGet.exe = .nuget\NuGet.exe | ||
.nuget\NuGet.targets = .nuget\NuGet.targets | ||
EndProjectSection | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{C2D43076-78DC-4D69-8347-CE70AE7CBBB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{C2D43076-78DC-4D69-8347-CE70AE7CBBB1}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{C2D43076-78DC-4D69-8347-CE70AE7CBBB1}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{C2D43076-78DC-4D69-8347-CE70AE7CBBB1}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{A4799ED1-4228-4B1D-8ACB-61293F90B07E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A4799ED1-4228-4B1D-8ACB-61293F90B07E}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A4799ED1-4228-4B1D-8ACB-61293F90B07E}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A4799ED1-4228-4B1D-8ACB-61293F90B07E}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{C743294F-BA81-473B-A9F1-D95F5356D37A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{C743294F-BA81-473B-A9F1-D95F5356D37A}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{C743294F-BA81-473B-A9F1-D95F5356D37A}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{C743294F-BA81-473B-A9F1-D95F5356D37A}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{A999575F-C66E-42BF-A70F-655D4C3F0069}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A999575F-C66E-42BF-A70F-655D4C3F0069}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A999575F-C66E-42BF-A70F-655D4C3F0069}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A999575F-C66E-42BF-A70F-655D4C3F0069}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{C4891C29-68CB-41D6-A5AA-47017B057878}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{C4891C29-68CB-41D6-A5AA-47017B057878}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{C4891C29-68CB-41D6-A5AA-47017B057878}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{C4891C29-68CB-41D6-A5AA-47017B057878}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{C2D43076-78DC-4D69-8347-CE70AE7CBBB1} = {A3ABCF70-E950-44B2-866A-8C643DC397A1} | ||
{C743294F-BA81-473B-A9F1-D95F5356D37A} = {A9580ACF-521B-45ED-9621-277FBC7DA18F} | ||
{A4799ED1-4228-4B1D-8ACB-61293F90B07E} = {A9580ACF-521B-45ED-9621-277FBC7DA18F} | ||
{C4891C29-68CB-41D6-A5AA-47017B057878} = {A7A76175-589C-4020-ADAA-E45B3021F8AA} | ||
{A999575F-C66E-42BF-A70F-655D4C3F0069} = {A7A76175-589C-4020-ADAA-E45B3021F8AA} | ||
EndGlobalSection | ||
EndGlobal |
82 changes: 82 additions & 0 deletions
82
Talks 2013/F# for the Web (NYC)/code/Interactive/Interactive.fsproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>c2d43076-78dc-4d69-8347-ce70ae7cbbb1</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<RootNamespace>Interactive</RootNamespace> | ||
<AssemblyName>Interactive</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<Name>Interactive</Name> | ||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir> | ||
<RestorePackages>true</RestorePackages> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<Tailcalls>false</Tailcalls> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<WarningLevel>3</WarningLevel> | ||
<DocumentationFile>bin\Debug\Interactive.XML</DocumentationFile> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<Tailcalls>true</Tailcalls> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<WarningLevel>3</WarningLevel> | ||
<DocumentationFile>bin\Release\Interactive.XML</DocumentationFile> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="FSharp.Charting"> | ||
<HintPath>..\packages\FSharp.Charting.0.87\lib\net40\FSharp.Charting.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="FSharp.Data"> | ||
<HintPath>..\packages\FSharp.Data.1.1.10\lib\net40\FSharp.Data.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="FSharp.Data.DesignTime"> | ||
<HintPath>..\packages\FSharp.Data.1.1.10\lib\net40\FSharp.Data.DesignTime.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="FSharp.Data.Experimental"> | ||
<HintPath>..\packages\FSharp.Data.Experimental.1.1.10\lib\net40\FSharp.Data.Experimental.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="FSharp.Data.Experimental.DesignTime"> | ||
<HintPath>..\packages\FSharp.Data.Experimental.1.1.10\lib\net40\FSharp.Data.Experimental.DesignTime.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="mscorlib" /> | ||
<Reference Include="FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Numerics" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
<None Include="Movies.fsx" /> | ||
<None Include="WorldBank.fsx" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion> | ||
</PropertyGroup> | ||
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets" Condition=" Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')" /> | ||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
31 changes: 31 additions & 0 deletions
31
Talks 2013/F# for the Web (NYC)/code/Interactive/Movies.fsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#r "../packages/FSharp.Data.1.1.10/lib/net40/FSharp.Data.dll" | ||
#r "../packages/FSharp.Data.Experimental.1.1.10/lib/net40/FSharp.Data.Experimental.dll" | ||
open FSharp.Data | ||
|
||
// ------------------------------------------------------------------ | ||
// Movie database | ||
|
||
let db = new ApiaryProvider<"themoviedb">("http://api.themoviedb.org") | ||
db.AddQueryParam("api_key", "6ce0ef5b176501f8c07c634dfa933cff") | ||
|
||
let res = db.Search.Person(query=["query","craig"]) | ||
for person in res.Results do | ||
printfn "%d %s" person.Id person.Name | ||
|
||
let person = db.Person.GetPerson("8784") | ||
person.PlaceOfBirth | ||
|
||
for cast in person.Credits().Cast do | ||
printfn "%s (%s)" cast.Title.String.Value cast.Character | ||
|
||
// ------------------------------------------------------------------ | ||
// Accessing other APIs | ||
|
||
let fs = new ApiaryProvider<"fssnip">("http://api.fssnip.net/") | ||
|
||
let snips = fs.Snippet.List() | ||
for snip in snips do | ||
printfn "%s" snip.Title | ||
|
||
let snip = fs.Snippet.GetSnippet("fj") | ||
snip.Tags |
37 changes: 37 additions & 0 deletions
37
Talks 2013/F# for the Web (NYC)/code/Interactive/WorldBank.fsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#r "../packages/FSharp.Data.1.1.10/lib/net40/FSharp.Data.dll" | ||
#load "../packages/FSharp.Charting.0.87/FSharp.Charting.fsx" | ||
|
||
open FSharp.Data | ||
open FSharp.Charting | ||
|
||
// ------------------------------------------------------------------ | ||
// World bank countries | ||
|
||
type WorldBank = WorldBankDataProvider<"World Development Indicators", Asynchronous=true> | ||
let data = WorldBank.GetDataContext() | ||
|
||
let countries = | ||
[| data.Countries.``Arab World`` | ||
data.Countries.``European Union`` | ||
data.Countries.Australia | ||
data.Countries.Brazil | ||
data.Countries.Canada | ||
data.Countries.Chile | ||
data.Countries.``Czech Republic`` | ||
data.Countries.Denmark | ||
data.Countries.France | ||
data.Countries.Greece | ||
data.Countries.``Low income`` | ||
data.Countries.``High income`` | ||
data.Countries.``United Kingdom`` | ||
data.Countries.``United States`` |] | ||
|
||
// ---------------------------------------------------------------------------- | ||
// Create University enrollment chart | ||
|
||
[ for c in countries -> | ||
c.Indicators.``School enrollment, tertiary (% gross)`` ] | ||
|> Async.Parallel | ||
|> Async.RunSynchronously | ||
|> Array.map Chart.Line | ||
|> Chart.Combine |
6 changes: 6 additions & 0 deletions
6
Talks 2013/F# for the Web (NYC)/code/Interactive/packages.config
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="FSharp.Charting" version="0.87" targetFramework="net45" /> | ||
<package id="FSharp.Data" version="1.1.10" targetFramework="net45" /> | ||
<package id="FSharp.Data.Experimental" version="1.1.10" targetFramework="net45" /> | ||
</packages> |
Oops, something went wrong.