Replies: 5 comments 2 replies
-
I'm already capturing the data - just not using it. What I'm not exactly sure about is a way to standardize the responses across different campgrounds to make it useful for lots of different setups. This would be a useful way to dig in and find some patterns in the RIDB PermittedEquipment and Attributes Schema across a bunch of different campsites (note that the example campsite import logging
from typing import List
from pprint import pprint
from camply.providers import RecreationDotGov
from camply.containers.api_responses import CampsiteResponse, _CampsiteAttribute, _CampsiteEquipment
logging.basicConfig(level=logging.DEBUG)
campsite_finder = RecreationDotGov()
campsite: CampsiteResponse = campsite_finder.get_campsite_by_id(campsite_id=98388)
attributes: List[_CampsiteAttribute] = campsite.ATTRIBUTES
permitted_equipment: List[_CampsiteEquipment] = campsite.PERMITTEDEQUIPMENT
pprint(attributes)
pprint(permitted_equipment) [_CampsiteAttribute(AttributeName='Food Locker', AttributeValue='Y'),
_CampsiteAttribute(AttributeName='Picnic Table', AttributeValue='Y'),
_CampsiteAttribute(AttributeName='Quiet Area', AttributeValue='Y'),
_CampsiteAttribute(AttributeName='Site Access', AttributeValue='Drive-In'),
_CampsiteAttribute(AttributeName='Shade', AttributeValue='Yes'),
_CampsiteAttribute(AttributeName='Capacity/Size Rating', AttributeValue='Single'),
_CampsiteAttribute(AttributeName='Checkin Time', AttributeValue='12:30 PM'),
_CampsiteAttribute(AttributeName='Min Num of People', AttributeValue='1'),
_CampsiteAttribute(AttributeName='Campfire Allowed', AttributeValue='Yes'),
_CampsiteAttribute(AttributeName='Checkout Time', AttributeValue='12:00 PM'),
_CampsiteAttribute(AttributeName='Pets Allowed', AttributeValue='Yes'),
_CampsiteAttribute(AttributeName='Max Num of People', AttributeValue='8'),
_CampsiteAttribute(AttributeName='Location Rating', AttributeValue='Good'),
_CampsiteAttribute(AttributeName='IS EQUIPMENT MANDATORY', AttributeValue='true'),
_CampsiteAttribute(AttributeName='Driveway Length', AttributeValue='60'),
_CampsiteAttribute(AttributeName='Max Vehicle Length', AttributeValue='25'),
_CampsiteAttribute(AttributeName='Tent Pad Width', AttributeValue='12'),
_CampsiteAttribute(AttributeName='Driveway Entry', AttributeValue='Pull-Through'),
_CampsiteAttribute(AttributeName='Driveway Surface', AttributeValue='Gravel'),
_CampsiteAttribute(AttributeName='Driveway Grade', AttributeValue='Slight'),
_CampsiteAttribute(AttributeName='Max Num of Vehicles', AttributeValue='1'),
_CampsiteAttribute(AttributeName='Site Height/Overhead Clearance', AttributeValue='12'),
_CampsiteAttribute(AttributeName='Tent Pad Length', AttributeValue='10'),
_CampsiteAttribute(AttributeName='Min Num of Vehicles', AttributeValue='0'),
_CampsiteAttribute(AttributeName='Site Width', AttributeValue='11')]
[_CampsiteEquipment(EquipmentName='Tent', MaxLength=25.0),
_CampsiteEquipment(EquipmentName='RV', MaxLength=25.0),
_CampsiteEquipment(EquipmentName='Trailer', MaxLength=25.0)] |
Beta Was this translation helpful? Give feedback.
-
I’ve noticed that too - the data in the attributes seems to be all over the place. I’m not sure if this would work but could it be setup where you fill in the search parameters (YAML or command-line) and only those parameters are filtered - no other attributes are filtered? If the search parameter is matched then only those sites are returned? You’d probably miss a lot of valid sites this way if that attribute doesn’t exist or the data was bad but at least you’d know that the site is what you want for sure. In our case, we definitely need to know that ‘Pets Allowed’ = ‘Yes’. BTW, your app has already helped to find some great campsites this summer so a big thank you from our family! |
Beta Was this translation helpful? Give feedback.
-
Hi @juftin, I'd be interested in implementing attribute filtering if there's a clear consensus on how this can/should be implemented.
When you say that the data is unstandardized, do you mean across providers (rec.gov vs Yellowstone, etc) or across campgrounds on a single provider? Either way, I think using the non-standardized data would be a good intermediate solution for now. What I'm not sure about though is how the filtering could be implemented in a flexible way. My current thought would be to allow users to input a python expression that's eval'ed for truthiness to filter the campsites after they've been retrieved. We could bind a |
Beta Was this translation helpful? Give feedback.
-
I was primarily talking about non-standardization across recreation.gov campgrounds there. Looking directly at a dump of the database, there 329 different attribute names (I'll post the popular ones below) across all campgrounds. I like the API you suggested there. In the past I've done something like this by leveraging the pandas df.eval syntax. I've never messed around much with All Attributes
|
Beta Was this translation helpful? Give feedback.
-
This discussion relates to #86 |
Beta Was this translation helpful? Give feedback.
-
Thank again for the extremely helpful project. You’ve made finding and booking campsites so much easier.
Another thought I had, for a future revision, is to be have an optional configuration file that would allow a user to filter campsites based on certain attributes. For example, we booked a campsite at one campground where the competition is particularly fierce and didn’t notice during the feeding frenzy that the tent area was almost nonexistent - small tent size area was mentioned in the campsite details. At another time we found that our larger family car barely fit into the parking space provided for the site - smaller parking space was mentioned in the campsite details. We also have a dog…etc. We could have spent the time looking over each campsite’s details but when you have less than a minute - less than a few seconds for some sites - you can’t take in all of the details before you have to grab a site.
I think these details are exposed via the rec.gov API. I was thinking a separate YAML configuration file with your campsite preferences would both cut down on the number of irrelevant campsites returned in searches and would give you the comfort in knowing that the campsites returned will work for your situation when you need to make a split-second decision.
Beta Was this translation helpful? Give feedback.
All reactions