Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Socrata

An application to sync weather and crop yield data with Socrata.

Approach

  • fetch the latest record from Socrata
  • check for newer records in the DB
  • send the new records to socrata
  • if the new record sampled_at date is earlier than the latest record in socrata, update the record in socrata
    • find the old record with the row id
    • use the row id to update the record in socrata

TODO:

  • check the updated_at date to determine if the record has been updated

Setup

export SOCRATA_APP_TOKEN=your_socrata_app_token
export SOCRATA_API_KEY=your_socrata_api_key
export SOCRATA_DOMAIN=your_socrata_domain
export SOCRATA_WEATHER_DATASET_ID=your_weather_dataset_id
export SOCRATA_YIELD_DATASET_ID=your_crop_yield_dataset_id
export DB_URL=your_ecto_db_url_for the weather data

mix ecto.migrate -r ObanRepo

Usage

mix run --no-halt

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/socrata.

About

A way to sync data from a local DB to socrata

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.