View Code? Open in Web Editor
NEW
Code repository for the Data Wrangling module's project of the Data Science course from the Dev.F platform.
data-wrangling-api's Introduction
- Code repository for the Data Wrangling module's project of the Data Science course from the Dev.F platform.
- Repositorio de codigo del proyecto perteneciente al modulo de Data Wrangling para el curso de Data Science por parte de Dev.F
Data sourcing [data_sourcing.py]
- Obtención de datos
- Escritura a base de datos
- Conexión a MongoDB mediante cliente de pymongo
- Inserción de los datos como un JSON a una nueva coleccion dentro de una nueva base de datos
- Obtencion de datos mediante una consulta en una nueva conexion al cliente de MongoDB
- Limitado de set de datos a exclusivamente jugadores con Status actual igual a Active:
dataset = col.find({'Status': 'Active'})
- Delimitación de columnas con una lista de columnas deseadas:
dataframe.loc[:, columns_to_keep]
API declaration [main.py]
- Iniciación de app con el web framework FastAPI
- Creación de logica mediante uso de Pandas DataFrames para las respuestas en multiples casos
- Declaración de endpoints y su retorno respectivo para cada caso
- Documentación
Data sourcing [data_sourcing.py]
- Data acquisition
- Writing to the database
- Connected to MongoDB using the pymongo client
- Inserted the data as a JSON into a new collection within a new database
- Retrieveed data through a query in a new connection to the MongoDB client
- Limited the dataset to only players with the current Status equal to Active:
dataset = col.find({'Status': 'Active'})
- Column delimitation with a list of desired columns:
dataframe.loc[:, columns_to_keep]
API declaration [main.py]
- Initialized the app with the FastAPI web framework
- Created the logic for multiple request cases using Pandas DataFrames for the response
- Declared the endpoints and their respective return for each case
- Documentation
Extras
- List of options to pass as the parameter {team}. NFL teams abbreviation codes
- List of options to pass as the parameter {position} (G replaces OL, and DB is the aggregate of CB and S). NFL abbreviation legend
- The {weight} parameter represents pounds of weight.
data-wrangling-api's People
Contributors
Watchers