Skip to main content

la-businesses

Description

This script downloads and processes the listing of all active businesses currently registered with the City of Los Angeles Office of Finance. An 'active' business is defined as a registered business whose owner has not notified the Office of Finance of a cease of business operations. Update Interval: Monthly.

Data source: https://data.lacity.org/A-Prosperous-City/Listing-of-Active-Businesses/6rrh-rzua

This script fetches the data and saves it locally as a CSV file. It also selects a subset of businesses with operation starting date within the last NDAYS days (default 30) and saves this as a separate CSV file. Finally, it creates and saves a KML file from the subset, useful for importing into Google Maps or similar software to visualize the distribution of recent businesses opened in the Los Angeles area.

Installation

Install with pip. The package installs as a command-line script.

pip install la-businesses

Usage

Run from the command line (it installs as as script). All downloaded and generated files will be stored in a directory files inside the current working directory.

usage: la-businesses [-h] [-u] [-d NDAYS]

optional arguments:
  -h, --help              show this help message and exit
  -u, --update            update data (default: False)
  -d NDAYS, --days NDAYS  started since NDAYS days ago (default: 30)

Known issues

Locations with missing coordinates are omitted from KML file

The script relies on coordinate data already provided in the downloaded dataset. Some businesses contain addresses but no coordinates; in these cases, the business is ignored when creating the KML (but is included in any saved CSV file). Future implementations should include a function to look up location coordinates from a given address (e.g., using the Open Street Maps API).

Locations with no DBA name simply show NaN in the KML file

The script could use better handling of business name / DBA combinations to omit NaN from KML when it does not have a business name.

No phone numbers

The data does not include any phone or email contact information; merging this dataset with one that includes contact information would be more useful for market research.

Metadata

Release files for la-businesses 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for la-businesses 0.1.1
File Size Uploaded
la-businesses-0.1.1.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for la-businesses 0.1.1
File Interpreter ABI Platform
la_businesses-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.8 kB

Release files / la-businesses-0.1.1.tar.gz

Download URL la-businesses-0.1.1.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5624a89caa4c0a3ce8d908c21f780858d5ab77578aba39f08004a96b597e6041
BLAKE2b-256 checksum
How to use checksums
7ed24755091e0b27fbe83b77572e0a3ca273c8c5c272aecef8bfc6c9eaee8b65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.11 CPython/3.7.2 Windows/10

Release files / la_businesses-0.1.1-py3-none-any.whl

Download URL la_businesses-0.1.1-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06ee44a887d1e944ed82ddfd6fcf4ccbdaa0a132242046b64557766513e161fb
BLAKE2b-256 checksum
How to use checksums
15eb09611ebddd9833d0e483cae093544b9ffde82e058e7d3e6930b31b8be341
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.11 CPython/3.7.2 Windows/10

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page