Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.1.0 #50

Merged
merged 45 commits into from
Jan 30, 2024
Merged

v0.1.0 #50

merged 45 commits into from
Jan 30, 2024

Commits on Jan 23, 2024

  1. Configuration menu
    Copy the full SHA
    545d18d View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. adds aggregate_by_facility

      Aggregate a set of records by facility IDs, using sum or count operations.
      Enables point symbol mapping.
      Other facilities in the selection (e.g. facilities in Snohomish County *without*
      reported CWA violations) can be identified and retrieved when the diff flag is True
    
      Parameters
      ----------
      records : DataSetResults object
          The records to aggregate. records should be a DataSetResults object created from
          a database query. In the :
          ds = make_data_sets(["CWA Violations"]) # Create a DataSet for handling the data
          snohomish_cwa_violations = ds["CWA Violations"].store_results(region_type="County", region_value=("SNOHOMISH",) state="WA") # Store results for this DataSet as a DataSetResults object
      program : String
          The name of the program, usually available from records.dataset.name
      other_records : Boolean
          When True, will retrieve other facilities in the selection
          (e.g. facilities in Snohomish County *without* reported CWA violations)
    
      Returns
      -------
      A dictionary containing:
        the aggregated results
        active facilities regulated under this program, but without recorded violations, inspections, or whatever the metric is (e.g. violations)
        the name of the new field that counts or sums up the relevant metric (e.g. violations)
    ericnost committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    e8bc1f0 View commit details
    Browse the repository at this point in the history
  2. Update utilities.py

    ericnost committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    c1a224b View commit details
    Browse the repository at this point in the history
  3. Update README.md

    minor fixes to variable names in example code
    ericnost committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    5279ece View commit details
    Browse the repository at this point in the history
  4. Update README.md

    more minor fixes to example code
    ericnost committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    5adf09d View commit details
    Browse the repository at this point in the history
  5. Update README.md

    more minor changes to example code
    ericnost committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    9fcb3bb View commit details
    Browse the repository at this point in the history
  6. Update utilities.py

    add air emissions to `aggregate_by_facility`
    
      # Air emissions
      elif (program == "Greenhouse Gas Emissions" or program == "Toxic Releases"):
        data = data.groupby([records.dataset.idx_field, "FAC_NAME", "FAC_LAT", "FAC_LONG"]).agg({records.dataset.agg_col:'sum'})
        data['sum'] = data[records.dataset.agg_col]
        data = data.reset_index()
        aggregator = "sum" # keep track of which field we use to aggregate data, which may differ from the preset
    ericnost committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    5803d11 View commit details
    Browse the repository at this point in the history
  7. Update data_set_presets.py

    add `agg_col`, `agg_type` and `units` to DMRs
    ericnost committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    24c5048 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2024

  1. Update get_data.py

    Fixes #57 
    ?
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    a505fd5 View commit details
    Browse the repository at this point in the history
  2. Update utilities.py

    Fixes #53
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    ab2e0f1 View commit details
    Browse the repository at this point in the history
  3. Update utilities.py

    attempt to deal with tabs/spaces issue
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    adc5d2d View commit details
    Browse the repository at this point in the history
  4. Update utilities.py

    fix indendation?
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    5492474 View commit details
    Browse the repository at this point in the history
  5. Update utilities.py

    debug sql and test choropleth (#55)
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    1315f60 View commit details
    Browse the repository at this point in the history
  6. update GHG and TRI

    add aggregation to toxic releases table (this is tricky because of differing pollutants - but if the data are filtered to a specific pollutant, this makes sense)
    
    fix a problem with the units of GHG and TRI charts
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    e7a71af View commit details
    Browse the repository at this point in the history
  7. Update data_set_presets.py

    fix error where unit was units in DMR data set presets
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    172bead View commit details
    Browse the repository at this point in the history
  8. Update utilities.py

    fix map in `choropleth()`
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    93fbf06 View commit details
    Browse the repository at this point in the history
  9. Update utilities.py

    packaging branch is deleted
    
    point to main instead
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    e023828 View commit details
    Browse the repository at this point in the history
  10. Update DataSetResults.py

    units -> unit
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    d84332b View commit details
    Browse the repository at this point in the history
  11. fix choropleth()

    add key_id argument to bring back together data separated for the choropleth
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    1338219 View commit details
    Browse the repository at this point in the history
  12. Update utilities.py

    delete old choropleth variables
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    c6a5419 View commit details
    Browse the repository at this point in the history
  13. temporary debugging

    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    5b4c20c View commit details
    Browse the repository at this point in the history
  14. reorder the flow of region_value variable

    Currently when it is a list we mush it together to make it appear on charts. But that has some downstream consquences for DataSet.region_value. Instead, only smush together the multi-selections when we make charts or store DataSet.results
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    ca5787b View commit details
    Browse the repository at this point in the history
  15. Update utilities.py

    fix `get_active_facilities()` format string
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    afd8290 View commit details
    Browse the repository at this point in the history
  16. Update DataSetResults.py

    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    fb40dff View commit details
    Browse the repository at this point in the history
  17. Update utilities.py

    zc_str
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    693da83 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    9c8fa78 View commit details
    Browse the repository at this point in the history
  19. de-debug

    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    c9f3367 View commit details
    Browse the repository at this point in the history
  20. Create ECHO_modules_Tutorials.ipynb

    add the Jupyter Notebook for the tutorials
    ericnost committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    90b352f View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2024

  1. Update README.md

    add detailed notes about data interpretation
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    8582fd9 View commit details
    Browse the repository at this point in the history
  2. Update README.md

    formatting quote/bullets
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    54d8115 View commit details
    Browse the repository at this point in the history
  3. Update README.md

    format example code
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    7f25798 View commit details
    Browse the repository at this point in the history
  4. Update ECHO_modules_Tutorials.ipynb

    update tutorial notebook with interpretation and background sections of README
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    e0685ec View commit details
    Browse the repository at this point in the history
  5. Update get_data.py

    deletes `selector()`
    
    fixes #58
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    150900a View commit details
    Browse the repository at this point in the history
  6. Update utilities.py

    creates `choropleth()`
    
    fixes #55
    
    This will break the missing data notebook, but we will make a note to fix that later
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    3658434 View commit details
    Browse the repository at this point in the history
  7. Update data_set_presets.py

    update zip code definition to match what's in the database
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    769ee53 View commit details
    Browse the repository at this point in the history
  8. Update geographies.py

    correct zip codes fields
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    f340874 View commit details
    Browse the repository at this point in the history
  9. Update utilities.py

    change logic in `choropleth()`
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    9c15f48 View commit details
    Browse the repository at this point in the history
  10. Update utilities.py

    fix `choropleth()` parameters
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    eab4d01 View commit details
    Browse the repository at this point in the history
  11. Update utilities.py

    add tooltip to `choropleth()`
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    a9e71f9 View commit details
    Browse the repository at this point in the history
  12. re-package

    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    265480a View commit details
    Browse the repository at this point in the history
  13. Create .gitignore

    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    cca1058 View commit details
    Browse the repository at this point in the history
  14. update requirements to >=

    fixes #51
    
    ?
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    779b91c View commit details
    Browse the repository at this point in the history
  15. Update utilities.py

    quick fix on `choropleth()` tooltip
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    c5ad01a View commit details
    Browse the repository at this point in the history
  16. Update pyproject.toml

    change numpy dependency to 1.23.5, which is Google Colab's default
    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    a3bf506 View commit details
    Browse the repository at this point in the history
  17. distributions

    ericnost committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    65d50b5 View commit details
    Browse the repository at this point in the history