A Seattle-i tűzoltóság segélyhívásra reagáló intézkedései.
Mennyiség és megőrzés
Az adatkészlet Parketta formátumban van tárolva. Naponta frissül, és 2019-ből összesen körülbelül 800 ezer sort (20 MB) tartalmaz.
Az adatkészlet a 2010-től napjainkig összegyűlt rekordokat tartalmazza. Adott időtartomány adatainak beolvasásához az általunk biztosított SDK paraméterbeállításait használhatja.
Tárolási hely
Az adatkészlet tárolási helye a Kelet-USA Azure-régió. Az affinitás érdekében a Kelet-USA régión belüli számítási erőforrások lefoglalását javasoljuk.
További információ
Az adatkészlet Seattle város közigazgatási szerveitől származik. A forrást itt tekintheti meg. Tekintse meg az adatkészlet használatára vonatkozó feltételek licencelési és terjesztési előírásait. Az adatforrással kapcsolatos kérdéseket e-mailben teheti fel ezen a címen: open.data@seattle.gov.
Értesítések
A MICROSOFT JELEN ÁLLAPOTUKBAN SZOLGÁLTATJA AZ AZURE NYÍLT ADATKÉSZLETEIT. A MICROSOFT NEM VÁLLAL SEMMINEMŰ KIFEJEZETT VAGY HALLGATÓLAGOS JÓTÁLLÁST AZ ADATKÉSZLETEK HASZNÁLATÁRA VONATKOZÓAN. A HELYI TÖRVÉNYEK ÁLTAL ENGEDETT MÉRTÉKBEN A MICROSOFT ELHÁRÍT MINDEN FELELŐSSÉGET AZ ADATKÉSZLETEK HASZNÁLATÁBÓL ADÓDÓ ESETLEGES KÁROKÉRT VAGY VESZTESÉGEKÉRT, BELEÉRTVE A KÖZVETLEN, KÖVETKEZMÉNYES, KÜLÖNLEGES, KÖZVETETT, VÉLETLEN VAGY BÜNTETÉSBŐL EREDŐ KÁROKAT.
Az adatkészletet a Microsoft forrásadataihoz tartozó eredeti feltételek szerint szolgáltatjuk. A készlet tartalmazhat Microsofttól származó adatokat.
Access
Available in | When to use |
---|---|
Azure Notebooks | Quickly explore the dataset with Jupyter notebooks hosted on Azure or your local machine. |
Azure Databricks | Use this when you need the scale of an Azure managed Spark cluster to process the dataset. |
Azure Synapse | Use this when you need the scale of an Azure managed Spark cluster to process the dataset. |
Preview
dataType | dataSubtype | dateTime | category | subcategory | status | address | latitude | longitude | source | extendedProperties |
---|---|---|---|---|---|---|---|---|---|---|
Safety | 911_Fire | 1/7/2021 7:17:00 AM | Medic Response | null | null | 13716 Lake City Way Ne | 47.72838 | -122.292253 | null | |
Safety | 911_Fire | 1/7/2021 7:08:00 AM | Aid Response | null | null | 6410 14th Av Nw | 47.675337 | -122.373572 | null | |
Safety | 911_Fire | 1/7/2021 7:07:00 AM | Aid Response | null | null | 8316 Dibble Ave Nw | 47.689227 | -122.367271 | null | |
Safety | 911_Fire | 1/7/2021 7:03:00 AM | Low Acuity Response | null | null | 2119 3rd Av | 47.613308 | -122.342432 | null | |
Safety | 911_Fire | 1/7/2021 6:58:00 AM | Aid Response | null | null | 725 9th Av | 47.606444 | -122.325563 | null | |
Safety | 911_Fire | 1/7/2021 6:41:00 AM | Aid Response | null | null | 2445 3rd Av S | 47.581578 | -122.329988 | null | |
Safety | 911_Fire | 1/7/2021 6:35:00 AM | Medic Response | null | null | 7916 8th Av S | 47.531837 | -122.322826 | null | |
Safety | 911_Fire | 1/7/2021 6:20:00 AM | Auto Fire Alarm | null | null | 2964 Sw Avalon Way | 47.569061 | -122.370737 | null | |
Safety | 911_Fire | 1/7/2021 6:17:00 AM | Water Job Minor | null | null | 2600 Sw Holden St | 47.533703 | -122.365816 | null | |
Safety | 911_Fire | 1/7/2021 6:05:00 AM | Triaged Incident | null | null | 1038 Ne 125th St | 47.719477 | -122.317223 | null |
Name | Data type | Unique | Values (sample) | Description |
---|---|---|---|---|
address | string | 191,230 | 517 3rd Av 318 2nd Av Et S |
Az incidens helye. |
category | string | 232 | Aid Response Medic Response |
Válasz típusa. |
dataSubtype | string | 1 | 911_Fire | “911_Fire” |
dataType | string | 1 | Safety | “Safety” |
dateTime | timestamp | 1,507,181 | 2020-11-04 06:49:00 2020-08-07 12:44:00 |
A hívás dátuma és időpontja. |
latitude | double | 93,711 | 47.602172 47.600194 |
Ez a földrajzi szélesség értéke. A földrajzi szélességi vonalak párhuzamosak az egyenlítővel. |
longitude | double | 79,070 | -122.330863 -122.330541 |
Ez a földrajzi hosszúság értéke. A hosszúsági körök merőlegesek a szélességi körökre, és mindkét sarkkört érintik. |
Azure Notebooks
# This is a package in preview.
from azureml.opendatasets import SeattleSafety
from datetime import datetime
from dateutil import parser
end_date = parser.parse('2016-01-01')
start_date = parser.parse('2015-05-01')
safety = SeattleSafety(start_date=start_date, end_date=end_date)
safety = safety.to_pandas_dataframe()
safety.info()
# Pip install packages
import os, sys
!{sys.executable} -m pip install azure-storage-blob
!{sys.executable} -m pip install pyarrow
!{sys.executable} -m pip install pandas
# Azure storage access info
azure_storage_account_name = "azureopendatastorage"
azure_storage_sas_token = r""
container_name = "citydatacontainer"
folder_name = "Safety/Release/city=Seattle"
from azure.storage.blob import BlockBlobServicefrom azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient
if azure_storage_account_name is None or azure_storage_sas_token is None:
raise Exception(
"Provide your specific name and key for your Azure Storage account--see the Prerequisites section earlier.")
print('Looking for the first parquet under the folder ' +
folder_name + ' in container "' + container_name + '"...')
container_url = f"https://{azure_storage_account_name}.blob.core.windows.net/"
blob_service_client = BlobServiceClient(
container_url, azure_storage_sas_token if azure_storage_sas_token else None)
container_client = blob_service_client.get_container_client(container_name)
blobs = container_client.list_blobs(folder_name)
sorted_blobs = sorted(list(blobs), key=lambda e: e.name, reverse=True)
targetBlobName = ''
for blob in sorted_blobs:
if blob.name.startswith(folder_name) and blob.name.endswith('.parquet'):
targetBlobName = blob.name
break
print('Target blob to download: ' + targetBlobName)
_, filename = os.path.split(targetBlobName)
blob_client = container_client.get_blob_client(targetBlobName)
with open(filename, 'wb') as local_file:
blob_client.download_blob().download_to_stream(local_file)
# Read the parquet file into Pandas data frame
import pandas as pd
print('Reading the parquet file into Pandas data frame')
df = pd.read_parquet(filename)
# you can add your filter at below
print('Loaded as a Pandas data frame: ')
df
Azure Databricks
# This is a package in preview.
# You need to pip install azureml-opendatasets in Databricks cluster. https://docs.microsoft.com/en-us/azure/data-explorer/connect-from-databricks#install-the-python-library-on-your-azure-databricks-cluster
from azureml.opendatasets import SeattleSafety
from datetime import datetime
from dateutil import parser
end_date = parser.parse('2016-01-01')
start_date = parser.parse('2015-05-01')
safety = SeattleSafety(start_date=start_date, end_date=end_date)
safety = safety.to_spark_dataframe()
display(safety.limit(5))
# Azure storage access info
blob_account_name = "azureopendatastorage"
blob_container_name = "citydatacontainer"
blob_relative_path = "Safety/Release/city=Seattle"
blob_sas_token = r""
# Allow SPARK to read from Blob remotely
wasbs_path = 'wasbs://%s@%s.blob.core.windows.net/%s' % (blob_container_name, blob_account_name, blob_relative_path)
spark.conf.set(
'fs.azure.sas.%s.%s.blob.core.windows.net' % (blob_container_name, blob_account_name),
blob_sas_token)
print('Remote blob path: ' + wasbs_path)
# SPARK read parquet, note that it won't load any data yet by now
df = spark.read.parquet(wasbs_path)
print('Register the DataFrame as a SQL temporary view: source')
df.createOrReplaceTempView('source')
# Display top 10 rows
print('Displaying top 10 rows: ')
display(spark.sql('SELECT * FROM source LIMIT 10'))
Azure Synapse
# This is a package in preview.
from azureml.opendatasets import SeattleSafety
from datetime import datetime
from dateutil import parser
end_date = parser.parse('2016-01-01')
start_date = parser.parse('2015-05-01')
safety = SeattleSafety(start_date=start_date, end_date=end_date)
safety = safety.to_spark_dataframe()
# Display top 5 rows
display(safety.limit(5))
# Azure storage access info
blob_account_name = "azureopendatastorage"
blob_container_name = "citydatacontainer"
blob_relative_path = "Safety/Release/city=Seattle"
blob_sas_token = r""
# Allow SPARK to read from Blob remotely
wasbs_path = 'wasbs://%s@%s.blob.core.windows.net/%s' % (blob_container_name, blob_account_name, blob_relative_path)
spark.conf.set(
'fs.azure.sas.%s.%s.blob.core.windows.net' % (blob_container_name, blob_account_name),
blob_sas_token)
print('Remote blob path: ' + wasbs_path)
# SPARK read parquet, note that it won't load any data yet by now
df = spark.read.parquet(wasbs_path)
print('Register the DataFrame as a SQL temporary view: source')
df.createOrReplaceTempView('source')
# Display top 10 rows
print('Displaying top 10 rows: ')
display(spark.sql('SELECT * FROM source LIMIT 10'))
SELECT TOP 100 * FROM OPENROWSET( BULK 'https://azureopendatastorage.blob.core.windows.net/citydatacontainer/Safety/Release/city=Seattle/*.parquet', FORMAT = 'parquet' ) AS [r];

City Safety
From the Urban Innovation Initiative at Microsoft Research, databricks notebook for analytics with safety data (311 and 911 call data) from major U.S. cities. Analyses show frequency distributions and geographic clustering of safety issues within cities.