A suite of standardized data structure and pipeline for city data engineering
Project description
UDL (UrbanDataLayer) is a suite of standard data structure and pipeline for city data engineering, which processes city data from various raw data into a unified data format.
UDL is featured for:
- Unified standardized formats for city data: five data layers (grid, graph, point, polygon and linestring).
- User-friendly APIs of data processing: scheme transformation, granularity alignment and feature fusion.
Usage
- Install Python >= 3.8. For convenience, execute the following command.
pip install udlayer
- Construct a UDL layer data. The full layer data formats and data processing APIs are available in the documentation.
# Example: Construct a polygon layer data from a geojson file
from udlayer.layer.polygonlayer import PolygonLayer
polygonlayer = PolygonLayer("Vermont", "sample_Vermont.geojson", year=2014, column_list=['tag'])
print(polygonlayer.data)
# Example: Transform a tiff file to a grid layer data
from udlayer.transformation.transformation import *
from udlayer.alignment.alignment import *
from udlayer.utils.utility import *
griddata = tif_to_grid("pm2.5", ["Shanghai_pm2.5.tif"], start_lat=30.975, start_lon=121.1, end_lat=31.514, end_lon=121.804, year=2014)
print(griddata.data)
- Transform between different data layers.
# Example: Transform a polygon layer to a graph layer
from udlayer.transformation.transformation import *
with open('sample_Vermont.pickle', 'rb') as f:
polygon = pickle.load(f)
graph_data = polygon_to_graph(polygon)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
udlayer-0.2.3.tar.gz
(17.8 kB
view details)
File details
Details for the file udlayer-0.2.3.tar.gz.
File metadata
- Download URL: udlayer-0.2.3.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c6d33f1678922addea1da28c6e4dd2c3babe461ac9c76456e71126fa65c7c5f
|
|
| MD5 |
77ea98800fb06d5856f681fdbef88f2d
|
|
| BLAKE2b-256 |
0c295bbf90d43615b7306f2b75305bf17f978101edd9b2950d23ef3f116b2439
|