From 1c49ef33a0830bdf3c19bda4a38b07e8168a396d Mon Sep 17 00:00:00 2001 From: Ashish Acharya Date: Fri, 2 Feb 2024 10:42:40 -0600 Subject: [PATCH] Add app for environmental justice --- environmental_justice/__init__.py | 0 environmental_justice/admin.py | 3 + environmental_justice/apps.py | 6 ++ .../migrations/0001_initial.py | 62 +++++++++++++++++++ environmental_justice/migrations/__init__.py | 0 environmental_justice/models.py | 33 ++++++++++ environmental_justice/tests.py | 3 + environmental_justice/views.py | 3 + 8 files changed, 110 insertions(+) create mode 100644 environmental_justice/__init__.py create mode 100644 environmental_justice/admin.py create mode 100644 environmental_justice/apps.py create mode 100644 environmental_justice/migrations/0001_initial.py create mode 100644 environmental_justice/migrations/__init__.py create mode 100644 environmental_justice/models.py create mode 100644 environmental_justice/tests.py create mode 100644 environmental_justice/views.py diff --git a/environmental_justice/__init__.py b/environmental_justice/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/environmental_justice/admin.py b/environmental_justice/admin.py new file mode 100644 index 00000000..6af52da2 --- /dev/null +++ b/environmental_justice/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin # noqa + +# Register your models here. diff --git a/environmental_justice/apps.py b/environmental_justice/apps.py new file mode 100644 index 00000000..0417d091 --- /dev/null +++ b/environmental_justice/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class EnvironmentalJusticeConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "environmental_justice" diff --git a/environmental_justice/migrations/0001_initial.py b/environmental_justice/migrations/0001_initial.py new file mode 100644 index 00000000..3462f43e --- /dev/null +++ b/environmental_justice/migrations/0001_initial.py @@ -0,0 +1,62 @@ +# Generated by Django 5.0.1 on 2024-02-02 16:40 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [] + + operations = [ + migrations.CreateModel( + name="EnvironmentalJusticeRow", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("dataset", models.CharField(verbose_name="Dataset")), + ("description", models.CharField(verbose_name="Description")), + ( + "description_simplified", + models.CharField(verbose_name="Description Simplified"), + ), + ("indicators", models.CharField(verbose_name="Indicators")), + ("intended_use", models.CharField(verbose_name="Intended Use")), + ("latency", models.CharField(verbose_name="Latency")), + ("limitations", models.CharField(verbose_name="Limitations")), + ("project", models.CharField(verbose_name="Project")), + ("source_link", models.CharField(verbose_name="Source Link")), + ("strengths", models.CharField(verbose_name="Strengths")), + ("format", models.CharField(verbose_name="Format")), + ( + "geographic_coverage", + models.CharField(verbose_name="Geographic Coverage"), + ), + ( + "data_visualization", + models.CharField(verbose_name="Data Visualization"), + ), + ( + "spatial_resolution", + models.CharField(verbose_name="Spatial Resolution"), + ), + ("temporal_extent", models.CharField(verbose_name="Temporal Extent")), + ( + "temporal_resolution", + models.CharField(verbose_name="Temporal Resolution"), + ), + ], + options={ + "verbose_name": "Environmental Justice Row", + "verbose_name_plural": "Environmental Justice Rows", + }, + ), + ] diff --git a/environmental_justice/migrations/__init__.py b/environmental_justice/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/environmental_justice/models.py b/environmental_justice/models.py new file mode 100644 index 00000000..65ce7faa --- /dev/null +++ b/environmental_justice/models.py @@ -0,0 +1,33 @@ +from django.db import models + + +class EnvironmentalJusticeRow(models.Model): + """ + Environmental Justice data from the spreadsheet + """ + + dataset = models.CharField("Dataset") + description = models.CharField("Description") + description_simplified = models.CharField("Description Simplified") + indicators = models.CharField("Indicators") + intended_use = models.CharField("Intended Use") + latency = models.CharField("Latency") + limitations = models.CharField("Limitations") + project = models.CharField("Project") + source_link = models.CharField("Source Link") + strengths = models.CharField("Strengths") + + # fields that needs cleaning + format = models.CharField("Format") + geographic_coverage = models.CharField("Geographic Coverage") + data_visualization = models.CharField("Data Visualization") + spatial_resolution = models.CharField("Spatial Resolution") + temporal_extent = models.CharField("Temporal Extent") + temporal_resolution = models.CharField("Temporal Resolution") + + class Meta: + verbose_name = "Environmental Justice Row" + verbose_name_plural = "Environmental Justice Rows" + + def __str__(self): + return self.name diff --git a/environmental_justice/tests.py b/environmental_justice/tests.py new file mode 100644 index 00000000..9a30df3b --- /dev/null +++ b/environmental_justice/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase # noqa + +# Create your tests here. diff --git a/environmental_justice/views.py b/environmental_justice/views.py new file mode 100644 index 00000000..6100593b --- /dev/null +++ b/environmental_justice/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render # noqa + +# Create your views here.