Technical support for the Urban League of Eastern Massachusetts (ULEM) and the Heat Smart Alliance ([HSA]) to canvass owners of properties in Boston likely to benefit from heat-pump retrofits, tax credits, and installation support. Code for Boston's work includes 5 streams:
data-analysisidentifying properties likely to benefit from heat pumpsbackendbuilding a database of such propertiesfrontenddeveloping an app to allow canvassers to view property informationpartnershipscontacting organizations that could apply this approach to their local areamarketingsharing project work + outcomes
- Watch the Orientation Video
- Join the Slack channel
#urban-league-heat-pump-accelerator - Join us on Tuesdays, 7-9p Eastern Time
- Zoom all weeks
- Cambridge 1-2 Tuesdays per month
- Identify and solve issues (great way to contribute now without skills in specific technologies!)
- Join a team
| Slack channel | technologies used |
|---|---|
| #urban-league-data-analysis | Python, Jupyter |
| #urban-league-backend | Rails (Ruby 3.1.3), Postgres |
| #urban-league-app-design-frontend | React.js |
| #urban-league-partnerships | none (yet) |
| #urban-league-marketing | none (yet) |
Start the GitHub Codespace from GitHub's web interface by clicking the green "Code" button and choosing "+" next to codespaces. If this is not available to you, you probably need to be added to the Code for Boston GitHub Organization.
The Ruby app should set itself up pretty much on its own. Ignore any messages containing rvm in them. We do not use rvm.
However to get things going, you should do the following in the terminal in VSCode:
cd backend
bundle exec rails db:prepare
bundle exec rake db:seed # Imports the test data
bundle exec rails s # starts the rails serverDo not use the built-in VSCode simple browser that starts up, it does not seem to be able to display raw JSON
After this you can visit in your regular web browser http://localhost:3000/assignments.json for assignments and the following URLs to see JSON samples as the backend provides them:
- /homes.json
- /surveyors.json
- /surveys.json
- /survey_responses.json
- /survey_questions.json
The application can generate and email a weekly surveyor activity report showing start and end times for each surveyor for each day of the week.
To generate and send the weekly report for the previous week (Sunday-Saturday):
cd backend
bundle exec rake reports:send_weekly_surveyor_reportTo automatically send the report every Monday at 9 AM, add the following cron job:
0 9 * * 1 cd /path/to/urban-league-heat-pump-accelerator/backend && bundle exec rake reports:send_weekly_surveyor_reportReplace /path/to/urban-league-heat-pump-accelerator/backend with the actual path to your backend directory.
To edit your crontab:
crontab -eThe report is sent as a CSV attachment to [email protected] (configurable in the mailer). It includes:
- Surveyor names
- Start and end times for each day (Sunday-Saturday)
- ✅ indicator for "on time" entries:
- Start time: before 4:24 PM
- End time: after 6:40 PM, OR all homes in the assignment(s) worked that day have been visited
- Actual timestamps when not on time
See the README.md at ./frontend/front for notes on running the frontend code.