Skip to content

Commit 624c951

Browse files
Merge pull request #278142 from fbsolo-ms1/update-open-datasets-files
Freshness update for dataset-boston-safety.md . . .
2 parents f4ad747 + 8b9960e commit 624c951

File tree

1 file changed

+17
-33
lines changed

1 file changed

+17
-33
lines changed

articles/open-datasets/dataset-boston-safety.md

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,36 @@ description: Learn how to use the Boston Safety Data dataset in Azure Open Datas
44
ms.service: open-datasets
55
ms.custom: devx-track-python
66
ms.topic: sample
7-
ms.date: 04/16/2021
7+
ms.reviewer: franksolomon
8+
ms.date: 06/13/2024
89
---
910

1011
# Boston Safety Data
1112

12-
311 calls reported to the city of Boston.
13-
14-
Refer to this link to learn more about [BOS:311](https://www.cityofboston.gov/311/).
13+
Boston 311 call data covers 311 nonemergency calls made to the Boston 311 call system. For more information, visit the [BOS:311](https://www.cityofboston.gov/311/) resource.
1514

1615
[!INCLUDE [Open Dataset usage notice](./includes/open-datasets-usage-note.md)]
1716

1817
## Volume and retention
1918

20-
This dataset is stored in Parquet format. It is updated daily, and contains about 100-K rows (10 MB) in total as of 2019.
21-
22-
This dataset contains historical records accumulated from 2011 to the present. You can use parameter settings in our SDK to fetch data within a specific time range.
19+
This dataset is stored in Parquet format. Starting in 2011, Boston provides its 311 data in different files, one file resource for each different year. The data is updated daily. The 2023 dataset contains about receives daily updates, and it contains about 313-K rows (179 MB) in total as of 2019. You can use parameter settings in our SDK to fetch data within a specific time range.
2320

2421
## Storage location
2522

26-
This dataset is stored in the East US Azure region. Allocating compute resources in East US is recommended for affinity.
23+
This dataset is stored in the East US Azure region. For affinity, we recommend allocation of compute resources in the East US region.
2724

2825
## Additional information
2926

30-
This dataset is sourced from city of Boston government. For more information, see [Boston's dataset site](https://data.boston.gov/dataset/311-service-requests). For dataset licensing, see [Open Data Commons Public Domain Dedication and License (ODC PDDL)](http://opendefinition.org/licenses/odc-pddl/).
27+
This dataset is sourced from the government of the City of Boston. For more information, visit the [Boston dataset site](https://data.boston.gov/dataset/311-service-requests). For dataset licensing information, visit the [Open Data Commons Public Domain Dedication and License (ODC PDDL)](http://opendefinition.org/licenses/odc-pddl/) resource.
3128

3229
## Columns
3330

3431
| Name | Data type | Unique | Values (sample) | Description |
3532
|-|-|-|-|-|
3633
| address | string | 140,612 | \" \" 1 City Hall Plz Boston MA 02108 | Location. |
3734
| category | string | 54 | Street Cleaning Sanitation | Reason of the service request. |
38-
| dataSubtype | string | 1 | 311_All | 311_All |
39-
| dataType | string | 1 | Safety | Safety |
35+
| dataSubtype | string | 1 | 311_All | "311_All" |
36+
| dataType | string | 1 | Safety | "Safety" |
4037
| dateTime | timestamp | 1,529,075 | 2015-07-23 10:51:00 2015-07-23 10:47:00 | Open date and time of the service request. |
4138
| latitude | double | 1,622 | 42.3594 42.3603 | This is the latitude value. Lines of latitude are parallel to the equator. |
4239
| longitude | double | 1,806 | -71.0587 -71.0583 | This is the longitude value. Lines of longitude run perpendicular to lines of latitude, and all pass through both poles. |
@@ -57,15 +54,12 @@ This dataset is sourced from city of Boston government. For more information, se
5754
| Safety | 311_All | 4/27/2021 11:05:00 PM | Enforcement & Abandoned Vehicles | Parking Enforcement | Open | 1 Nassau St Boston MA 02111 | 42.3486 | -71.0629 | Constituent Call | |
5855
| Safety | 311_All | 4/27/2021 11:00:55 PM | Code Enforcement | Poor Conditions of Property | Open | 17 Mercer St South Boston MA 02127 | 42.3332 | -71.0492 | Citizens Connect App | |
5956

60-
## Data access
61-
62-
### Azure Notebooks
57+
## Data access - Azure Notebooks
6358

6459
# [azureml-opendatasets](#tab/azureml-opendatasets)
6560

6661
<!-- nbstart https://opendatasets-api.azure.com/discoveryapi/OpenDataset/DownloadNotebook?serviceType=AzureNotebooks&package=azureml-opendatasets&registryId=city_safety_boston -->
6762

68-
6963
```
7064
# This is a package in preview.
7165
from azureml.opendatasets import BostonSafety
@@ -85,12 +79,10 @@ safety.info()
8579

8680
<!-- nbend -->
8781

88-
8982
# [azure-storage](#tab/azure-storage)
9083

9184
<!-- nbstart https://opendatasets-api.azure.com/discoveryapi/OpenDataset/DownloadNotebook?serviceType=AzureNotebooks&package=azure-storage&registryId=city_safety_boston -->
9285

93-
9486
```python
9587
# Pip install packages
9688
import os, sys
@@ -153,29 +145,26 @@ df
153145

154146
<!-- nbend -->
155147

156-
157148
# [pyspark](#tab/pyspark)
158149

159-
Sample not available for this platform/package combination.
150+
A sample isn't available for this platform / package combination.
160151

161152
---
162153

163-
### Azure Databricks
154+
## Data access - Azure Databricks
164155

165156
# [azureml-opendatasets](#tab/azureml-opendatasets)
166157

167158
<!-- nbstart https://opendatasets-api.azure.com/discoveryapi/OpenDataset/DownloadNotebook?serviceType=AzureDatabricks&package=azureml-opendatasets&registryId=city_safety_boston -->
168159

169-
170160
```
171161
# This is a package in preview.
172-
# You need to pip install azureml-opendatasets in Databricks cluster. https://learn.microsoft.com/azure/data-explorer/connect-from-databricks#install-the-python-library-on-your-azure-databricks-cluster
162+
# You need to pip install azureml-opendatasets in a Databricks cluster. https://learn.microsoft.com/azure/data-explorer/connect-from-databricks#install-the-python-library-on-your-azure-databricks-cluster
173163
from azureml.opendatasets import BostonSafety
174164
175165
from datetime import datetime
176166
from dateutil import parser
177167
178-
179168
end_date = parser.parse('2016-01-01')
180169
start_date = parser.parse('2015-05-01')
181170
safety = BostonSafety(start_date=start_date, end_date=end_date)
@@ -190,13 +179,12 @@ display(safety)
190179

191180
# [azure-storage](#tab/azure-storage)
192181

193-
Sample not available for this platform/package combination.
182+
A sample isn't available for this platform / package combination.
194183

195184
# [pyspark](#tab/pyspark)
196185

197186
<!-- nbstart https://opendatasets-api.azure.com/discoveryapi/OpenDataset/DownloadNotebook?serviceType=AzureDatabricks&package=pyspark&registryId=city_safety_boston -->
198187

199-
200188
```python
201189
# Azure storage access info
202190
blob_account_name = "azureopendatastorage"
@@ -231,20 +219,18 @@ display(spark.sql('SELECT * FROM source LIMIT 10'))
231219

232220
---
233221

234-
### Azure Synapse
222+
## Data access - Azure Synapse
235223

236224
# [azureml-opendatasets](#tab/azureml-opendatasets)
237225

238226
<!-- nbstart https://opendatasets-api.azure.com/discoveryapi/OpenDataset/DownloadNotebook?serviceType=AzureSynapse&package=azureml-opendatasets&registryId=city_safety_boston -->
239227

240-
241228
```python
242229
from azureml.opendatasets import BostonSafety
243230

244231
from datetime import datetime
245232
from dateutil import parser
246233

247-
248234
end_date = parser.parse('2016-01-01')
249235
start_date = parser.parse('2015-05-01')
250236
safety = BostonSafety(start_date=start_date, end_date=end_date)
@@ -259,13 +245,12 @@ display(safety)
259245

260246
# [azure-storage](#tab/azure-storage)
261247

262-
Sample not available for this platform/package combination.
248+
A sample isn't available for this platform / package combination.
263249

264250
# [pyspark](#tab/pyspark)
265251

266252
<!-- nbstart https://opendatasets-api.azure.com/discoveryapi/OpenDataset/DownloadNotebook?serviceType=AzureSynapse&package=pyspark&registryId=city_safety_boston -->
267253

268-
269254
```python
270255
# Azure storage access info
271256
blob_account_name = "azureopendatastorage"
@@ -302,9 +287,8 @@ display(spark.sql('SELECT * FROM source LIMIT 10'))
302287

303288
## Examples
304289

305-
- See the [City Safety Analytics](https://github.com/scottcounts/CitySafety) example on GitHub.
306-
290+
- Visit the [City Safety Analytics](https://github.com/scottcounts/CitySafety) resource available at GitHub.
307291

308292
## Next steps
309293

310-
View the rest of the datasets in the [Open Datasets catalog](dataset-catalog.md).
294+
View the rest of the datasets in the [Open Datasets catalog](./dataset-catalog.md).

0 commit comments

Comments
 (0)