-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #578 from NASA-IMPACT/576-ej-data-api-endpoint
EJ data API endpoint
- Loading branch information
Showing
10 changed files
with
4,350 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from django.contrib import admin # noqa | ||
|
||
from .models import EnvironmentalJusticeRow | ||
|
||
|
||
@admin.register(EnvironmentalJusticeRow) | ||
class EnvironmentalJusticeAdmin(admin.ModelAdmin): | ||
"""Admin View for EnvironmentalJustice""" | ||
|
||
list_display = ("dataset", "description") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class EnvironmentalJusticeConfig(AppConfig): | ||
default_auto_field = "django.db.models.BigAutoField" | ||
name = "environmental_justice" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
}, | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.dataset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.test import TestCase # noqa | ||
|
||
# Create your tests here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.shortcuts import render # noqa | ||
|
||
# Create your views here. |