Example #1
0
        public IEnumerable <Ticket> getCondemned()
        {
            try
            {
                var client = new SODA.SodaClient("opendata.miamidade.gov", "YHSAnuynbCuoP7oEQB2yLXy3B");

                var dataset = client.GetResource <Ticket>("rbng-6mha");

                var allRows = dataset.GetRows(35);


                var soql = new SODA.SoqlQuery().Select("case_owner", "case_owner_description", "city", "created_year_month", "goal_days",
                                                       "issue_type", "latitude", "location", "location_address", "location_city", "location_state", "location_zip", "longitude", "method_received",
                                                       "neighborhood_district", "state", "street_address", "ticket_created_date_time", "ticket_id", "ticket_last_updated_date_time",
                                                       "ticket_status", "x_coordinate", "y_coordinate", "zip_code", "actual_completed_days", "ticket_closed_date_time")
                           .Where("issue_type = 'MINIMUM HOUSING CONDEMNATION'");

                //var results = dataset.Query(soql);

                var results = dataset.Query <Ticket>(soql);

                //var result2 = results.Where(x => x.zip_code == "33179");

                //var results = allRows.ToList<Ticket>();

                return(results);
            }
            catch (Exception err)
            {
                string message = err.Message;
                throw;
            }
        }
Example #2
0
        public static TwitterService twitterService = new TwitterService(); //authenticated twitter service that will be publically accessable

        #endregion Fields

        #region Methods

        //using SODA get all the heritage trees from the webpage
        public static IEnumerable<Dictionary<string, object>> accessSODAHeritageTrees()
        {
            //initialize a new client
            //make sure you register for your own app token (http://dev.socrata.com/register)
            var client = new SODA.SodaClient("https://data.seattle.gov/", tokensList[4]);

            //read metadata of a dataset using the resource identifier (Socrata 4x4)
            var metadata = client.GetMetadata("5979-eagq");
            var dataset = client.GetResource<Dictionary<string, object>>("5979-eagq");

            var allRows = dataset.GetRows();

            return allRows;
        }