ExpDev07 / coronavirus-tracker-api

🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the 🔥 FastAPI framework. Supports multiple sources!
https://coronavirus-tracker-api.herokuapp.com
GNU General Public License v3.0
1.59k stars 320 forks source link

Added LocationInfo to TimelinedLocation #416

Closed ecypeng closed 3 years ago

ecypeng commented 3 years ago

What it does

Adds a LocationInfo to TimelinedLocationObject to encapsulate the location data. Previous naming (TimelinedLocation) was inaccurate as the object contained more than the name implies. This approach creates an aggregate for the fields relating to location (country, province, coordinates) so that it exists as a unit for the purpose of data changes.

Why it's important

Further encapsulates data and creates a new root and boundary. Prevents data unexpected data mutations and ensures consistency of changes.