Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/packy/esteelauderchallenge_packyanderson
https://github.com/packy/esteelauderchallenge_packyanderson
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/packy/esteelauderchallenge_packyanderson
- Owner: packy
- Created: 2023-09-11T16:15:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-11T16:16:09.000Z (over 1 year ago)
- Last Synced: 2024-10-14T02:42:55.380Z (2 months ago)
- Language: Perl
- Size: 55.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# foodtruck
This implements a quick and dirty script called `foodtruck` for listing out mobile food facilities using the data from [San Francisco's food truck open dataset](https://data.sfgov.org/Economy-and-Community/Mobile-Food-Facility-Permit/rqzj-sfat/data).
## Installation
* Clone this repository
* Install the following CPAN modules:
* lib::relative
* Class::Accessor::Fast
* Text::CSV
* Readonly
* cd to the repository and execute `prove`. You should see `Result: PASS` if all the tests work.
* Run the script under `scripts/foodtruck` (optionally, symlink `scripts/foodtruck` into your local `bin` directory)## Sample Run
```
$ foodtruck --dist 1000 --lat 37.7550307267667 --long -122.384530734223 --food taco
Name | Address | Food Items | Distance
---------------------------------------------------------+----------------------+-----------------------------------------------------------+----------
Bay Area Mobile Catering, Inc. dba. Taqueria Angelica's | 1301 CESAR CHAVEZ ST | Tacos: Burritos: Tortas: Quesadillas: Sodas: Chips: Candy | 856m
```## Manual
Usage information is provided in [the manual page](MANUAL.md).
## Improvements if I had more than 3 hours
* Currently, the data is stored in `/data/Mobile_Food_Facility_Permit.csv`.
The module that interacts with the data file has the option to specify an alternate
location for the data file (in fact, it uses this to point to a separate copy of the
data under the `t/data` directory for testing), but it would be useful to add a `--data`
parameter to the script to allow it to point to a different copy of the data.* The data file is currently static. It would be nice to add an option to refresh the data
[using the endpoint provided](https://data.sfgov.org/api/views/rqzj-sfat/rows.csv) and
store the updated data for future use.* Allow specifying what columns of data are displayed from the dataset. Currently,
only the Applicant, Address, and FoodItems columns are displayed (and the distance if
we are filtering by distance), but I can easlily see people using the script wanting
to see different columns.* Store the latitude and longitude for your distance search in a `$HOME/.foodtruckrc` file,
making `--latitude` and `--longitude` optional.