zipcode-features 0.0.1__tar.gz → 0.0.4__tar.gz

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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zipcode_features
3
- Version: 0.0.1
3
+ Version: 0.0.4
4
4
  Summary: A tool to get features based on census data from zipcodes
5
5
  Home-page: https://github.com/EricSchles/zipcode_features
6
6
  Author: Eric Schles
@@ -18,6 +18,7 @@ Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: zipcodes
20
20
  Requires-Dist: pandas
21
+ Requires-Dist: zipcode3
21
22
  Dynamic: author
22
23
  Dynamic: author-email
23
24
  Dynamic: classifier
@@ -10,7 +10,7 @@ README = (HERE / "README.md").read_text()
10
10
  # This call to setup() does all the work
11
11
  setup(
12
12
  name="zipcode_features",
13
- version="0.0.1",
13
+ version="0.0.4",
14
14
  description="A tool to get features based on census data from zipcodes",
15
15
  long_description=README,
16
16
  long_description_content_type="text/markdown",
@@ -32,5 +32,5 @@ setup(
32
32
  "zipcode_features",
33
33
  ],
34
34
  include_package_data=True,
35
- install_requires=["zipcodes", "pandas"],
35
+ install_requires=["zipcodes", "pandas", "zipcode3"],
36
36
  )
@@ -1,7 +1,7 @@
1
- __version__ = '0.0.1'
1
+ __version__ = '0.0.4'
2
2
 
3
3
  import zipcodes
4
- from uszipcode.search import SearchEngine
4
+ from zipcode3.search import SearchEngine
5
5
  import pandas as pd
6
6
 
7
7
  def us_get_demographics(state: str, city: str = None, zip_list: list = None) -> pd.DataFrame:
@@ -22,10 +22,15 @@ def us_get_demographics(state: str, city: str = None, zip_list: list = None) ->
22
22
  https://github.com/EricSchles/uszipcode-project
23
23
  """
24
24
  search = SearchEngine()
25
- payload = {
26
- "state": state,
27
- "city": city
28
- }
25
+ if city is None:
26
+ payload = {
27
+ "state": state
28
+ }
29
+ else:
30
+ payload = {
31
+ "state": state,
32
+ "city": city
33
+ }
29
34
  if zip_list is None:
30
35
  zipcode_and_demo = [
31
36
  [zipcode["zip_code"], search.by_zipcode(zipcode["zip_code"])]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zipcode_features
3
- Version: 0.0.1
3
+ Version: 0.0.4
4
4
  Summary: A tool to get features based on census data from zipcodes
5
5
  Home-page: https://github.com/EricSchles/zipcode_features
6
6
  Author: Eric Schles
@@ -18,6 +18,7 @@ Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: zipcodes
20
20
  Requires-Dist: pandas
21
+ Requires-Dist: zipcode3
21
22
  Dynamic: author
22
23
  Dynamic: author-email
23
24
  Dynamic: classifier