zipcode-features 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- __version__ = '0.1.0'
1
+ __version__ = '0.1.2'
2
2
 
3
3
  import zipcodes
4
4
  from zipcode3.search import SearchEngine
@@ -170,12 +170,10 @@ def _get_cbsa_code_to_cbsa_name() -> dict:
170
170
  """
171
171
  with resources.path("zipcode_features.data", "cbsa_codes.json") as json_path:
172
172
  code_to_name = json.load(open(json_path))
173
- df = pd.DataFrame(columns=["code", "name"])
174
- df["name"] = code_to_name.values()
175
- df["code"] = code_to_name.keys()
176
- df["name"] = df["name"].str.replace(" -", "-")
177
- df["name"] = df["name"].str.split().str.join(' ')
178
- return df.to_dict()
173
+ for code in code_to_name:
174
+ value = code_to_name[code].replace(" -", "-")
175
+ code_to_name[code] = " ".join([elem for elem in x.split(" ") if elem != ''])
176
+ return code_to_name
179
177
 
180
178
  def _get_zip_to_fips_code() -> dict:
181
179
  with resources.path("zipcode_features.data", "ZIP_COUNTY_122025.csv") as csv_path:
@@ -195,7 +193,9 @@ def _get_bls_data() -> pd.DataFrame:
195
193
  "bls_2025_quarter_two.csv"
196
194
  ]
197
195
  cols_to_drop = [
196
+ "own_code",
198
197
  "industry_code",
198
+ "agglvl_code",
199
199
  "size_code",
200
200
  "disclosure_code",
201
201
  'lq_disclosure_code',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zipcode-features
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: A Python package to process and extract features from zipcode data.
5
5
  Project-URL: Homepage, https://github.com/EricSchles/zipcode_features
6
6
  Author-email: Eric Schles <your.email@example.com>
@@ -1,4 +1,4 @@
1
- zipcode_features/__init__.py,sha256=-Um0-H6mLamZn8zeMzoe0WsRnYiPn6vY9otkRqqFtJk,10438
1
+ zipcode_features/__init__.py,sha256=Vh0uHqn66SHhsCiIK6Sf9kY3de1JezHHdSLX9W8UCq4,10421
2
2
  zipcode_features/data/CBSA_ZIP_122025.csv,sha256=K04cmFp6n-BnDNKBAVNlo9ZcISvNcCyi0pilx85M4uw,5184179
3
3
  zipcode_features/data/ZIP_COUNTY_122025.csv,sha256=U15HG0Vy-KFgdTBHBib77-nyBnmze3YL7jgmdjRj8hg,3649183
4
4
  zipcode_features/data/bls_2025_quarter_four.csv,sha256=K44BQUijfSKzaG1la7VpvGDa1mpoEKGRTDu9hjm0hrk,3715371
@@ -6,7 +6,7 @@ zipcode_features/data/bls_2025_quarter_one.csv,sha256=WrR9aRoqC4p0rVGmHIEV-ugLo4
6
6
  zipcode_features/data/bls_2025_quarter_three.csv,sha256=FeACbqadlOOuQvnQNCgyOKke448X_bGUuHJV7g7OW3A,3709136
7
7
  zipcode_features/data/bls_2025_quarter_two.csv,sha256=L_aIESbpSPViV4bGH82EvKLkBI_lf4BxGgoMe_wTrdc,3831843
8
8
  zipcode_features/data/cbsa_codes.json,sha256=H33pk1-12IcJreOLK3OVXhhQ7JirSqNLcZTuoY5FTFM,10324
9
- zipcode_features-0.1.0.dist-info/METADATA,sha256=_wyhsAqWn4EKjEV0vp5sNCxmhmmU23S3SxFZKK5qgQo,5849
10
- zipcode_features-0.1.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
11
- zipcode_features-0.1.0.dist-info/licenses/LICENSE,sha256=HDbMJ7oItmxTn3jVtZFi6jUFAHovset5jzAPUderjOc,1073
12
- zipcode_features-0.1.0.dist-info/RECORD,,
9
+ zipcode_features-0.1.2.dist-info/METADATA,sha256=D0gnFfKmSkavq8SWEPb2mHFf5nlJPv4gtkYr1Qy4YnI,5849
10
+ zipcode_features-0.1.2.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
11
+ zipcode_features-0.1.2.dist-info/licenses/LICENSE,sha256=HDbMJ7oItmxTn3jVtZFi6jUFAHovset5jzAPUderjOc,1073
12
+ zipcode_features-0.1.2.dist-info/RECORD,,