Coder Social home page Coder Social logo

orm-sqlalchemy's Introduction

Assignment

Code style: black

Language & Database : Python(FastAPI) & Mysql

Problem 1 - Data Modeling

Mysql Database : weather, Table : weather

CREATE DATABASE `weather`;
use weather;
CREATE TABLE weather (
    id varchar(20) PRIMARY KEY,
    date varchar(8),
    station varchar(11),
    min_temperature DECIMAL(5,1),
    max_temperature DECIMAL(5,1),
    precipitation DECIMAL(5,1)
);

Problem 2 - Ingestion

file location : `assignment/process.py' function : add_weather - using restAPI per line by line function : add_weathers - using restAPI for all records once.

Elapsed time printed on the logs.

** The id(station and date combination) has PRIMARY KEY attribute. So the weather table couldn't have duplicate station and date combication.

Problem 3 - Data Analysis

file location : `assignment/process.py' function : statistic_weather()

Problem 4 - REST API

To use assignment call It should copy code-challenge-template folder around assignment folder. (default code-challenge-template location : ~/assignment/code-challenge-template)

Extra Credit - Deployment

docker-compose up -d mysql

Execute one of belows a minute later. - because It should be execute after mysql server running.

docker-compose up 

or

docker-compose up -d

file location : `assignment/process.py' function : pandas_statistic_weather()

  • Simple pandas library test version

orm-sqlalchemy's People

Contributors

zephyranthes03 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.