Skip to content

Commit

Permalink
add info and simplify .net interactive notebook example (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomFractals committed Jul 31, 2021
1 parent 7608170 commit 092703c
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions notebooks/chicago-speed-cameras.ipynb
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Chicago Speed Cameras .NET Interactive Notebook 📓\r\n",
"\r\n",
"Data Source: [Chicago Transportation](https://data.cityofchicago.org/browse?category=Transportation)/[Speed Camera Locations](https://data.cityofchicago.org/Transportation/Speed-Camera-Locations/4i42-qv3h)\r\n",
"\r\n",
"See [Chicago Speed Camera Locations](https://observablehq.com/@randomfractals/chicago-speed-camera-locations) Observable Notebook 📓 for map view."
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"dotnet_interactive": {
"language": "csharp"
}
},
"outputs": [],
"source": [
"using System.Net.Http;\r\n",
"using System.Text.Json;\r\n",
"using Microsoft.DotNet.Interactive.Formatting;\r\n",
"using Microsoft.DotNet.Interactive.Formatting.TabularData;\r\n",
"\r\n",
"var dataUrl = \"https://data.cityofchicago.org/resource/4i42-qv3h.json\";\r\n",
"var data = await new HttpClient().GetStringAsync(dataUrl);\r\n",
"JsonDocument.Parse(data).ToTabularDataResource()"
]
"data"
],
"outputs": [],
"metadata": {
"dotnet_interactive": {
"language": "csharp"
}
}
}
],
"metadata": {
Expand Down

0 comments on commit 092703c

Please sign in to comment.