Datasets:
license: apache-2.0
language:
- en
size_categories:
- 10K<n<100K
Durham Urban Canopy Analysis and Enhancement Initiative (DUCAEI)
The Class
is a custom dataset class that brings together information from two distinct domains into a unified dataset.
This class is designed to streamline the process of working with data from different sources and enable users to seamlessly access and analyze combined datasets.
Project Overview
{ "id": "your_dataset_id", "title": "Durham Urban Canopy", "description": "Your dataset description.", "licenses": [ { "name": "License Name", "url": "URL to License" } ], "image": "https://raw.githubusercontent.com/AuraMa111/Urban_Tree_Canopy_in_Durham/main/Picture1.png" }
The Durham Urban Canopy Analysis and Enhancement Initiative (DUCAEI) is committed to utilizing the Trees & Planting Sites dataset for a comprehensive geospatial analysis of Durham's urban tree canopy. Through Python within Google Colab, our aim is to identify key locations for canopy expansion, evaluate the impact of urban development on green spaces, and deliver informed recommendations for the sustainable growth of urban tree coverage.
Background and Rationale
Durham's urban tree canopy is a crucial component that contributes to environmental quality, public health, and overall city aesthetics. This canopy is under threat due to ongoing urban development and natural wear. A systematic, data-driven approach is critical for strategic planning and conservation of the urban forest to ensure its vitality for generations to come.
Data Sources and Methodology
These data files are from durham open.
And for the .py file:
The provided Python script defines a dataset class named DurhamTrees
using the datasets
library. This class combines information from two different domains ("class1_domain1" and "class2_domain1") and includes features from both domains.
Key components of the script:
Imported Libraries:
datasets
: for building the dataset.pandas
: for handling data in tabular form.geopandas
: for working with geospatial data.- Other standard libraries for various functionalities.
URL Definitions:
- Specifies URLs for CSV and GeoJSON files from two different domains.
DurhamTrees Class:
- Inherits from
datasets.GeneratorBasedBuilder
. - Defines configurations for two classes ("class1_domain1" and "class2_domain1").
- Specifies features for the combined dataset, including features from both classes.
- Inherits from
Info Method:
- Describes the combined dataset's features, supervised keys, homepage, and citation.
Split Generators Method:
- Downloads and extracts data from the provided URLs.
- Defines split generators for training data.
Generate Examples Methods:
_generate_examples
: Calls methods to generate examples for both classes._generate_examples_from_class1
: Reads CSV and GeoJSON data, merges them, and yields examples._generate_examples_from_class2
: Reads CSV data and yields examples.
Column Extraction:
- Defines columns to extract for both classes, indicating which features to include in the final dataset.
Example Yielding:
- Iterates over rows of the final dataframes, converting each row to a dictionary and yielding examples with unique identifiers.
The script is intended for creating a combined dataset from two different sources, and it uses the datasets
library to facilitate data handling.
Data Sources
We will leverage the following files from the Durham Trees & Planting Sites Dataset, as found on the Durham Open Data portal:
GS_TreeInventory.shp
Trees_&_Planting_Sites.csv
Trees_%26_Planting_Sites.geojson
Dataset Card for Urban Tree Inventory
Dataset Description
This dataset provides comprehensive information about urban trees within a specified area, including their physical characteristics, environmental benefits, and the economic value they add in terms of ecosystem services.
Spatial Data (GeoJSON)
Format: GeoJSON
Content:
- Type:
FeatureCollection
- A collection of feature objects. - Features: Each feature object represents a tree and contains:
- Type:
Feature
- Geometry:
Point
(includes longitude and latitude of the tree location). - Properties: Detailed information about the tree (some fields may overlap with the CSV structure below).
- Type:
Tabular Data (CSV)
Format: CSV
Columns:
- X, Y: Coordinates of the tree location.
- OBJECTID: Unique identifier for the tree.
- streetaddress: Street address nearest to the tree.
- city: City where the tree is located.
- zipcode: Zip code for the location of the tree.
- facilityid: Identifier for the facility associated with the tree, if any.
- present: Indication of whether the tree is currently present.
- genus, species, commonname: Botanical and common names of the tree.
- plantingdate: Date when the tree was planted.
- diameterin: Diameter of the tree trunk in inches.
- heightft: Height of the tree in feet.
- condition: Health condition of the tree.
- contractwork: Indicates if the tree has had any contract work done.
- neighborhood: Neighborhood where the tree is located.
- program: The program under which the tree was planted.
- plantingw: Width of the planting site.
- plantingcond: Condition of the planting site.
- underpwerlins: Whether the tree is under power lines.
- matureheight: The mature height of the tree.
- GlobalID: A global unique identifier for the tree.
- created_user: The user who created the record.
- created_date: The date the record was created.
- last_edited_user: The user who last edited the record.
- last_edited_date: The date the record was last edited.
Environmental and Economic Data:
- isoprene, monoterpene, vocs: Emissions and absorption data for various compounds.
- coremoved_ozperyr, o3removed_ozperyr, etc.: Annual pollutant removal metrics.
- o2production_lbperyr: Annual oxygen production.
- carbonstorage_lb, carbonstorage_dol: Carbon storage metrics.
- grosscarseq_lbperyr, grosscarseq_dolperyr: Gross carbon sequestration.
- avoidrunoff_ft2peryr, avoidrunoff_dol2peryr: Metrics related to stormwater runoff avoidance.
- totannbenefits_dolperyr: Total annual dollar benefits from the tree.
- leafarea_sqft, potevapotran_cuftperyr, etc.: Metrics related to the water cycle.
- heating_mbtuperyr, cooling_kwhperyr, etc.: Energy savings related to the tree's impact on building energy use.
Example Record
GeoJSON Feature:
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-78.90863, 36.00441]
},
"properties": {
"OBJECTID": 2840940,
"commonname": "Willow Oak",
// Additional properties...
}
}
The GS_TreeInventory.shp
file encompasses a range of attributes for each record:
- OBJECTID: Unique identifier for each record.
- streetaddr: Street address where the tree or planting site is located.
- city: The city name, which is Durham.
- zipcode: Postal code for the location.
- facilityid: Identifier possibly linked to a facility or area associated with the tree.
- present: Type of feature present, such as a tree or a planting site.
- genus: Genus of the tree.
- species: Species of the tree.
- commonname: Common name of the tree.
- plantingda: Date or year range when the tree was planted or the planting site was established.
- ...
Objectives
- Combine Shapefile and CSV data into a comprehensive geospatial dataset using Python.
- Apply Python libraries to uncover relationships between tree canopy data and urban development.
- Provide practical insights and strategies for the expansion of Durham's urban tree canopy.
- Produce analyses and visualizations with the GeoJSON file.
Methodology
Our analytical process within Google Colab will encompass:
- Data Preparation and Integration: Using tools like Geopandas, Pandas, and PyShp to organize and combine spatial and tabular data.
- Geospatial Analysis: Applying Shapely and Rtree for spatial analysis, and using SciPy or Statsmodels for statistical correlations.
- Visualization and Optimization: Generating maps and graphs with Matplotlib, Seaborn, or Plotly, and utilizing optimization algorithms to suggest optimal planting locations.
Deliverables
- A collection of Google Colab Python notebooks that outline our analytical processes.
- Interactive maps and visualizations that connect tree canopy coverage with urban development metrics.
- An exhaustive report that contains our findings and recommendations for enhancing the urban canopy.
Limitations
- Computational Resources: The limited computational offerings of Google Colab may pose a challenge to the size of the datasets or the complexity of models we can employ.
- Data Quality: The accuracy and currency of the data ultimately affect the precision of our recommendations.
- Sociopolitical Considerations: Implementation of our data-driven suggestions must be reviewed within the context of local policy and community input.
Conclusion
DUCAEI aims to create a more verdant and livable urban landscape in Durham through this Python-based analytical project. By laying a strong foundation for data-informed decision-making, we hope to cultivate a thriving, green, and sustainable urban environment.