Providers
bear.typing.Provider
Bases: Protocol
Provider Protocol
Provides an interface for functions a module should implement to be considered a Provider.
Methods:
Name | Description |
---|---|
conform |
Conform function definition |
epsg |
Retrieve the EPSG code for this provider's data |
read |
Read provider data via a pyarrow.RecordBatch generator |
schema |
Optionally retrieve the schema of this provider's data |
Source code in src/bear/typing/__init__.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
conform(lf, *args, **kwargs)
classmethod
Conform function definition
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lf
|
LazyFrame
|
Deferred evaluation polars data frame to apply the implemented conform function against. |
required |
*args
|
Positional arguments passed to implementation. |
()
|
|
**kwargs
|
Keyword arguments passed to implementation. |
{}
|
Returns:
Type | Description |
---|---|
LazyFrame
|
A new lazy frame with the conform expressions applied. |
Source code in src/bear/typing/__init__.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
epsg()
classmethod
Retrieve the EPSG code for this provider's data
Returns:
Type | Description |
---|---|
int
|
EPSG code for the underlying data. |
Source code in src/bear/typing/__init__.py
27 28 29 30 31 32 33 34 35 36 |
|
read(county, *args, **kwargs)
classmethod
Read provider data via a pyarrow.RecordBatch generator
Parameters:
Name | Type | Description | Default |
---|---|---|---|
county
|
USCounty
|
The area of interest (AOI) to pull record batches from. |
required |
*args
|
Positional arguments passed to implementation. |
()
|
|
**kwargs
|
Keyword arguments passed to implementation. |
{}
|
Returns:
Type | Description |
---|---|
ArrowBatchGenerator
|
A generator yielding pyarrow.RecordBatch objects. |
Source code in src/bear/typing/__init__.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
schema()
classmethod
Optionally retrieve the schema of this provider's data
Returns:
Type | Description |
---|---|
Optional[Schema]
|
If supported, returns the schema of the provider's data. |
Source code in src/bear/typing/__init__.py
38 39 40 41 42 43 44 45 46 47 |
|
Implementations
Bases: Provider
Microsoft Building Footprints Provider
This data is licensed by Microsoft under the Open Data Commons Open Database License (ODbL).
Source code in src/bear/providers/provider_microsoft.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
Bases: Provider
National Address Database (NAD) Provider
This data is a work of the federal government and is not subject to copyright protection in accordance with 17 U.S.C. § 105. It is available for re-use without limitation or restriction. See the NAD disclaimer for more details.
Source code in src/bear/providers/provider_nad.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
Bases: Provider
OpenAddresses Provider
The datasets provided by OpenAddresses are individually licensed. Most are available under open licenses, but there is no guarantee.
Source code in src/bear/providers/provider_openaddresses.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
Bases: Provider
OpenStreetMap Provider
This data is licensed by the OpenStreetMap Foundation under the Open Data Commons Open Database License (ODbL).
Source code in src/bear/providers/provider_openstreetmap.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
Bases: Provider
USA Structures Provider
The data is licensed under the Creative Commons By Attribution (CC BY 4.0) license.
Source code in src/bear/providers/provider_usa_structures.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|