semvec/pypi-packages huggingface dataset:
tidyhome 1.0.1
Package for accessing CFPB U.S. home mortgage data
Requires Python: >=3.6

# tidyhome: a package for accessing CFPB U.S. home mortgage data

## What is tidyhome?

Tidyhome is a package that simplifies the process of retrieving Home Mortgage Disclosure Act (HMDA) data from the Consumer Financial Protection Bureau's (CFPB) [HMDA Platform API](https://cfpb.github.io/hmda-platform/#hmda-api-documentation).

The 'HMDA Platform API' refers to several APIs designed to handle various tasks. Of these APIs, tidyhome interacts with the 'Data Browser' API.

The goal of tidyhome is to allow users the option to circumnavigate making API requests in their web browser. The freedom to do so may prove useful to data scientists who are tasked with analyzing HMDA data.

## Installation

Install tidyhome using:

```python
pip install tidyhome
```

## How to use tidyhome

Tidyhome contains several classes and functions that are designed to simplify and guide the process of making a valid API request.

Tidyhome's classes are designed to be passed as arguments to the :races: and :actions: parameters of tidyhome's functions.

Tidyhome's functions use the arguments passed in function call parameters as the arguments passed in the API request it makes.

Below is a brief overview of each class/function and an example of how tidyhome can be used.

### Classes:

* ```Race```: an enumerated class containing races recorded as part of a home mortgage application or loan. You can use these to get data for only the races you specify.

* ```Action```: an enumerated class containing actions taken by lending institutions on the filed application or loan. You can use these to get data for only the actions you specify.

### Functions:

* ```get_aggregations```: returns a pandas DataFrame containing aggregate data of all loans reported.

* ```get_loans```: returns a pandas DataFrame containing all lending institutions that reported HMDA data.

* ```get_institutions```: returns a pandas DataFrame containing raw HMDA data on all individual loans reported.

*Click [here](https://github.com/pandas-dev/pandas) for more information regarding pandas, a powerful Python data analysis package.*

### Usage example:

```python
>>> tidyhome.get_loans(2019, "dc", [tidyhome.Action.INCOMPLETE, tidyhome.Action.PREAPPROVED], [tidyhome.Race.BLACK, tidyhome.Race.WHITE])
```

The above function call returns a DataFrame containing HMDA data on all individual loans in 2019 in DC where the file was closed for incompleteness or the loan was preapproved, and the reported races of applicants/borrowers were black or white.

------------

Github Page: https://github.com/summitllc/tidyhome-py

Bug Tracking Page: https://github.com/summitllc/tidyhome-py/issues
nvec 0.0.1
vectors of n dimensions
Requires Python: >=3.6

# nvec

a simple package for handling vectors of any size.

all* your favorite vector operations are here, and generalized to n-dimensional vectors. want to add three 4D vectors? dot product a 8D and 3D vector together? you can do it!

**\*disclaimer: i still haven't figured out how to implement the cross product in n dimensions, so right now, it only works on vectors <= 3 dimensions. sorry**

# examples
defining a vector is as simple as passing the constructor an n-dimensional array of scalar values!
```python
v = Vector([a, b, c,... y, z])
```
you can also create `Vector`s in other ways:
```python
# the vector between two points in n-dimensional space
v2 = Vector.fromTwoPoints([a₁, b₁, c₁,...], [a₂, b₂, c₂,...])

# for the special case of 3D vectors in a spherical coordinate system 
v3 = Vector.fromSpherical(r, θ, φ)
```

from there, you can do all sorts of fun unary and binary operations!
```python
v3 = v1.unitVector()

# returns the sector the vector is in, given as an array made up of either 1, 0, or -1
array = v1.sector()

# x(), y(), and z() are convenience methods to return the 1st, 2nd, or 3rd-dimensional component of a vector
f = v1.x()

v2 = v1.scale(7)

boolean = v1.parallel(v2)
boolean = v1.perpendicular(v2)

# returns the angle between v1 and v2
angle = v1.angleTo(v2)

v3 = v1.dot(v2)
v3 = v1.cross(v2)
```
and more!
you can also access various components of the vectors:
```python
# returns the components of a vector as a list
array = v1.toArray()

# returns the angle the vector makes from the positive axis in the i dimension (x = 0, y = 1, etc)
angle = v1.alphaRad(i)

```

you can also use built-in operators to do math with vectors and scalars!
```python
# v2 is a vector in the same direction as v1 but its length is 5 more
v2 = v1 + 5 
# v1 is now the difference between v1 and v2
v1 -= v2

v3 = v1 + v2

# equivalent to scaling v1 by 6 or 1/5 respectively
v2 = v1 * 6
v1 =/ 5

# compares magnitudes
v1 >= v2
v1 < v2
```

you can also iterate over the components of a vector:
```python
v1 = Vector([2, 4, 6])
for i in v1:
	print(i)
# 2
# 4
# 6
# >>>
```