Skip to content

Commit dd4b441

Browse files
authored
Merge pull request #21 from pjoiner/v0.1.9-Pre
V0.1.9 pre
2 parents 3d8e128 + c1921b8 commit dd4b441

15 files changed

+536
-125
lines changed

NuGet.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<solution>
44
<add key="disableSourceControlIntegration" value="true" />
@@ -11,6 +11,7 @@
1111
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
1212
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
1313
<add key="MachineLearning" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/MachineLearning/nuget/v3/index.json" />
14+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
1415
</packageSources>
1516
<disabledPackageSources />
1617
</configuration>

notebooks/01_Introduction.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"outputs": [],
3939
"source": [
4040
"#r \"nuget:DwC-A_dotnet,0.6.0\"\n",
41-
"#r \"nuget:DwC-A_dotnet.Interactive,0.1.8-Pre\""
41+
"#r \"nuget:DwC-A_dotnet.Interactive,0.1.9-Pre\""
4242
]
4343
},
4444
{

notebooks/02_Formatting.ipynb

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"language": "csharp"
2020
}
2121
},
22+
"outputs": [],
2223
"source": [
2324
"#r \"nuget:DwC-A_dotnet,0.6.0\"\n",
24-
"#r \"nuget:DwC-A_dotnet.Interactive,0.1.8-Pre\""
25-
],
26-
"outputs": []
25+
"#r \"nuget:DwC-A_dotnet.Interactive,0.1.9-Pre\""
26+
]
2727
},
2828
{
2929
"cell_type": "markdown",
@@ -44,6 +44,7 @@
4444
"language": "csharp"
4545
}
4646
},
47+
"outputs": [],
4748
"source": [
4849
"using DwC_A;\n",
4950
"using System.IO.Compression;\n",
@@ -55,8 +56,7 @@
5556
"ZipFile.ExtractToDirectory(\"./data/Papilionidae.zip\", outputPath);\n",
5657
"var archive = new ArchiveReader(outputPath);\n",
5758
"archive.MetaData"
58-
],
59-
"outputs": []
59+
]
6060
},
6161
{
6262
"cell_type": "code",
@@ -66,13 +66,13 @@
6666
"language": "csharp"
6767
}
6868
},
69+
"outputs": [],
6970
"source": [
7071
"var occurrence = archive.CoreFile;\n",
7172
"var multimedia = archive.Extensions.GetFileReaderByFileName(\"multimedia.txt\");\n",
7273
"display(occurrence);\n",
7374
"display(multimedia);"
74-
],
75-
"outputs": []
75+
]
7676
},
7777
{
7878
"cell_type": "markdown",
@@ -93,6 +93,7 @@
9393
"language": "csharp"
9494
}
9595
},
96+
"outputs": [],
9697
"source": [
9798
"using Microsoft.DotNet.Interactive.Formatting;\n",
9899
"\n",
@@ -104,8 +105,7 @@
104105
" var output = div[style: \"font-style: italic\"]($\"{scientificName.genus} {scientificName.species}\");\n",
105106
" writer.Write(output);\n",
106107
"}, \"text/html\" );"
107-
],
108-
"outputs": []
108+
]
109109
},
110110
{
111111
"cell_type": "markdown",
@@ -124,6 +124,7 @@
124124
"language": "csharp"
125125
}
126126
},
127+
"outputs": [],
127128
"source": [
128129
"using DwC_A.Terms;\n",
129130
"\n",
@@ -132,8 +133,7 @@
132133
" date = n[Terms.eventDate],\n",
133134
" scientificName = new ScientificName(n[Terms.genus], n[Terms.specificEpithet])\n",
134135
" })"
135-
],
136-
"outputs": []
136+
]
137137
},
138138
{
139139
"cell_type": "markdown",
@@ -152,6 +152,7 @@
152152
"language": "csharp"
153153
}
154154
},
155+
"outputs": [],
155156
"source": [
156157
"public record Link(string url);\n",
157158
"\n",
@@ -166,8 +167,7 @@
166167
" scientificName = new ScientificName(n[Terms.genus], n[Terms.specificEpithet]),\n",
167168
" link = new Link(n[Terms.references])\n",
168169
" })"
169-
],
170-
"outputs": []
170+
]
171171
},
172172
{
173173
"cell_type": "markdown",
@@ -188,6 +188,7 @@
188188
"language": "csharp"
189189
}
190190
},
191+
"outputs": [],
191192
"source": [
192193
"public record ImageUrl(string url, string caption = \"\");\n",
193194
"\n",
@@ -198,8 +199,7 @@
198199
" );\n",
199200
" writer.Write(fig);\n",
200201
"}, \"text/html\");"
201-
],
202-
"outputs": []
202+
]
203203
},
204204
{
205205
"cell_type": "markdown",
@@ -216,6 +216,7 @@
216216
"language": "csharp"
217217
}
218218
},
219+
"outputs": [],
219220
"source": [
220221
"using DwC_A.Terms;\n",
221222
"\n",
@@ -231,8 +232,7 @@
231232
"}; \n",
232233
"\n",
233234
"media"
234-
],
235-
"outputs": []
235+
]
236236
},
237237
{
238238
"cell_type": "markdown",
@@ -251,6 +251,7 @@
251251
"language": "csharp"
252252
}
253253
},
254+
"outputs": [],
254255
"source": [
255256
"Formatter.Register<IEnumerable<ImageUrl>>((images, writer) =>{\n",
256257
" var figs = new List<dynamic>();\n",
@@ -261,8 +262,7 @@
261262
"}, \"text/html\");\n",
262263
"\n",
263264
"media.Select(n => n.image)"
264-
],
265-
"outputs": []
265+
]
266266
}
267267
],
268268
"metadata": {
@@ -281,4 +281,4 @@
281281
},
282282
"nbformat": 4,
283283
"nbformat_minor": 4
284-
}
284+
}

notebooks/03_DataFrame.ipynb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
"language": "csharp"
2020
}
2121
},
22+
"outputs": [],
2223
"source": [
2324
"#r \"nuget: XPlot.Plotly, 4.0.6\"\n",
2425
"#r \"nuget: XPlot.Plotly.Interactive, 4.0.6\"\n",
2526
"#r \"nuget: Microsoft.Data.Analysis, 0.19.0\"\n",
2627
"#r \"nuget: DwC-A_dotnet, 0.6.0\"\n",
27-
"#r \"nuget: DwC-a_dotnet.Interactive, 0.1.8-Pre\""
28-
],
29-
"outputs": []
28+
"#r \"nuget: DwC-a_dotnet.Interactive, 0.1.9-Pre\""
29+
]
3030
},
3131
{
3232
"cell_type": "markdown",
@@ -45,6 +45,7 @@
4545
"language": "csharp"
4646
}
4747
},
48+
"outputs": [],
4849
"source": [
4950
"using Microsoft.AspNetCore.Html;\n",
5051
"using Microsoft.DotNet.Interactive.Formatting;\n",
@@ -79,8 +80,7 @@
7980
"\n",
8081
" writer.Write(t);\n",
8182
"}, \"text/html\");"
82-
],
83-
"outputs": []
83+
]
8484
},
8585
{
8686
"cell_type": "markdown",
@@ -99,6 +99,7 @@
9999
"language": "csharp"
100100
}
101101
},
102+
"outputs": [],
102103
"source": [
103104
"using DwC_A;\n",
104105
"using DwC_A.Terms;\n",
@@ -121,8 +122,7 @@
121122
"\n",
122123
"var eventID = eventFile.DataRows.Skip(2).Select(row => row[Terms.eventID]).First();\n",
123124
"display(eventID);"
124-
],
125-
"outputs": []
125+
]
126126
},
127127
{
128128
"cell_type": "markdown",
@@ -141,6 +141,7 @@
141141
"language": "csharp"
142142
}
143143
},
144+
"outputs": [],
144145
"source": [
145146
"using Microsoft.Data.Analysis;\n",
146147
"\n",
@@ -158,8 +159,7 @@
158159
"\n",
159160
"var df = new DataFrame(species, counts);\n",
160161
"df.Info()"
161-
],
162-
"outputs": []
162+
]
163163
},
164164
{
165165
"cell_type": "markdown",
@@ -180,12 +180,12 @@
180180
"language": "csharp"
181181
}
182182
},
183+
"outputs": [],
183184
"source": [
184185
"var sum = (int)counts.Sum();\n",
185186
"double D = 1 - (double)(int)(counts.Apply(n => n * (n - 1)).Sum()) / (sum * (sum - 1));\n",
186187
"display($\"D = {D:0.00}\")"
187-
],
188-
"outputs": []
188+
]
189189
},
190190
{
191191
"cell_type": "markdown",
@@ -204,6 +204,7 @@
204204
"language": "csharp"
205205
}
206206
},
207+
"outputs": [],
207208
"source": [
208209
"using XPlot.Plotly;\n",
209210
"\n",
@@ -213,8 +214,7 @@
213214
"var chart = Chart.Column(kvp);\n",
214215
"chart.WithTitle($\"Event: {eventID}\");\n",
215216
"display(chart)"
216-
],
217-
"outputs": []
217+
]
218218
}
219219
],
220220
"metadata": {
@@ -233,4 +233,4 @@
233233
},
234234
"nbformat": 4,
235235
"nbformat_minor": 4
236-
}
236+
}

notebooks/04_FSharp.ipynb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
"language": "fsharp"
2222
}
2323
},
24+
"outputs": [],
2425
"source": [
2526
"#r \"nuget:Plotly.NET,2.0.0-preview.15\"\n",
2627
"#r \"nuget:Plotly.NET.Interactive,2.0.0-preview.15\"\n",
2728
"#r \"nuget:FSharp.Data,4.2.5\"\n",
2829
"#r \"nuget:DwC-A_dotnet,0.6.0\"\n",
29-
"#r \"nuget:DwC-A_dotnet.Interactive,0.1.8-Pre\""
30-
],
31-
"outputs": []
30+
"#r \"nuget:DwC-A_dotnet.Interactive,0.1.9-Pre\""
31+
]
3232
},
3333
{
3434
"cell_type": "code",
@@ -38,6 +38,7 @@
3838
"language": "fsharp"
3939
}
4040
},
41+
"outputs": [],
4142
"source": [
4243
"open DwC_A\n",
4344
"open DwC_A.Terms\n",
@@ -55,8 +56,7 @@
5556
"\n",
5657
"let occurrence = archive.CoreFile;\n",
5758
"occurrence"
58-
],
59-
"outputs": []
59+
]
6060
},
6161
{
6262
"cell_type": "code",
@@ -66,6 +66,7 @@
6666
"language": "fsharp"
6767
}
6868
},
69+
"outputs": [],
6970
"source": [
7071
"open System.Linq\n",
7172
"open Plotly.NET\n",
@@ -99,8 +100,7 @@
99100
" |> Chart.withTitle(title = \"Papilionidae of Texas\")\n",
100101
"\n",
101102
"map "
102-
],
103-
"outputs": []
103+
]
104104
}
105105
],
106106
"metadata": {
@@ -119,4 +119,4 @@
119119
},
120120
"nbformat": 4,
121121
"nbformat_minor": 4
122-
}
122+
}

0 commit comments

Comments
 (0)